1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18\startmodule[lmxhtml]
19
20\startxmlsetups lmx:html:setup
21 \xmlsetsetup{#1}{*}{lmx:html:*}
22 \xmlflush{#1}
23\stopxmlsetups
24
25\startxmlsetups lmx:html:ul
26 \startitemize[packed]
27 \xmlflush{#1}
28 \stopitemize
29\stopxmlsetups
30
31\startxmlsetups lmx:html:ol
32 \startitemize[packed,n]
33 \xmlflush{#1}
34 \stopitemize
35\stopxmlsetups
36
37\startxmlsetups lmx:html:li
38 \startitem
39 \xmlflush{#1}
40 \stopitem
41\stopxmlsetups
42
43\startxmlsetups lmx:html:p
44 \xmlflush{#1}\par
45\stopxmlsetups
46
47\startxmlsetups lmx:html:br
48 \par
49\stopxmlsetups
50
51\startxmlsetups lmx:html:a
52 \dontleavehmode
53 \begingroup
54 \tttf
55 \xmldoifelsetext {#1} {.} {
56 \goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlatt{#1}{href})]
57 } {
58 \goto{\hyphenatedurl{\xmlatt{#1}{href}}}[url(\xmlatt{#1}{href})]
59 }
60 \endgroup
61\stopxmlsetups
62
63\startxmlsetups lmx:html:em
64 \dontleavehmode
65 \begingroup\em\xmlflush{#1}\endgroup
66\stopxmlsetups
67
68\startxmlsetups lmx:html:b
69 \dontleavehmode
70 \begingroup\bf\xmlflush{#1}\endgroup
71\stopxmlsetups
72
73\startxmlsetups lmx:html:i
74 \dontleavehmode
75 \begingroup\it\xmlflush{#1}\endgroup
76\stopxmlsetups
77
78\startxmlsetups lmx:html:strong
79 \dontleavehmode
80 \begingroup\bf\xmlflush{#1}\endgroup
81\stopxmlsetups
82
83\startxmlsetups lmx:html:tt
84 \dontleavehmode
85 \begingroup\tt\xmlflush{#1}\endgroup
86\stopxmlsetups
87
88
89
90
91
92
93
94
95
96
97\xmlmapvalue{textdecoration}{underline}{\directsetbar{underbar}}
98\xmlmapvalue{textdecoration}{overline} {\directsetbar{overbar}}
99
100\startxmlsetups lmx:html:span
101 \dontleavehmode
102 \begingroup
103 \xmlcssmappedstylevalue{#1}{textdecoration}{textdecoration}
104 \xmlflush{#1}
105 \endgroup
106\stopxmlsetups
107
108\startxmlsetups lmx:html:html
109 \xmlflush{#1}
110\stopxmlsetups
111
112\startluacode
113 local texfinalizers = xml.finalizers.tex
114
115 function texfinalizers.html(collected,setup)
116 texfinalizers.xml(collected,"html",setup)
117 end
118\stopluacode
119
120
121
122\stopmodule
123 |