Debian Codegraph @

texmf-dist/source/generic/tex4ht/tex4ht-ooimpress.tex

raw
1 % $Id: tex4ht-ooimpress.tex 65 2010-11-17 19:16:45Z karl $
2 % compile 3 times: latex tex4ht-ooimpress
3 % htlatex tex4ht-ooimpress "xhtml,4,sections+"
4 % Copyright (C) 2009-2010 TeX Users Group
5 % Copyright (C) 2001-2009 Eitan M. Gurari
6 % Released under LPPL 1.3c+.
7 % See tex4ht-cpright.tex for license text.
8
9 %%%%%%%%%%%%%%%%%% load style files %%%%%%%%%%%%%%%%%%%%%%%%%%
10
11 \ifx \HTML\UnDef
12 \def\HTML{ooimpress}%,ooimpress-mml}
13 \def\PREAMBLE{%
14 \usepackage{url}%
15 \usepackage{hyperref}%
16 }
17 \def\OPTIONS{html,sections+,3}%
18 \def\CONFIG{\jobname}
19 \def\MAKETITLE{\author{Eitan M. Gurari,
20 James Naughton, and Maarten Wisse}}
21 \def\next{\input mktex4ht.4ht \endinput}
22 \expandafter\next
23 \fi
24
25 \input{common}
26 \input{tex4ht-cpright}
27
28 See ch 7 of \cite{odbook}
29
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 \chapter{The Code}
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 \section{The Root}
36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 \subsection{Imported Configurations}
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
42
43 \<configure ooimpress tex4ht\><<<
44 \if:latex |<Hinclude latex|>
45 \else |<Hinclude plain|> \fi
46 >>>
47
48
49 \<configure ooimpress plain\><<<
50 |<Hinclude plain lib|>
51 |<Hinclude plain + latex lib|>
52 >>>
53
54 \<configure ooimpress latex\><<<
55 |<Hinclude latex lib|>
56 |<Hinclude plain + latex lib|>
57 >>>
58
59 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60 \subsection{Common Code Fragments}
61 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62
63 \<par del\><<<
64 !*?: >>>
65
66 \<tag of Tag\><<<
67 cw:>>>
68
69 \<tail\><<<
70 tail>>>
71
72 \<addr for Tag and Ref of Sec\><<<
73 \xdef\:cursec{|<section html addr|>}%
74 >>>
75
76 \<utilities\><<<
77 \newif\ifHCond
78 \def\:gobbleM#1->{}
79 >>>
80
81
82 \<try env inline par\><<<
83 \ShowPar
84 >>>
85
86 \<try inline par\><<<
87 \ShowPar\par{\HCondtrue\noindent}%
88 >>>
89
90
91
92 %%%%%%%%%%%%%%%%%%%%%%
93 \subsection{Copyright}
94 %%%%%%%%%%%%%%%%%%%%%%
95
96 \<ooimpress\><<<
97 % ooimpress.4ht (|version), generated from |jobname.tex
98 % Copyright (C) 2009-2010 TeX Users Group
99 % Copyright (C) |CopyYear.2001. Eitan M. Gurari
100 |<TeX4ht copywrite|>
101 >>>
102
103 \<configure ooimpress tex4ht\><<<
104 |<utilities|>
105 >>>
106
107 %%%%%%%%%%%%%%%%%%%%%%
108 \section{The XML Files}
109 %%%%%%%%%%%%%%%%%%%%%%
110
111 %%%%%%%%%%%%%%%%%%%%%%
112 \subsection{content.xml (= jobname.xml)}
113 %%%%%%%%%%%%%%%%%%%%%%
114
115 \<configure ooimpress foils\><<<
116 \Configure{BODY}
117 {\HCode{<office:body><office:presentation>}%
118 \let\end:rootslide\empty
119 \start:slide
120 \gdef\end:rootslide{\end:slide \global\let\end:rootslide=\empty}%
121 \par\ShowPar}
122 {\IgnorePar\EndP
123 \end:rootslide
124 \HCode{</office:presentation></office:body>\Hnewline}}
125 >>>
126
127
128 \<configure ooimpress foils\><<<
129 \Configure{maketitle}
130 {\bgroup
131 \Configure{newpage}{}%
132 \IgnorePar\EndP\HCode{<!--begin maketitle-->}
133 \Configure{tabular}{}{}{}{}{\ifnum \HRow>1
134 \HCode{<text:line-break\Hnewline/>}\fi}{}%
135 \ConfigureEnv{tabular}{}{}{}{}%
136 }
137 {\ifvmode \IgnorePar\fi \EndP
138 \HCode{|<end page body|><!--end maketitle-->}\egroup \par}
139 {\ifvmode \IgnorePar\fi \EndP
140 \HCode{|<start document title|>%
141 <text:p text:style-name="Title|<cond rtl class|>" >}}
142 {\HCode{</text:p>|<end document title|>|<start maketitle page body|>}}
143 >>>
144
145 \<start maketitle page body\><<<
146 <draw:frame presentation:style-name="pr1"
147 draw:layer="layout"
148 svg:width="25.199cm"
149 % svg:height="3.256cm"
150 svg:x="1.4cm"
151 svg:y="6.0cm"
152 presentation:class="notes">
153 <draw:text-box>\Hnewline
154 >>>
155
156
157
158 \<start page body\><<<
159 <draw:frame presentation:style-name="pr1"
160 draw:layer="layout"
161 svg:width="25.199cm"
162 % svg:height="3.256cm"
163 svg:x="1.4cm"
164 svg:y="2.0cm"
165 presentation:class="notes">
166 <draw:text-box>\Hnewline
167 >>>
168
169
170 \<end page body\><<<
171 </draw:text-box>
172 </draw:frame>\Hnewline
173 >>>
174
175
176
177 \<start document title\><<<
178 <draw:frame presentation:style-name="pr1"
179 draw:layer="layout"
180 svg:width="25.199cm"
181 % svg:height="3.256cm"
182 svg:x="1.4cm"
183 svg:y="3.0cm"
184 presentation:class="title">
185 <draw:text-box>\Hnewline
186 >>>
187
188 \<end document title\><<<
189 </draw:text-box>
190 </draw:frame>\Hnewline
191 >>>
192
193
194
195 \<configure ooimpress foils\><<<
196 \HAssign\PageN=0
197 \Configure{foilhead}
198 {\IgnorePar\EndP \start:slide }
199 {\IgnorePar\EndP
200 \HCode{|<end page body|>}\end:slide }
201 {\HCode{|<start foilhead title|>%
202 <text:p text:style-name="|<cond rtl class|>" >}%
203 \IgnoreIndent}
204 {\HCode{</text:p>\Hnewline
205 |<end foilhead title|>|<start page body|>}\par\ShowPar}
206
207 \def\start:slide{\end:rootslide
208 \HAdvance\PageN by 1
209 \HCode{<!--start of foilhead-->
210 <draw:page draw:name="page\PageN"
211 draw:style-name="dp1"
212 draw:master-page-name="Default"> \Hnewline}}
213 \def\end:slide{\HCode{
214 </draw:page>
215 <!--end of foilhead-->}}
216 >>>
217
218
219 \<cond rtl class\><<<
220 \if@rl-rtl\fi
221 >>>
222
223
224
225 \<start foilhead title\><<<
226 <draw:frame presentation:style-name="pr1"
227 draw:layer="layout"
228 svg:width="25.199cm"
229 % svg:height="3.256cm"
230 svg:x="1.4cm"
231 svg:y="0.962cm"
232 presentation:class="subtitle">
233 <draw:text-box>\Hnewline
234 >>>
235
236 \<end foilhead title\><<<
237 </draw:text-box>
238 </draw:frame>\Hnewline
239 >>>
240
241 \<configure ooimpress foils NO\><<<
242 \NewConfigureOO{slide}
243 \ConfigureOO{slide}{%
244 <style:style style:name="dp1" style:family="drawing-page">
245 <style:drawing-page-properties
246 presentation:background-visible="true"
247 presentation:background-objects-visible="true"
248 presentation:display-footer="true"
249 presentation:display-page-number="false"
250 presentation:display-date-time="true"/>
251 </style:style>
252 <style:style style:name="gr1"
253 style:family="graphic"
254 style:parent-style-name="standard">
255 <style:graphic-properties
256 draw:stroke="none"
257 svg:stroke-color="\#000000"
258 draw:fill="none"
259 draw:fill-color="\#ffffff"
260 draw:textarea-horizontal-align="left"
261 draw:auto-grow-height="true"
262 draw:auto-grow-width="true"
263 fo:min-height="0cm"
264 fo:min-width="0cm"/>
265 </style:style>
266 }
267 >>>
268
269
270
271
272 \<configure ooimpress foils\><<<
273 \ConfigureOO{foilhead}{\Hnewline
274 <style:style style:name="foilhead"
275 style:family="paragraph"
276 >\Hnewline
277 <\style:par:properties fo:font-size="12pt"
278 fo:font-weight="bold"
279 style:font-size-asian="14pt"
280 style:font-weight-asian="bold"
281 style:font-size-complex="14pt"
282 style:font-weight-complex="bold"
283 fo:margin-top="0.42cm"
284 fo:margin-bottom="0.51cm"
285 fo:text-align="center"
286 style:justify-single-word="false"
287 />
288 </style:style>
289 }
290 >>>
291
292
293 \<configure ooimpress foils\><<<
294 \ConfigureOO{title}{%
295 <style:style style:name="Title"
296 style:family="paragraph"
297 >\Hnewline
298 <\style:par:properties fo:margin-top="0.42cm"
299 fo:margin-bottom="0.51cm"
300 fo:font-size="20pt"
301 fo:font-weight="normal"
302 style:font-size-asian="18pt"
303 style:font-weight-asian="bold"
304 style:font-size-complex="18pt"
305 style:font-weight-complex="bold"
306 fo:text-align="center"
307 style:justify-single-word="false"/>
308 </style:style> \Hnewline
309 }
310 >>>
311
312
313
314 \<configure ooimpress foils\><<<
315 \Configure{thank}
316 {\setbox\tmp:bx=\hbox\bgroup}
317 {\egroup}
318 {\NoFonts \leavevmode \bgroup \protect\Configure{$}{}{}{}%
319 \hbox{\HCode{<!--text:note\Hnewline text:note-class="footnote"
320 text:id="}|<thank id|>%
321 \HCode{"><text:note-citation>}}%
322 }
323 {\egroup \EndNoFonts
324 \HCode{</text:note-citation><text:note-body>
325 <text:p\Hnewline text:style-name="Footnote" ><text:s/>}}
326 {\HCode{</text:p></text:note-body></text:note-->}}
327 >>>
328
329
330
331
332
333 %%%%%%%%%%%%%
334 \subsection{Undo ooffice}
335 %%%%%%%%%%%%%
336
337
338 \<configure ooimpress tex4ht\><<<
339 \def\media:type{application/vnd.oasis.opendocument.presentation}
340 >>>
341
342 %%%%%%%%%%%%%%%%%%
343 \subsection{Remove `reference-mark'}
344 %%%%%%%%%%%%%%%%%%
345
346 Introduced in xtpipes for \verb=\Link=
347
348
349 \<configure ooimpress latex\><<<
350 \Odef\Link[#1]#2#3{}
351 \let\EndLink\empty
352 >>>
353
354
355 %%%%%%%%%%%%%%%%%%
356 \subsection{Remove `style:columns'}
357 %%%%%%%%%%%%%%%%%%
358
359
360 OpenOffice impress chocks on `style:columns' (why?)
361
362 \<configure ooimpress latex\><<<
363 \ConfigureOO{Sect1}{\Hnewline
364 <style:style style:name="Sect1"
365 style:family="section">
366 <\style:sectionproperties>
367 <!--style:columns fo:column-count="1"
368 fo:column-gap="0cm">
369 <style:column fo:margin-top="0.5cm"
370 fo:margin-left="0cm"
371 fo:margin-right="0cm"
372 />
373 </style:columns-->
374 </\style:sectionproperties>
375 </style:style>
376 \Hnewline }
377 >>>
378
379
380 \<configure ooimpress latex\><<<
381 \ConfigureOO{Sect2}{\Hnewline
382 <style:style style:name="Sect2"
383 style:family="section">
384 <\style:sectionproperties>
385 <!--style:columns fo:column-count="0" fo:column-gap="0cm"/-->
386 </\style:sectionproperties>
387 </style:style>
388 \Hnewline }
389 >>>
390
391 \<configure ooimpress tex4ht\><<<
392 \Configure{figure-style}{%
393 <style:style style:name="Figure" style:family="section">\Hnewline
394 <style:section-properties
395 fo:margin-left="0.25in"
396 fo:margin-right="0.25in"
397 style:editable="true">\Hnewline
398 <!--style:columns fo:column-count="0"
399 fo:column-gap="0in"/-->
400 </style:section-properties>
401 </style:style>\Hnewline
402 }
403 >>>
404
405
406 \<configure ooimpress g-brief\><<<
407 \ConfigureOO{g-brief-header}{\Hnewline
408 <style:style style:name="header-style" style:family="section">\Hnewline
409 <\style:properties text:dont-balance-text-columns="false"
410 fo:margin-bottom="2cm">\Hnewline
411 <!--style:columns fo:column-count="2"
412 fo:column-gap="1in">\Hnewline
413 <style:column fo:margin-left="0in"
414 fo:margin-right="0in"/>\Hnewline
415 <style:column fo:margin-left="0in"
416 fo:margin-right="0in"/>\Hnewline
417 </style:columns-->\Hnewline
418 </\style:properties>\Hnewline
419 </style:style>\Hnewline
420 }
421 >>>
422
423 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
424 \begin{thebibliography}{9}
425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
426
427 \bibitem{odbook}
428 OASIS OpenDocument Essentials,
429 Using OASIS OpenDocument XML
430 \url{http://books.evc-cit.info/odbook/book.html}
431
432
433 \end{thebibliography}
434
435
436 \endinput