-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxourse.4ht
62 lines (54 loc) · 2.17 KB
/
xourse.4ht
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% xourse.4ht
% Copyright (C) 2015
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is
% in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
%
% This Current Maintainer of this work
% is Jim Fowler.
%
% If you modify this program your changing its signature
% with a directive of the following form will be
% appreciated.
% \message{signature}
%
% fowler@math.osu.edu
% http://kisonecat.com/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2015-08-22-10:35}
\newcounter{ximera@part}
\setcounter{ximera@part}{0}
\renewcommand\part[1]{%
\stepcounter{ximera@part}%
\ifvmode \IgnorePar\fi \EndP\HCode{<h1 id="part\arabic{ximera@part}" class="card part">#1</h1>}\IgnoreIndent%
}
\renewcommand\activity[2][]{%
\ifvmode \IgnorePar\fi \EndP\HCode{<a class="activity card \activitystyle" href="#2" data-options="#1">#2</a>}\IgnoreIndent%
}
% I suppose it is reasonable for practice cards to NOT have an activitystyle, since the activitystyle is basically PRACTICE
\renewcommand\practice[2][]{%
\ifvmode \IgnorePar\fi \EndP\HCode{<a class="activity card practice" href="#2" data-options="#1">#2</a>}\IgnoreIndent%
}
\renewcommand\youtube[1]{%
\ifvmode \IgnorePar\fi \EndP\HCode{<a class="youtube" href="https://www.youtube.com/watch?v=#1">#1</a>}\IgnoreIndent%
}
% the "points" environment in html wraps the activities in a div in
% order to assign some number of points to them.
\renewenvironment{graded}[1]{%
\ifvmode \IgnorePar\fi \EndP\HCode{<div class="graded" data-weight="#1">}\IgnoreIndent%
}{
\ifvmode \IgnorePar\fi \EndP\HCode{</div>}}\IgnoreIndent%
}
% Mark this as a xourse file
\Configure{@HEAD}{\HCode{<meta name="description" content="xourse" />\Hnewline}}
% The xourse logo is an og:image in the opengraph taxonomy
\Configure{@HEAD}{\HCode{<meta name="og:image" content="}\xourse@logo\HCode{" />\Hnewline}}
\Hinput{xourse}
\endinput