-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlettrine.4ht
46 lines (40 loc) · 1.13 KB
/
lettrine.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
% Define options
\newcommand*{\LH@ante}{}
\newcommand*{\LH@findent}{}
\newcommand*{\LH@lhang}{}
% Lettrine will have 4 tags
\NewConfigure{lettrine}{6}
% Renew the command
\renewcommand\lettrine[3][]{%
\leavevmode
\define@key{LH}{ante}{\renewcommand*{\LH@ante}{##1}}%
\define@key{LH}{findent}{\renewcommand*{\LH@findent}{##1}}%
\define@key{LH}{lhang}{\renewcommand*{\LH@lhang}{##1}}%
\setkeys{LH}{#1}%
\HCode{<span class="lettrine lettrine-#2">}\LH@ante\HCode{<span class="lettrine-letter lettrine-letter-#2">}#2\c:lettrine\d:lettrine\e:lettrine#3\f:lettrine
% Reset values
\renewcommand*{\LH@ante}{}%
\renewcommand*{\LH@findent}{}%
\renewcommand*{\LH@lhang}{}%
}
% Set the tags
\Configure{lettrine}{\Tg<span class="lettrine">}{\Tg<span class="lettrine-letter">}{\Tg</span>}{\Tg</span>}{\Tg<span class="lettrine-line">}{\Tg</span>}
% Define default Css
\Css{.lettrine{
float: left;
line-height: 0.5;
margin-left: -0.5em;
}
.lettrine-letter{
font-style: normal;
font-size: 5em;
color: gray;
font-family: "Linux Libertine Initials O", Serif;
}
.lettrine-Q{
padding-bottom: 1em;
margin-top: -0.3em;
}}
\Css{.lettrine-line{
font-variant: small-caps;
}}