Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / latex2 / tei-param.xsl @ 187

History | View | Annotate | Download (21 kB)

1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet xmlns:s="http://www.ascc.net/xml/schematron"
3
                
4
                xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
5
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
6
                xmlns:tei="http://www.tei-c.org/ns/1.0"
7
                xmlns:teix="http://www.tei-c.org/ns/Examples"
8
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9
                exclude-result-prefixes="s a rng tei teix"
10
                version="2.0">
11

    
12
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" scope="stylesheet" type="stylesheet">
13
      <desc>
14
         <p>TEI stylesheet customization module for LaTeX output.</p>
15
         <p>This software is dual-licensed:
16

    
17
1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
18
Unported License http://creativecommons.org/licenses/by-sa/3.0/ 
19

    
20
2. http://www.opensource.org/licenses/BSD-2-Clause
21
		
22
All rights reserved.
23

    
24
Redistribution and use in source and binary forms, with or without
25
modification, are permitted provided that the following conditions are
26
met:
27

    
28
* Redistributions of source code must retain the above copyright
29
notice, this list of conditions and the following disclaimer.
30

    
31
* Redistributions in binary form must reproduce the above copyright
32
notice, this list of conditions and the following disclaimer in the
33
documentation and/or other materials provided with the distribution.
34

    
35
This software is provided by the copyright holders and contributors
36
"as is" and any express or implied warranties, including, but not
37
limited to, the implied warranties of merchantability and fitness for
38
a particular purpose are disclaimed. In no event shall the copyright
39
holder or contributors be liable for any direct, indirect, incidental,
40
special, exemplary, or consequential damages (including, but not
41
limited to, procurement of substitute goods or services; loss of use,
42
data, or profits; or business interruption) however caused and on any
43
theory of liability, whether in contract, strict liability, or tort
44
(including negligence or otherwise) arising in any way out of the use
45
of this software, even if advised of the possibility of such damage.
46
</p>
47
         <p>Author: See AUTHORS</p>
48
         <p>Id: $Id: tei-param.xsl 10197 2012-03-28 21:44:10Z rahtz $</p>
49
         <p>Copyright: 2011, TEI Consortium</p>
50
      </desc>
51
   </doc>
52

    
53

    
54
  <xsl:key name="FOOTNOTES" match="tei:note[not(@place)]" use="1"/>
55
  <xsl:key name="FOOTNOTES" match="tei:note[@place='foot']" use="1"/>
56
  <xsl:key name="FOOTNOTES" match="tei:note[@place='bottom']" use="1"/>
57
  <xsl:key name="ENDNOTES" match="tei:note[@place='end']" use="1"/>
58

    
59
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="hook">
60
      <desc>[latex] Hook where LaTeX commands can be inserted after 
61
the beginning of the document</desc>
62
   </doc>
63
   <xsl:template name="beginDocumentHook"/>
64

    
65
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="hook">
66
      <desc>[latex] Hook where LaTeX commands can be at start of setup</desc>
67
   </doc>
68
   <xsl:template name="latexSetupHook"/>
69
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="hook">
70
      <desc>[latex] Hook where LaTeX commands can be inserted in the
71
    preamble before the beginning of the document</desc>
72
   </doc>
73
   <xsl:template name="latexPreambleHook"/>
74

    
75
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="string">
76
      <desc>
77
Optional parameters for documentclass
78
</desc>
79
   </doc>
80
   <xsl:param name="classParameters">11pt,twoside</xsl:param>
81

    
82
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="string">
83
      <desc>
84
Logo graphics file
85
</desc>
86
   </doc>
87
   <xsl:param name="latexLogo"/>
88

    
89
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="output" type="string">
90
      <desc>
91
URL root where referenced documents are located
92
</desc>
93
   </doc>
94
   <xsl:param name="baseURL"/>
95

    
96
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="output" type="boolean">
97
      <desc>
98
Whether or not to load LaTeX packages which attempt to
99
process the UTF-8 characters. Set to "false" if you are
100
using XeTeX or similar.
101
</desc>
102
   </doc>
103
   <xsl:param name="reencode">true</xsl:param>
104

    
105
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="userpackage" type="string">
106
      <desc>
107
The name of a LaTeX style package which should be loaded
108
</desc>
109
   </doc>
110
   <xsl:param name="userpackage"/>
111

    
112
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="output" type="boolean">
113
      <desc>
114
Use real name of graphics files rather than pointers
115
</desc>
116
   </doc>
117
   <xsl:param name="realFigures">true</xsl:param>
118

    
119
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
120
      <desc>
121
         <p>LaTeX package setup</p>
122
         <p>Declaration of the LaTeX packages needed to implement
123
    this markup</p>
124
      </desc>
125
   </doc>
126
   <xsl:template name="latexPackages">
127
      <xsl:text>
128
\usepackage[</xsl:text>
129
      <xsl:value-of select="$latexPaperSize"/>
130
      <xsl:text>,</xsl:text>
131
      <xsl:value-of select="$latexGeometryOptions"/>
132
      <xsl:text>]{geometry}
133
\usepackage{framed}
134
</xsl:text>
135
<xsl:text>
136
\definecolor{shadecolor}{gray}{0.95}
137
\usepackage{longtable}
138
\usepackage[normalem]{ulem}
139
\usepackage{fancyvrb}
140
\usepackage{fancyhdr}
141
\usepackage{graphicx}
142
</xsl:text>
143
<xsl:if test="key('ENDNOTES',1)">
144
  \usepackage{endnotes}
145
  <xsl:choose>
146
    <xsl:when test="key('FOOTNOTES',1)">
147
      \def\theendnote{\@alph\c@endnote}
148
    </xsl:when>
149
    <xsl:otherwise>
150
      \def\theendnote{\@arabic\c@endnote}
151
    </xsl:otherwise>
152
  </xsl:choose>
153
</xsl:if>
154
<xsl:text>
155
\def\Gin@extensions{.pdf,.png,.jpg,.mps,.tif}
156
</xsl:text>
157
<xsl:choose>
158
      <xsl:when test="$reencode='true'">
159
         <xsl:text>
160
\IfFileExists{tipa.sty}{\usepackage{tipa}}{}
161
\usepackage{times}
162
</xsl:text>
163
      </xsl:when>
164
</xsl:choose>
165
      <xsl:if test="not($userpackage='')">
166
  \usepackage{<xsl:value-of select="$userpackage"/>}
167
</xsl:if>
168
      <xsl:text>
169
  \pagestyle{fancy} 
170
</xsl:text>
171
\usepackage[pdftitle={<xsl:call-template name="generateSimpleTitle"/>},
172
 pdfauthor={<xsl:call-template name="generateAuthor"/>}]{hyperref}
173
\hyperbaseurl{<xsl:value-of select="$baseURL"/>}
174
<xsl:if test="count(key('APP',1))&gt;0">
175
\usepackage{ledmac}
176
<xsl:call-template name="ledmacOptions"/>
177
</xsl:if>
178

    
179
   </xsl:template>
180

    
181
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="float">
182
      <desc>
183
When processing a "pb" element, decide what to generate: "active" generates a page break; "visible" genrates a bracketed number (with scissors), and "bracketsonly" generates a bracketed number (without scissors).
184
</desc>
185
   </doc>
186
   <xsl:param name="pagebreakStyle"/>
187

    
188
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="float">
189
      <desc>
190
When making a table, what width must be constrained to fit,
191
as a proportion of the page width.
192
</desc>
193
   </doc>
194
   <xsl:param name="tableMaxWidth">0.85</xsl:param>
195

    
196
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="boolean">
197
      <desc>
198
Whether to number lines of poetry
199
</desc>
200
   </doc>
201
   <xsl:param name="verseNumbering">false</xsl:param>
202

    
203
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="integer">
204
      <desc>
205
When numbering poetry, how often to put in a line number
206
</desc>
207
   </doc>
208
   <xsl:param name="everyHowManyLines">5</xsl:param>
209

    
210
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="string">
211
      <desc>
212
When numbering poetry, when to restart the sequence;
213
this must be the name of a TEI element
214
</desc>
215
   </doc>
216
   <xsl:param name="resetVerseLineNumbering">div1</xsl:param>
217

    
218
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="userpackage" type="string">
219
      <desc>
220
Options to pass to the geometry package to set margins etc
221
</desc>
222
   </doc>
223
   <xsl:param name="latexGeometryOptions">twoside,lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in</xsl:param>
224

    
225
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="userpackage" type="string">
226
      <desc>
227
Depth of nesting of reference documentation when processing ODD
228
</desc>
229
   </doc>
230
   <xsl:param name="specLinkDepth">2</xsl:param>
231

    
232
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
233
      <desc>
234
         <p>LaTeX setup</p>
235
         <p>The basic LaTeX setup which you should not 
236
really tinker with unless you really understand  why and how. Note
237
that we need to set up a mapping here for Unicode 8421, 10100 and
238
10100 to glyphs for backslash and the two curly brackets, to provide literal
239
characters. The normal characters remain active for LaTeX commands.
240
Note that if $reencode is set to false, no input or output encoding
241
packages are loaded, since it is assumed you are using a TeX variant
242
capable of dealing with UTF-8 directly.
243
</p>
244
      </desc>
245
   </doc>
246
   <xsl:template name="latexSetup">
247
   <xsl:call-template name="latexSetupHook"/>
248
\IfFileExists{xcolor.sty}%
249
  {\RequirePackage{xcolor}}%
250
  {\RequirePackage{color}}
251
\usepackage{colortbl}
252
      <xsl:choose>
253
         <xsl:when test="$reencode='true'">
254
\IfFileExists{utf8x.def}%
255
 {\usepackage[utf8x]{inputenc}}%
256
 {\usepackage[utf8]{inputenc}}
257
\PrerenderUnicode{–}
258
<xsl:call-template name="latexBabel"/>
259
\usepackage[T1]{fontenc}
260
\usepackage{float}
261
\usepackage[]{ucs}
262
\uc@dclc{8421}{default}{\textbackslash }
263
\uc@dclc{10100}{default}{\{}
264
\uc@dclc{10101}{default}{\}}
265
\uc@dclc{8491}{default}{\AA{}}
266
\uc@dclc{8239}{default}{\,}
267
\uc@dclc{20154}{default}{ }
268
\def\textschwa{\rotatebox{-90}{e}}
269
\def\textJapanese{}
270
\def\textChinese{}
271
</xsl:when>
272
         <xsl:otherwise>
273
\usepackage{fontspec}
274
\usepackage{xunicode}
275
\catcode`⃥=\active \def⃥{\textbackslash}
276
\catcode`❴=\active \def❴{\{}
277
\catcode`❵=\active \def❵{\}}
278
\def\textJapanese{\fontspec{Kochi Mincho}}
279
\def\textChinese{\fontspec{HAN NOM A}\XeTeXlinebreaklocale "zh"\XeTeXlinebreakskip = 0pt plus 1pt }
280
\def\textKorean{\fontspec{Baekmuk Gulim} }
281
\setmonofont{<xsl:value-of select="$typewriterFont"/>}
282
<xsl:if test="not($sansFont='')">
283
  \setsansfont{<xsl:value-of select="$sansFont"/>}
284
</xsl:if>
285
<xsl:if test="not($romanFont='')">
286
  \setromanfont{<xsl:value-of select="$romanFont"/>}
287
</xsl:if>
288
</xsl:otherwise>
289
      </xsl:choose>
290
\DeclareTextSymbol{\textpi}{OML}{25}
291
\usepackage{relsize}
292
\def\textsubscript#1{%
293
  \@textsubscript{\selectfont#1}}
294
\def\@textsubscript#1{%
295
  {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
296
\def\textquoted#1{‘#1’}
297
\def\textsmall#1{{\small #1}}
298
\def\textlarge#1{{\large #1}}
299
\def\textoverbar#1{\ensuremath{\overline{#1}}}
300
\def\textgothic#1{{\fontspec{<xsl:value-of select="$gothicFont"/>}#1}}
301
\def\textcal#1{{\fontspec{<xsl:value-of select="$calligraphicFont"/>}#1}}
302
\RequirePackage{array}
303
\def\@testpach{\@chclass
304
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
305
  \ifnum \@lastchclass=7 5 \else
306
   \ifnum \@lastchclass=8 \tw@ \else
307
    \ifnum \@lastchclass=9 \thr@@
308
   \else \z@
309
   \ifnum \@lastchclass = 10 \else
310
   \edef\@nextchar{\expandafter\string\@nextchar}%
311
   \@chnum
312
   \if \@nextchar c\z@ \else
313
    \if \@nextchar l\@ne \else
314
     \if \@nextchar r\tw@ \else
315
   \z@ \@chclass
316
   \if\@nextchar |\@ne \else
317
    \if \@nextchar !6 \else
318
     \if \@nextchar @7 \else
319
      \if \@nextchar (8 \else
320
       \if \@nextchar )9 \else
321
  10
322
  \@chnum
323
  \if \@nextchar m\thr@@\else
324
   \if \@nextchar p4 \else
325
    \if \@nextchar b5 \else
326
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
327
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
328

    
329
\gdef\arraybackslash{\let\\=\@arraycr}
330
\def\textxi{\ensuremath{\xi}}
331
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
332
<xsl:text disable-output-escaping="yes">
333
\newcolumntype{L}[1]{){\raggedright\arraybackslash}p{#1}}
334
\newcolumntype{C}[1]{){\centering\arraybackslash}p{#1}}
335
\newcolumntype{R}[1]{){\raggedleft\arraybackslash}p{#1}}
336
\newcolumntype{P}[1]{){\arraybackslash}p{#1}}
337
\newcolumntype{B}[1]{){\arraybackslash}b{#1}}
338
\newcolumntype{M}[1]{){\arraybackslash}m{#1}}
339
\definecolor{label}{gray}{0.75}
340
\DeclareRobustCommand*{\xref}{\hyper@normalise\xref@}
341
\def\xref@#1#2{\hyper@linkurl{#2}{#1}}
342
\def\Div[#1]#2{\section*{#2}}
343
\begingroup
344
\catcode`\_=\active
345
\gdef_#1{\ensuremath{\sb{\mathrm{#1}}}}
346
\endgroup
347
\mathcode`\_=\string"8000
348
\catcode`\_=12\relax
349
</xsl:text>
350
   </xsl:template>
351

    
352
   <xsl:template name="exampleFontSet">
353
      <xsl:choose>
354
         <xsl:when test="$reencode='true'">
355
            <xsl:text>\ttfamily\small\selectfont </xsl:text>
356
         </xsl:when>
357
         <xsl:when test="../@xml:lang='zh-TW' or       @xml:lang='zh-TW'">
358
            <xsl:text>\fontspec{Arial Unicode MS}\small\selectfont </xsl:text>
359
         </xsl:when>
360
         <xsl:when test="../@xml:lang='ja' or       @xml:lang='ja'">
361
            <xsl:text>\fontspec{Arial Unicode MS}\small\selectfont </xsl:text>
362
         </xsl:when>
363
         <xsl:otherwise>
364
            <xsl:text>\ttfamily\small\selectfont </xsl:text>
365
         </xsl:otherwise>
366
      </xsl:choose>
367
   </xsl:template>
368

    
369

    
370
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
371
      <desc>
372
         <p>LaTeX babel setup</p>
373
         <p>LaTeX loading of babel with options</p>
374
      </desc>
375
   </doc>
376
   <xsl:template name="latexBabel">
377
\usepackage[english]{babel}
378
</xsl:template>
379

    
380

    
381

    
382
<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
383
  <desc>
384
    <p>LaTeX paper size</p>
385
  </desc>
386
</doc>
387
<xsl:param name="latexPaperSize">a4paper</xsl:param>
388
     
389
<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string"><desc>Font for literal code</desc>   </doc>
390
<xsl:param name="typewriterFont">DejaVu Sans Mono</xsl:param>
391
<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string"><desc>Font for sans-serif</desc>   </doc>
392
<xsl:param name="sansFont"></xsl:param>
393
<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string"><desc>Font for serif</desc>   </doc>
394
<xsl:param name="romanFont"></xsl:param>
395
<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string"><desc>Font for gothic</desc>   </doc>
396
<xsl:param name="gothicFont">Lucida Blackletter</xsl:param>
397
<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string"><desc>Font for calligraphic</desc>   </doc>
398
<xsl:param name="calligraphicFont">Lucida Calligraphy</xsl:param>
399

    
400
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
401
      <desc>
402
         <p>LaTeX layout preamble</p>
403
         <p>All the LaTeX setup which affects page layout</p>
404
      </desc>
405
   </doc>
406
   <xsl:template name="latexLayout">
407
     <xsl:choose>
408
       <xsl:when test="$latexPaperSize='a3paper'">
409
	 \paperwidth297mm
410
	 \paperheight420mm
411
       </xsl:when>
412
       <xsl:when test="$latexPaperSize='a5paper'">	
413
	 \paperwidth148mm
414
	 \paperheight210mm
415
       </xsl:when>
416
       <xsl:when test="$latexPaperSize='a4paper'">
417
	 \paperwidth210mm
418
	 \paperheight297mm
419
       </xsl:when>
420
       <xsl:when test="$latexPaperSize='letterpaper'">
421
	 \paperwidth216mm
422
	 \paperheight279mm
423
       </xsl:when>
424
	 <xsl:otherwise>
425
	 </xsl:otherwise>
426
       </xsl:choose>       
427
\def\@pnumwidth{1.55em}
428
\def\@tocrmarg {2.55em}
429
\def\@dotsep{4.5}
430
\setcounter{tocdepth}{3}
431
\clubpenalty=8000
432
\emergencystretch 3em
433
\hbadness=4000
434
\hyphenpenalty=400
435
\pretolerance=750
436
\tolerance=2000
437
\vbadness=4000
438
\widowpenalty=10000
439
<xsl:if test="not($docClass='letter')">
440
\renewcommand\section{\@startsection {section}{1}{\z@}%
441
     {-1.75ex \@plus -0.5ex \@minus -.2ex}%
442
     {0.5ex \@plus .2ex}%
443
     {\reset@font\Large\bfseries\sffamily}}
444
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
445
     {-1.75ex\@plus -0.5ex \@minus- .2ex}%
446
     {0.5ex \@plus .2ex}%
447
     {\reset@font\Large\sffamily}}
448
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
449
     {-1.5ex\@plus -0.35ex \@minus -.2ex}%
450
     {0.5ex \@plus .2ex}%
451
     {\reset@font\large\sffamily}}
452
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
453
     {-1ex \@plus-0.35ex \@minus -0.2ex}%
454
     {0.5ex \@plus .2ex}%
455
     {\reset@font\normalsize\sffamily}}
456
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
457
     {1.5ex \@plus1ex \@minus .2ex}%
458
     {-1em}%
459
     {\reset@font\normalsize\bfseries}}
460

    
461
</xsl:if>
462
\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
463
 \@tempdima 1.5em \begingroup
464
 \parindent \z@ \rightskip \@pnumwidth 
465
 \parfillskip -\@pnumwidth 
466
 \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
467
 \endgroup}
468
\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
469
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
470
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
471
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
472
\@ifundefined{c@section}{\newcounter{section}}{}
473
\@ifundefined{c@chapter}{\newcounter{chapter}}{}
474
\newif\if@mainmatter 
475
\@mainmattertrue
476
\def\chaptername{Chapter}
477
\def\frontmatter{%
478
  \pagenumbering{roman}
479
  \def\thechapter{\@roman\c@chapter}
480
  \def\theHchapter{\alph{chapter}}
481
  \def\@chapapp{}%
482
}
483
\def\mainmatter{%
484
  \cleardoublepage
485
  \def\thechapter{\@arabic\c@chapter}
486
  \setcounter{chapter}{0}
487
  \setcounter{section}{0}
488
  \pagenumbering{arabic}
489
  \setcounter{secnumdepth}{6}
490
  \def\@chapapp{\chaptername}%
491
  \def\theHchapter{\arabic{chapter}}
492
}
493
\def\backmatter{%
494
  \cleardoublepage
495
  \setcounter{chapter}{0}
496
  \setcounter{section}{0}
497
  \setcounter{secnumdepth}{0}
498
  \def\@chapapp{\appendixname}%
499
  \def\thechapter{\@Alph\c@chapter}
500
  \def\theHchapter{\Alph{chapter}}
501
  \appendix
502
}
503
\newenvironment{bibitemlist}[1]{%
504
   \list{\@biblabel{\@arabic\c@enumiv}}%
505
       {\settowidth\labelwidth{\@biblabel{#1}}%
506
        \leftmargin\labelwidth
507
        \advance\leftmargin\labelsep
508
        \@openbib@code
509
        \usecounter{enumiv}%
510
        \let\p@enumiv\@empty
511
        \renewcommand\theenumiv{\@arabic\c@enumiv}%
512
	}%
513
  \sloppy
514
  \clubpenalty4000
515
  \@clubpenalty \clubpenalty
516
  \widowpenalty4000%
517
  \sfcode`\.\@m}%
518
  {\def\@noitemerr
519
    {\@latex@warning{Empty `bibitemlist' environment}}%
520
    \endlist}
521

    
522
\def\tableofcontents{\section*{\contentsname}\@starttoc{toc}}
523
\parskip<xsl:value-of select="$parSkip"/>
524
\parindent<xsl:value-of select="$parIndent"/>
525
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
526
\newenvironment{reflist}{%
527
  \begin{raggedright}\begin{list}{}
528
  {%
529
   \setlength{\topsep}{0pt}%
530
   \setlength{\rightmargin}{0.25in}%
531
   \setlength{\itemsep}{0pt}%
532
   \setlength{\itemindent}{0pt}%
533
   \setlength{\parskip}{0pt}%
534
   \setlength{\parsep}{2pt}%
535
   \def\makelabel##1{\itshape ##1}}%
536
  }
537
  {\end{list}\end{raggedright}}
538
\newenvironment{sansreflist}{%
539
  \begin{raggedright}\begin{list}{}
540
  {%
541
   \setlength{\topsep}{0pt}%
542
   \setlength{\rightmargin}{0.25in}%
543
   \setlength{\itemindent}{0pt}%
544
   \setlength{\parskip}{0pt}%
545
   \setlength{\itemsep}{0pt}%
546
   \setlength{\parsep}{2pt}%
547
   \def\makelabel##1{\upshape\sffamily ##1}}%
548
  }
549
  {\end{list}\end{raggedright}}
550
\newenvironment{specHead}[2]%
551
 {\vspace{20pt}\hrule\vspace{10pt}%
552
  \hypertarget{#1}{}%
553
  \markright{#2}%
554
<xsl:text>
555
  \pdfbookmark[</xsl:text>
556
      <xsl:value-of select="$specLinkDepth"/>
557
      <xsl:text>]{#2}{#1}%
558
  \hspace{-0.75in}{\bfseries\fontsize{16pt}{18pt}\selectfont#2}%
559
  }{}
560
      </xsl:text>   
561
      <xsl:call-template name="latexPreambleHook"/>
562
   </xsl:template>
563

    
564
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
565
      <desc>
566
         <p>LaTeX setup commands for ledmac package</p>
567
      </desc>
568
   </doc>
569
<xsl:template name="ledmacOptions">
570
\renewcommand{\notenumfont}{\bfseries}
571
\lineation{page}
572
\linenummargin{inner}
573
\footthreecol{A}
574
\foottwocol{B}
575
</xsl:template>
576

    
577
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
578
      <desc>
579
         <p>LaTeX setup before start of document</p>
580
         <p>All the LaTeX setup which are executed before the start of
581
    the document</p>
582
      </desc>
583
   </doc>
584
   <xsl:template name="latexBegin">
585
      <xsl:text>
586
\makeatletter
587
\thispagestyle{empty}
588
\markright{\@title}\markboth{\@title}{\@author}
589
\renewcommand\small{\@setfontsize\small{9pt}{11pt}\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@
590
\belowdisplayskip \abovedisplayskip
591
\abovedisplayshortskip \z@ plus2\p@
592
\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
593
\def\@listi{\leftmargin\leftmargini
594
               \topsep 2\p@ plus1\p@ minus1\p@
595
               \parsep 2\p@ plus\p@ minus\p@
596
               \itemsep 1pt}
597
}
598
\makeatother
599
\fvset{frame=single,numberblanklines=false,xleftmargin=5mm,xrightmargin=5mm}
600
\fancyhf{} 
601
\setlength{\headheight}{14pt}
602
\fancyhead[LE]{\bfseries\leftmark} 
603
\fancyhead[RO]{\bfseries\rightmark} 
604
\fancyfoot[RO]{}
605
\fancyfoot[CO]{\thepage}
606
\fancyfoot[LO]{\TheID}
607
\fancyfoot[LE]{}
608
\fancyfoot[CE]{\thepage}
609
\fancyfoot[RE]{\TheID}
610
\hypersetup{linkbordercolor=0.75 0.75 0.75,urlbordercolor=0.75 0.75 0.75,bookmarksnumbered=true}
611
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}</xsl:text>
612
   </xsl:template>
613

    
614
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout">
615
      <desc>
616
         <p>LaTeX setup at end of document</p>
617
         <p>All the LaTeX setup which are executed at the end of
618
    the document</p>
619
      </desc>
620
   </doc>
621
   <xsl:template name="latexEnd">
622
</xsl:template>
623

    
624
   <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
625
      <desc>[latex] Title banner </desc>
626
   </doc>
627
   <xsl:template name="printTitleAndLogo">
628
\makeatletter
629
\noindent\parbox[b]{.75\textwidth}{\fontsize{14pt}{16pt}\bfseries\raggedright\sffamily\selectfont \@title}
630
\vskip20pt
631
\par\noindent{\fontsize{11pt}{13pt}\sffamily\itshape\raggedright\selectfont\@author\hfill\TheDate}
632
\vspace{18pt}
633
\makeatother
634
</xsl:template>
635

    
636
  
637

    
638
</xsl:stylesheet>