A TEI Project

TEI XSL Customization Handbook

Table of contents

1. Introduction

This section describes how to produce a customization of the TEI stylesheets. It describes all the parameters which you can set, the templates which are designed to be changed, and the empty templates provided into which you can add your own code.

There are 13 areas for customization. In most cases there are parameters and templates which are specific to one of the three output methods (HTML, FO and LaTeX), and those which are common to all three.

2. Making HTML: example

You can simply refer to the specification xhtml2/tei.xsl directly with your XSL processor, or install it locally on your own server. For more flexibility, you may prefer to reference the specifications from an XSL wrapper of your own. The minimal specification would look like this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:import href="xhtml2/tei.xsl"/> </xsl:stylesheet>
You can customize the result by adding to this wrapper file. The normal result will be a single stream of HTML which you can save in a file. You can also configure it to produce multiple output files, one per top-level <div> or <div1>.

4. Layout

There are three ways to provide a constant navigation aid. You can either make the whole page into a table, where the first column has a table of contents, or you can make an HTML frameset, or you can just have a table of links on the left or right

Hypertext links present special problems, as we have to choose whether they should start a new window, occupy all of the current window, or stay within the frame. These stylesheets implement the following rules:
  1. Any <ref> or <ptr> link stays within the frame
  2. Any link containing ‘://’ uses the whole browser window
  3. Any link starting ‘.’ uses the whole browser window
  4. If the stylesheet sets no splitting of the document, any <ref> or <ptr> link uses the whole browser window
  5. If a <ref> or <ptr> link has a rend attribute value of ‘noframe’, the whole browser window is used
  6. If a <ref> or <ptr> link has a rend attribute value of ‘new’, a new browser window is started

4.1. Variables

Type Name Description Default
oddWeaveLite Whether to make simplified display of ODD [boolean] false
parIndent Paragraph indentation [string] 1em
parSkip Default spacing between paragraphs [string] 0pt
xhtml filePerPage Whether we should construct a separate file for each page (based on page breaks) [boolean] false
xhtml viewPortWidth When making fixed format epub, width of viewport [number] 1200
xhtml viewPortHeight When making fixed format epub, height of viewport [number] 1700
xhtml consecutiveFNs Number footnotes consecutively [boolean] false
xhtml footnoteBackLink Link back from footnotes to reference [boolean] false
xhtml contentStructure How to use the front/body/back matter in creating columns. The choice is between all: use <front> for left-hand column, use <body> for centre column, and use <back> for right-hand columnbody: use <body> for right-hand column, generate left-hand with a TOC or whatever [string] body
xhtml divOffset The difference between TEI div levels and HTML. headings. TEI <div>s are implicitly or explicitly numbered from 0 upwards; this offset is added to that number to produce an HTML <Hn> element. So a value of 2 here means that a <div1> will generate an <h2> [integer] 2
xhtml footnoteFile Make a separate file for footnotes [boolean] false
xhtml linksWidth Width of left-hand column when $pageLayout is "Table" [string] 15%
xhtml navbarFile XML resource defining a navigation bar. The XML should provide a <list> containing a series of <item> elements, each containing an <xref> link. [anyURI]
xhtml autoEndNotes Make all notes into endnotes [boolean] false
fo backMulticolumns Put back matter in multiple columns [boolean] false
fo bodyMarginBottom Margin at bottom of text body [string] 24pt
fo bodyMarginTop Margin at top of text body [string] 24pt
fo bodyMulticolumns Put body matter in multiple columns [boolean] false
fo bulletFour Symbol for 4th level itemized list [string] +
fo bulletOne Symbol for top-level itemized list [string]
fo bulletThree Symbol for 3rd level itemized list [string] *
fo bulletTwo Symbol for 2nd level itemized list [string]
fo columnCount Number of columns, when multiple-column work is requested [integer] 1
fo betweenStarts XSL FO "provisional-distance-between starts" [string] 18pt
fo betweenGlossStarts XSL FO "provisional-distance-between starts" for gloss lists [string] 42pt
fo betweenBiblStarts XSL FO "provisional-distance-between starts" for bibliographies [string] 14pt
fo divRunningheads Display section headings in running heads [boolean] false
fo exampleAfter Space below examples [string] 4pt
fo exampleBefore Space above examples [string] 4pt
fo exampleMargin Left margin for examples [string] 12pt
fo flowMarginLeft Left margin of flow [string]
fo forcePageMaster Which named page master name to use [string]
fo formatBackpage How to format page numbers in back matter (use XSLT number format) [string] 1
fo formatBodypage How to format page numbers in main matter (use XSLT number format) [string] 1
fo formatFrontpage How to format page numbers in front matter (use XSLT number format) [string] i
fo frontMulticolumns Put front matter in multiple columns [boolean] false
fo labelSeparation XSL FO "provisional-label-separation" [string] 6pt
fo listAbove-1 Space above lists at top level [string] 6pt
fo listAbove-2 Space above lists at 2nd level [string] 4pt
fo listAbove-3 Space above lists at 3rd level [string] 0pt
fo listAbove-4 Space above lists at 4th level [string] 0pt
fo listBelow-1 Space below lists at top level [string] 6pt
fo listBelow-2 Space below lists at 2nd level [string] 4pt
fo listBelow-3 Space below lists at 3rd level [string] 0pt
fo listBelow-4 Space below lists at 4th level [string] 0pt
fo listItemsep Spacing between list items [string] 4pt
fo listLeftGlossIndent Left margin for gloss lists [string] 0.5in
fo listLeftGlossInnerIndent Left margin for nested gloss lists [string] 0.25in
fo listLeftIndent Indentation for lists [string] 0pt
fo listRightMargin Right margin for lists [string] 10pt
fo pageHeight Paper height [string] 297mm
fo pageMarginBottom Margin at bottom of text area [string] 100pt
fo pageMarginLeft Left margin [string] 80pt
fo pageMarginRight Right margin [string] 150pt
fo pageMarginTop Margin at top of text area [string] 75pt
fo pageWidth Paper width [string] 211mm
fo parSkipmax Maximum space allowed between paragraphs [string] 12pt
fo readColSpecFile External XML file containing specifications for column sizes for tables in document [anyURI]
fo regionAfterExtent Region after [string] 14pt
fo regionBeforeExtent Region before [string] 14pt
fo sectionHeaders Construct running headers from page number and section headings [boolean] true
fo spaceAfterBibl Space after bibliography [string] 0pt
fo spaceAroundTable Space above and below a table [string] 8pt
fo spaceBeforeBibl Space above bibliography [string] 4pt
fo spaceBelowCaption Space below caption of figure or table [string] 4pt
fo titlePage Make title page [boolean] true
fo twoSided Make 2-page spreads [boolean] true
latex classParameters Optional parameters for documentclass [string] 11pt,twoside
latex latexLogo Logo graphics file [string]
latex pagebreakStyle 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). [float]
latex tableMaxWidth When making a table, what width must be constrained to fit, as a proportion of the page width. [float] 0.85
latex verseNumbering Whether to number lines of poetry [boolean] false
latex everyHowManyLines When numbering poetry, how often to put in a line number [integer] 5
latex resetVerseLineNumbering When numbering poetry, when to restart the sequence; this must be the name of a TEI element [string] div1
latex latexPaperSize LaTeX paper size [] a4paper

4.2. Templates

columnHeader
(for xhtml) [html] Banner for top of column
hdr
(for xhtml) [html] Header section across top of page
<xsl:call-template name="pageHeader"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:with-param name="mode"/> </xsl:call-template>
hdr2
(for xhtml) [html] Navigation bar
<xsl:call-template name="navbar"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
preBreadCrumbPath
(for xhtml) [html] Text or action to take at the start of the breadcrumb trail
hdr3
(for xhtml) [html] Breadcrumb trail
<html:a href="#rh-col" title="Go to main page content" class="skiplinks"    xmlns:html="http://www.w3.org/1999/xhtml">Skip links</html:a> <html:a class="hide">|</html:a> <xsl:call-template name="crumbPath"/> <html:a class="hide">|</html:a> <html:a class="bannerright" href="{$parentURL}" title="Go to home page">  <xsl:value-of select="$parentWords"/> </html:a>
lh-col-bottom
(for xhtml) [html]Bottom of left-hand columnID of selected section
<xsl:param name="currentID"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:call-template name="leftHandFrame">  <xsl:with-param name="currentID" select="$currentID"/> </xsl:call-template>
lh-col-top
(for xhtml) [html]Top of left-hand column
<xsl:call-template name="searchbox"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:call-template name="printLink"/>
logoPicture
(for xhtml) [html] Logo
<html:a   class="framelogo"   href="http://www.tei-c.org/Stylesheets/"    xmlns:html="http://www.w3.org/1999/xhtml">  <html:img    src="http://www.tei-c.org/release/common/doc/tei-xsl-common/teixsl.png"    vspace="5"    width="124"    height="161"    border="0"    alt="created by TEI XSL Stylesheets"/> </html:a>
metaHTML
(for xhtml) [html] Making elements in HTML <head>The text used to create the DC.Title field in the HTML header
<xsl:param name="title"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <html:meta name="author">  <xsl:attribute name="content">   <xsl:call-template name="generateAuthor"/>  </xsl:attribute> </html:meta> <xsl:if test="$filePerPage='true'">  <html:meta    name="viewport"    content="width={$viewPortWidth}, height={$viewPortHeight}"/> </xsl:if> <html:meta   name="generator"   content="Text Encoding Initiative Consortium XSLT stylesheets"/> <xsl:choose>  <xsl:when test="$outputTarget='html5'">   <html:meta charset="utf-8"/>  </xsl:when>  <xsl:otherwise>   <html:meta     http-equiv="Content-Type"     content="text/html; charset={$outputEncoding}"/>   <html:meta name="DC.Title">    <xsl:attribute name="content">     <xsl:value-of       select="normalize-space(translate($title,'<>','〈〉'))"/>    </xsl:attribute>   </html:meta>   <html:meta name="DC.Type" content="Text"/>   <html:meta name="DC.Format" content="text/html"/>  </xsl:otherwise> </xsl:choose>
navbar
(for xhtml) [html] Construction of navigation bar A file is looked for relative to the stylesheet (the second parameter of the document function), which is expected to contain a TEI <list> where each <item> has an embedded <xref>
<xsl:choose    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"    xmlns:html="http://www.w3.org/1999/xhtml">  <xsl:when test="$navbarFile=''">   <xsl:comment>no nav bar</xsl:comment>  </xsl:when>  <xsl:otherwise>   <xsl:for-each select="document($navbarFile,document(''))">    <xsl:for-each select="tei:list/tei:item">     <html:span class="navbar">      <html:a href="{$URLPREFIX}{tei:xref/@url}" class="navbar">       <xsl:apply-templates select="tei:xref/text()"/>      </html:a>     </html:span>     <xsl:if test="following-sibling::tei:item"> | </xsl:if>    </xsl:for-each>   </xsl:for-each>  </xsl:otherwise> </xsl:choose>
pageHeader
(for xhtml) [html] Banner for top of pagelayout mode
<xsl:param name="mode"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:choose>  <xsl:when test="$mode='table'">   <html:table width="100%" border="0">    <html:tr>     <html:td       height="98"       class="bgimage"       onclick="window.location='{$homeURL}'"       cellpadding="0">      <xsl:call-template name="makeHTMLHeading">       <xsl:with-param name="class">subtitle</xsl:with-param>       <xsl:with-param name="text">        <xsl:call-template name="generateSubTitle"/>       </xsl:with-param>       <xsl:with-param name="level">2</xsl:with-param>      </xsl:call-template>      <xsl:call-template name="makeHTMLHeading">       <xsl:with-param name="class">title</xsl:with-param>       <xsl:with-param name="text">        <xsl:call-template name="generateTitle"/>       </xsl:with-param>       <xsl:with-param name="level">1</xsl:with-param>      </xsl:call-template>     </html:td>     <html:td valign="top"/>    </html:tr>   </html:table>  </xsl:when>  <xsl:otherwise>   <xsl:call-template name="makeHTMLHeading">    <xsl:with-param name="class">subtitle</xsl:with-param>    <xsl:with-param name="text">     <xsl:call-template name="generateSubTitle"/>    </xsl:with-param>    <xsl:with-param name="level">2</xsl:with-param>   </xsl:call-template>   <xsl:call-template name="makeHTMLHeading">    <xsl:with-param name="class">title</xsl:with-param>    <xsl:with-param name="text">     <xsl:call-template name="generateTitle"/>    </xsl:with-param>    <xsl:with-param name="level">1</xsl:with-param>   </xsl:call-template>  </xsl:otherwise> </xsl:choose>
rh-col-bottom
(for xhtml) [html] Bottom of right-hand columnID of selected section
<xsl:param name="currentID"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:call-template name="mainFrame">  <xsl:with-param name="currentID" select="$currentID"/> </xsl:call-template>
rh-col-top
(for xhtml) [html] Top of right-hand column
<xsl:call-template name="columnHeader"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
searchbox
(for xhtml) [html] Make a search box
singleFileLabel
(for xhtml) [html] Construct a label for the link which makes a printable version of the document.For Printing
latexPackages
(for latex) LaTeX package setup Declaration of the LaTeX packages needed to implement this markup
<xsl:text    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\usepackage[</xsl:text> <xsl:value-of select="$latexPaperSize"/> <xsl:text>,</xsl:text> <xsl:value-of select="$latexGeometryOptions"/> <xsl:text>]{geometry} \usepackage{framed} </xsl:text> <xsl:text>\definecolor{shadecolor}{gray}{0.95} \usepackage{longtable} \usepackage[normalem]{ulem} \usepackage{fancyvrb} \usepackage{fancyhdr} \usepackage{graphicx} </xsl:text> <xsl:if test="key('ENDNOTES',1)"> \usepackage{endnotes} <xsl:choose>   <xsl:when test="key('FOOTNOTES',1)"> \def\theendnote{\@alph\c@endnote}   </xsl:when>   <xsl:otherwise> \def\theendnote{\@arabic\c@endnote}   </xsl:otherwise>  </xsl:choose> </xsl:if> <xsl:text>\def\Gin@extensions{.pdf,.png,.jpg,.mps,.tif} </xsl:text> <xsl:choose>  <xsl:when test="$reencode='true'">   <xsl:text>\IfFileExists{tipa.sty}{\usepackage{tipa}}{}      \usepackage{times}   </xsl:text>  </xsl:when> </xsl:choose> <xsl:if test="not($userpackage='')"> \usepackage{<xsl:value-of select="$userpackage"/>} </xsl:if> <xsl:text> \pagestyle{fancy} </xsl:text> \usepackage[pdftitle={<xsl:call-template name="generateSimpleTitle"/>}, pdfauthor={<xsl:call-template name="generateAuthor"/>}]{hyperref} \hyperbaseurl{<xsl:value-of select="$baseURL"/>} <xsl:if test="count(key('APP',1))>0">\usepackage{ledmac} <xsl:call-template name="ledmacOptions"/> </xsl:if>
latexSetup
(for latex) LaTeX setup The basic LaTeX setup which you should not really tinker with unless you really understand why and how. Note that we need to set up a mapping here for Unicode 8421, 10100 and 10100 to glyphs for backslash and the two curly brackets, to provide literal characters. The normal characters remain active for LaTeX commands. Note that if $reencode is set to false, no input or output encoding packages are loaded, since it is assumed you are using a TeX variant capable of dealing with UTF-8 directly.
<xsl:call-template name="latexSetupHook"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> \IfFileExists{xcolor.sty}% {\RequirePackage{xcolor}}% {\RequirePackage{color}} \usepackage{colortbl} <xsl:choose>  <xsl:when test="$reencode='true'">\IfFileExists{utf8x.def}%    {\usepackage[utf8x]{inputenc}}%    {\usepackage[utf8]{inputenc}}    \PrerenderUnicode{–}  <xsl:call-template name="latexBabel"/>    \usepackage[T1]{fontenc}    \usepackage{float}    \usepackage[]{ucs}    \uc@dclc{8421}{default}{\textbackslash }    \uc@dclc{10100}{default}{\{}    \uc@dclc{10101}{default}{\}}    \uc@dclc{8491}{default}{\AA{}}    \uc@dclc{8239}{default}{\,}    \uc@dclc{20154}{default}{ }    \def\textschwa{\rotatebox{-90}{e}}    \def\textJapanese{}    \def\textChinese{}  </xsl:when>  <xsl:otherwise>\usepackage{fontspec}    \usepackage{xunicode}    \catcode`⃥=\active \def⃥{\textbackslash}    \catcode`❴=\active \def❴{\{}    \catcode`❵=\active \def❵{\}}    \def\textJapanese{\fontspec{Kochi Mincho}}    \def\textChinese{\fontspec{HAN NOM A}\XeTeXlinebreaklocale "zh"\XeTeXlinebreakskip = 0pt plus 1pt }    \def\textKorean{\fontspec{Baekmuk Gulim} }    \setmonofont{<xsl:value-of select="$typewriterFont"/>}  <xsl:if test="not($sansFont='')"> \setsansfont{<xsl:value-of select="$sansFont"/>}   </xsl:if>   <xsl:if test="not($romanFont='')"> \setromanfont{<xsl:value-of select="$romanFont"/>}   </xsl:if>  </xsl:otherwise> </xsl:choose> \DeclareTextSymbol{\textpi}{OML}{25} \usepackage{relsize} \def\textsubscript#1{% \@textsubscript{\selectfont#1}} \def\@textsubscript#1{% {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} \def\textquoted#1{‘#1’} \def\textsmall#1{{\small #1}} \def\textlarge#1{{\large #1}} \def\textoverbar#1{\ensuremath{\overline{#1}}} \def\textgothic#1{{\fontspec{<xsl:value-of select="$gothicFont"/>}#1}} \def\textcal#1{{\fontspec{<xsl:value-of select="$calligraphicFont"/>}#1}} \RequirePackage{array} \def\@testpach{\@chclass \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else \ifnum \@lastchclass=7 5 \else \ifnum \@lastchclass=8 \tw@ \else \ifnum \@lastchclass=9 \thr@@ \else \z@ \ifnum \@lastchclass = 10 \else \edef\@nextchar{\expandafter\string\@nextchar}% \@chnum \if \@nextchar c\z@ \else \if \@nextchar l\@ne \else \if \@nextchar r\tw@ \else \z@ \@chclass \if\@nextchar |\@ne \else \if \@nextchar !6 \else \if \@nextchar @7 \else \if \@nextchar (8 \else \if \@nextchar )9 \else 10 \@chnum \if \@nextchar m\thr@@\else \if \@nextchar p4 \else \if \@nextchar b5 \else \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi} \gdef\arraybackslash{\let\\=\@arraycr} \def\textxi{\ensuremath{\xi}} \def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}} <xsl:text disable-output-escaping="yes">\newcolumntype{L}[1]{){\raggedright\arraybackslash}p{#1}} \newcolumntype{C}[1]{){\centering\arraybackslash}p{#1}} \newcolumntype{R}[1]{){\raggedleft\arraybackslash}p{#1}} \newcolumntype{P}[1]{){\arraybackslash}p{#1}} \newcolumntype{B}[1]{){\arraybackslash}b{#1}} \newcolumntype{M}[1]{){\arraybackslash}m{#1}} \definecolor{label}{gray}{0.75} \DeclareRobustCommand*{\xref}{\hyper@normalise\xref@} \def\xref@#1#2{\hyper@linkurl{#2}{#1}} \def\Div[#1]#2{\section*{#2}} \begingroup \catcode`\_=\active \gdef_#1{\ensuremath{\sb{\mathrm{#1}}}} \endgroup \mathcode`\_=\string"8000 \catcode`\_=12\relax </xsl:text>
latexBabel
(for latex) LaTeX babel setup LaTeX loading of babel with options \usepackage[english]{babel}
latexLayout
(for latex) LaTeX layout preamble All the LaTeX setup which affects page layout
<xsl:choose    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:when test="$latexPaperSize='a3paper'">\paperwidth297mm    \paperheight420mm  </xsl:when>  <xsl:when test="$latexPaperSize='a5paper'">    \paperwidth148mm    \paperheight210mm  </xsl:when>  <xsl:when test="$latexPaperSize='a4paper'">\paperwidth210mm    \paperheight297mm  </xsl:when>  <xsl:when test="$latexPaperSize='letterpaper'">\paperwidth216mm    \paperheight279mm  </xsl:when>  <xsl:otherwise/> </xsl:choose> \def\@pnumwidth{1.55em} \def\@tocrmarg {2.55em} \def\@dotsep{4.5} \setcounter{tocdepth}{3} \clubpenalty=8000 \emergencystretch 3em \hbadness=4000 \hyphenpenalty=400 \pretolerance=750 \tolerance=2000 \vbadness=4000 \widowpenalty=10000 <xsl:if test="not($docClass='letter')">\renewcommand\section{\@startsection {section}{1}{\z@}% {-1.75ex \@plus -0.5ex \@minus -.2ex}% {0.5ex \@plus .2ex}% {\reset@font\Large\bfseries\sffamily}} \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% {-1.75ex\@plus -0.5ex \@minus- .2ex}% {0.5ex \@plus .2ex}% {\reset@font\Large\sffamily}} \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-1.5ex\@plus -0.35ex \@minus -.2ex}% {0.5ex \@plus .2ex}% {\reset@font\large\sffamily}} \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {-1ex \@plus-0.35ex \@minus -0.2ex}% {0.5ex \@plus .2ex}% {\reset@font\normalsize\sffamily}} \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {1.5ex \@plus1ex \@minus .2ex}% {-1em}% {\reset@font\normalsize\bfseries}} </xsl:if> \def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt} \@tempdima 1.5em \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par \endgroup} \def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} \def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} \def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} \def\l@subparagraph{\@dottedtocline{5}{10em}{5em}} \@ifundefined{c@section}{\newcounter{section}}{} \@ifundefined{c@chapter}{\newcounter{chapter}}{} \newif\if@mainmatter \@mainmattertrue \def\chaptername{Chapter} \def\frontmatter{% \pagenumbering{roman} \def\thechapter{\@roman\c@chapter} \def\theHchapter{\alph{chapter}} \def\@chapapp{}% } \def\mainmatter{% \cleardoublepage \def\thechapter{\@arabic\c@chapter} \setcounter{chapter}{0} \setcounter{section}{0} \pagenumbering{arabic} \setcounter{secnumdepth}{6} \def\@chapapp{\chaptername}% \def\theHchapter{\arabic{chapter}} } \def\backmatter{% \cleardoublepage \setcounter{chapter}{0} \setcounter{section}{0} \setcounter{secnumdepth}{0} \def\@chapapp{\appendixname}% \def\thechapter{\@Alph\c@chapter} \def\theHchapter{\Alph{chapter}} \appendix } \newenvironment{bibitemlist}[1]{% \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}% }% \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m}% {\def\@noitemerr {\@latex@warning{Empty `bibitemlist' environment}}% \endlist} \def\tableofcontents{\section*{\contentsname}\@starttoc{toc}} \parskip<xsl:value-of select="$parSkip"/> \parindent<xsl:value-of select="$parIndent"/> \def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}} \newenvironment{reflist}{% \begin{raggedright}\begin{list}{} {% \setlength{\topsep}{0pt}% \setlength{\rightmargin}{0.25in}% \setlength{\itemsep}{0pt}% \setlength{\itemindent}{0pt}% \setlength{\parskip}{0pt}% \setlength{\parsep}{2pt}% \def\makelabel##1{\itshape ##1}}% } {\end{list}\end{raggedright}} \newenvironment{sansreflist}{% \begin{raggedright}\begin{list}{} {% \setlength{\topsep}{0pt}% \setlength{\rightmargin}{0.25in}% \setlength{\itemindent}{0pt}% \setlength{\parskip}{0pt}% \setlength{\itemsep}{0pt}% \setlength{\parsep}{2pt}% \def\makelabel##1{\upshape\sffamily ##1}}% } {\end{list}\end{raggedright}} \newenvironment{specHead}[2]% {\vspace{20pt}\hrule\vspace{10pt}% \hypertarget{#1}{}% \markright{#2}% <xsl:text> \pdfbookmark[</xsl:text> <xsl:value-of select="$specLinkDepth"/> <xsl:text>]{#2}{#1}% \hspace{-0.75in}{\bfseries\fontsize{16pt}{18pt}\selectfont#2}% }{} </xsl:text> <xsl:call-template name="latexPreambleHook"/>
ledmacOptions
(for latex) LaTeX setup commands for ledmac package \renewcommand{\notenumfont}{\bfseries} \lineation{page} \linenummargin{inner} \footthreecol{A} \foottwocol{B}
latexBegin
(for latex) LaTeX setup before start of document All the LaTeX setup which are executed before the start of the document
<xsl:text    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\makeatletter \thispagestyle{empty} \markright{\@title}\markboth{\@title}{\@author} \renewcommand\small{\@setfontsize\small{9pt}{11pt}\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@ \belowdisplayskip \abovedisplayskip \abovedisplayshortskip \z@ plus2\p@ \belowdisplayshortskip 4\p@ plus2\p@ minus2\p@ \def\@listi{\leftmargin\leftmargini \topsep 2\p@ plus1\p@ minus1\p@ \parsep 2\p@ plus\p@ minus\p@ \itemsep 1pt} } \makeatother \fvset{frame=single,numberblanklines=false,xleftmargin=5mm,xrightmargin=5mm} \fancyhf{} \setlength{\headheight}{14pt} \fancyhead[LE]{\bfseries\leftmark} \fancyhead[RO]{\bfseries\rightmark} \fancyfoot[RO]{} \fancyfoot[CO]{\thepage} \fancyfoot[LO]{\TheID} \fancyfoot[LE]{} \fancyfoot[CE]{\thepage} \fancyfoot[RE]{\TheID} \hypersetup{linkbordercolor=0.75 0.75 0.75,urlbordercolor=0.75 0.75 0.75,bookmarksnumbered=true} \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}</xsl:text>
latexEnd
(for latex) LaTeX setup at end of document All the LaTeX setup which are executed at the end of the document

5. Headings

Headings for sections can be customized in various ways.

5.1. Variables

Type Name Description Default
autoHead Construct a heading for <div> elements with no <head> [boolean]
numberSpacer Character to put after number of section header [string]
<xsl:text    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

5.2. Templates

autoMakeHead
(for common) [common] How to make a heading for section if there is no <head>
<xsl:param name="display"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:choose>  <xsl:when test="tei:head and $display='full'">   <xsl:apply-templates select="tei:head" mode="makeheading"/>  </xsl:when>  <xsl:when test="tei:head">   <xsl:apply-templates select="tei:head" mode="plain"/>  </xsl:when>  <xsl:when test="tei:front/tei:head">   <xsl:apply-templates select="tei:front/tei:head" mode="plain"/>  </xsl:when>  <xsl:when test="@n">   <xsl:value-of select="@n"/>  </xsl:when>  <xsl:when test="@type">   <xsl:text>[</xsl:text>   <xsl:value-of select="@type"/>   <xsl:text>]</xsl:text>  </xsl:when>  <xsl:otherwise>   <xsl:text></xsl:text>  </xsl:otherwise> </xsl:choose>
headingNumberSuffix
(for common) Punctuation to insert after a section number
<xsl:text    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">.</xsl:text> <xsl:value-of select="$numberSpacer"/>

6. Numbering

Section headings, figures, tables and notes can be numbered automatically. We can set the numbering of front matter and back matter separately. If you prefer to supply your own numbering, using the n attribute, you can choose this over automatic numbering.

Normally, heading numbers are followed by ‘. ’, but you can vary this. This would let you use eg fixed spaces.

6.1. Variables

Type Name Description Default
numberBackFigures Automatically number figures in back matter [boolean] false
numberBackHeadings How to construct heading numbering in back matter [string] A.1
numberBackTables Automatically number tables in back matter [boolean] true
numberBodyHeadings How to construct heading numbering in main matter [string] 1.1.1.1
numberFigures Automatically number figures [boolean] true
numberFrontFigures Automatically number figures in front matter [boolean] false
numberFrontHeadings How to construct heading numbering in front matter [string]
numberFrontTables Automatically number tables in front matter [boolean] true
numberHeadings Automatically number sections [boolean] true
numberHeadingsDepth Depth to which sections should be numbered [integer] 9
numberTables Automatically number tables [boolean] true
numberParagraphs Use value of "n" attribute to number sections [boolean] false
numberParagraphs Automatically number paragraphs. [boolean] false

6.2. Templates

numberBackDiv
(for common) [common] How to number sections in back matter
<xsl:if test="not($numberBackHeadings='')"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:number    count="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6"    format="A.1.1.1.1.1"    level="multiple"/> </xsl:if>
numberBodyDiv
(for common) [common] How to number sections in main matter
<xsl:if test="$numberHeadings='true'"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:number    count="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6"    level="multiple"/> </xsl:if>
numberFrontDiv
(for common) [common] How to number sections in front matter
<xsl:param name="minimal"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:number   count="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6"   level="multiple"/> <xsl:if test="$minimal='false'">  <xsl:value-of select="$numberSpacer"/> </xsl:if>

7. Output

You can set a name for the output file(s); if you ask for multiple output files, this name will be used to create unique filenames for each section. By default, results will go to wherever your XSLT processor normally writes (usually standard output). If you opt to have files created, you can specify the name of the directory where the output is to be placed.

If you are making HTML, do you want a single output page, or a separate one for each section of the document? You can decide to have a different splitting policy for front and back matter.

7.1. Variables

Type Name Description Default
outputTarget Type of output being generated [string] html
REQUEST The complete URL when the document is being delivered from a web server (normally set by Apache or Cocoon) [string]
STDOUT Write to standard output channel [boolean] true
xhtml ID An ID passed to the stylesheet to indicate which section to display [string]
xhtml requestedID A wrapper around the ID, to allow for other ways of getting it [string]
<xsl:value-of   select="$ID"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
xhtml URLPREFIX A path fragment to put before all internal URLs [string]
xhtml outputName The name of the output file [string]
xhtml outputDir Directory in which to place generated files. [string]
xhtml outputEncoding Encoding of output file(s). [string] utf-8
xhtml outputMethod Output method for output file(s). [string] xhtml
xhtml outputSuffix Suffix of output file(s). [string] .html
xhtml doctypePublic Public Doctype of output file(s). [string] -//W3C//DTD XHTML 1.0 Transitional//EN
xhtml doctypeSystem System Doctype of output file(s). [string] http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
xhtml pageLayout The style of HTML (Simple, CSS or Table) which creates the layout for generated pages. The choice is between Simple: A linear presentation is createdCSS: The page is created as a series of nested <div>s which can be arranged using CSS into a multicolumn layoutTable: The page is created as an HTML table [string] Simple
xhtml splitBackmatter Break back matter into separate HTML pages (if splitting enabled). [boolean] true
xhtml splitFrontmatter Break front matter into separate HTML pages (if splitting enabled). [boolean] true
xhtml splitLevel Level at which to split sections. When processing a <div> or <div[0-5]>, compare the nesting depth and see whether to start a new HTML page. Since the TEI starts with <div1>, setting this parameter to 0 will cause top-level sections to be split apart. The default is not to split at all. [integer] -1
xhtml standardSuffix Suffix for generated output files. [string]
<xsl:choose    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:when    test="tei:teiCorpus">.html</xsl:when>  <xsl:when    test="$STDOUT='true'"/>  <xsl:otherwise>   <xsl:value-of     select="$outputSuffix"/>  </xsl:otherwise> </xsl:choose>
xhtml topNavigationPanel Display navigation panel at top of pages. [boolean] true
xhtml urlChunkPrefix How to specify infra-document links. When a document is split, links need to be constructed between parts of the document. The default is to use a query parameter on the URL. [string] ?ID=
xhtml useIDs Construct links using existing ID values. It is often nice if, when making separate files, their names correspond to the ID attribute of the >div<. Alternatively, you can let the system choose names. [boolean] true
fo language Language (for hyphenation) [string] en_US
fo foEngine Name of intended XSL FO engine This is used to tailor the result for different XSL FO processors. By default, no special measures are taken, so there are no bookmarks or other such features. Possible values are passivetex (the TeX-based PassiveTeX processor xep (XEP) fop (FOP) antenna (Antenna House) [string]
latex baseURL URL root where referenced documents are located [string]
latex reencode Whether or not to load LaTeX packages which attempt to process the UTF-8 characters. Set to "false" if you are using XeTeX or similar. [boolean] true
latex realFigures Use real name of graphics files rather than pointers [boolean] true

7.2. Templates

8. Table of contents generation

You probably want tables of contents built for your document, using the <div> structure. However, if you have used a <divGen type="toc"> explicitly, that will also create a table of contents, so you can suppress the automatic one. When a table of contents is created, you choose how many levels of headings it will show. You can choose whether or not the front and backmatter appear in the table of contents.

8.1. Variables

Type Name Description Default
xhtml autoToc Make an automatic table of contents [boolean] true
xhtml class_subtoc CSS class for second-level TOC entries [string] subtoc
xhtml subTocDepth Depth at which to stop doing a recursive table of contents. You can have a mini table of contents at the start of each section. The default is only to construct a TOC at the top level; a value of -1 here means no subtoc at all. [integer] -1
xhtml tocBack Include the back matter in the table of contents. [boolean] true
xhtml tocDepth Depth to which table of contents is constructed. [string] 5
xhtml tocFront Include the front matter in the table of contents. [boolean] true
xhtml tocElement Which HTML element to wrap each TOCs entry in. [string] p
xhtml tocContainerElement Which HTML element to wrap each TOC sections in. [string] div
xhtml refDocFooterText Text to link back to from foot of ODD reference pages [string] TEI Guidelines
xhtml refDocFooterURL URL to link back to from foot of ODD reference pages [anyURI] index.html
fo div0Tocindent Indentation for level 0 TOC entries [string] 0in
fo div1Tocindent Indentation for level 1 TOC entries [string] 0.25in
fo div2Tocindent Indentation for level 2 TOC entries [string] 0.5in
fo div3Tocindent Indentation for level 3 TOC entries [string] 0.75in
fo div4Tocindent Indentation for level 4 TOC entries [string] 1in
fo div5Tocindent Indentation for level 5 TOC entries [string] 1.25in
fo tocBack Make TOC for sections in <back> [boolean] true
fo tocFront Make TOC for sections in <front> [boolean] true
fo tocNumberSuffix Punctuation to insert after a section number in a TOC [string] .
fo tocStartPage Page number on which TOC should start [integer] 1

8.2. Templates

9. Internationalization

At various places, the system has to create text. You can choose the words it uses (eg translate them to another language).

9.1. Variables

Type Name Description Default

9.2. Templates

copyrightStatement
(for xhtml) [html] Make a copyright claimThis page is copyrighted

10. CSS

Setting up material for the CSS file to accompany HTML output.

10.1. Variables

Type Name Description Default
class_toc CSS class for TOC entries [string] toc
xhtml class_ptr CSS class for links derived from <ptr> [string] ptr
xhtml class_ref CSS class for links derived from <ref> [string] ref
xhtml cssFile CSS style file to be associated with output file(s) [anyURI] http://www.tei-c.org/release/xml/tei/stylesheet/tei.css
xhtml cssPrintFile CSS style file for print; this will be given a media=print attribute. [anyURI] http://www.tei-c.org/release/xml/tei/stylesheet/tei-print.css
xhtml cssSecondaryFile Secondary CSS style file; this will be given a media=screen attribute, so that it does not affect printing. It should be used for screen layout. [anyURI]
xhtml cssInlineFile CSS file to include in the output file directly [anyURI]

10.2. Templates

11. Tables

Default behaviour of table elements.

11.1. Variables

Type Name Description Default
cellAlign Default alignment of table cells [string] left
tableAlign Default alignment of tables [string] left
fo defaultCellLabelBackground Default colour for background of table cells which are labelling rows or columns [string] silver
fo inlineTables Force tables to appear inline [boolean] false
fo makeTableCaption Put a caption on tables [boolean] true
fo tableCaptionAlign Alignment of table captions [string] center
fo tableCellPadding Default padding on table cells [string] 2pt

11.2. Templates

tableCaptionstyle
(for fo) [fo] Set attributes for display of table
<xsl:attribute name="text-align"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">center</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:attribute name="end-indent">  <xsl:value-of select="$exampleMargin"/> </xsl:attribute> <xsl:attribute name="start-indent">  <xsl:value-of select="$exampleMargin"/> </xsl:attribute> <xsl:attribute name="space-before">  <xsl:value-of select="$spaceAroundTable"/> </xsl:attribute> <xsl:attribute name="space-after">  <xsl:value-of select="$spaceBelowCaption"/> </xsl:attribute> <xsl:attribute name="keep-with-next">always</xsl:attribute>

12. Figures and graphics

Sometimes you need to prefix the names of all graphics files with a directory name or a URL, or provide a default suffix. You can also tell <figure> elements whether or not to produce anything.

12.1. Variables

Type Name Description Default
graphicsPrefix Directory specification to put before names of graphics files, unless they start with "./" [string]
graphicsSuffix Default file suffix for graphics files, if not directly specified [string] .png
standardScale Scaling of imported graphics [decimal] 1
xhtml dpi Resolution of images. This is needed to calculate HTML width and height (in pixels) from supplied dimensions. [integer] 96
xhtml showFigures Display figures. [boolean] true
fo autoScaleFigures How to scale figures if no width and height specified (pass to XSL FO content-width) [string]
fo captionInlineFigures Put captions on inline figures [boolean] false
fo showFloatHead Show the contents of <head> in a cross-reference to table or figure [boolean] false
fo showFloatLabel Show a title for figures or tables (eg Table or Figure) in a cross-reference [boolean] false
fo xrefShowPage Show the page number in a cross-reference to table or figure [boolean] false

12.2. Templates

figureCaptionstyle
(for fo) [fo] Set attributes for display of figures
<xsl:attribute name="text-align"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">center</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:attribute name="end-indent">  <xsl:value-of select="$exampleMargin"/> </xsl:attribute> <xsl:attribute name="start-indent">  <xsl:value-of select="$exampleMargin"/> </xsl:attribute>

13. Style

You can choose lots of features which affect the font, size, etc

13.1. Variables

Type Name Description Default
pagebreakStyle Display of <pb> element. Choices are "visible", "active" and "none". [string] visible
displayMode How to display Relax NG schema fragments (rnc or rng) [string] rnc
minimalCrossRef Provide minimal context for a link [boolean] false
postQuote Character to insert at end of quote. [string]
preQuote Character to insert at start of quote [string]
xhtml urlMarkup HTML element to put around visible text of display URLs [string] span
fo activeLinebreaks Make <lb> active (ie cause a line break) [boolean] true
fo alignment Alignment of text (ie justified or ragged) [string] justify
fo authorSize Font size for display of author name [string] 14pt
fo biblSize Font size for bibliography [string] 16pt
fo bodyFont Default font for body [string] Times
fo bodyMaster Default font size for body (without dimension) [string] 10
fo bodySize Calculation of normal body font size (add dimension) [string]
<xsl:value-of   select="$bodyMaster"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:text>pt</xsl:text>
fo dateSize Font size for display of date [string] 14pt
fo divFont Font for section headings [string] Times
fo exampleColor Colour for display of <eg> blocks. [string] black
fo exampleBackgroundColor Colour for background display of <eg> blocks. [string] gray
fo exampleSize Calculation of font size for examples (add dimension) [string]
<xsl:value-of   select="$bodyMaster * 0.6"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:text>pt</xsl:text>
fo quoteSize Calculation of font size for quotations [string]
<xsl:value-of   select="$bodyMaster * 0.9"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:text>pt</xsl:text>
fo footnoteSize Font size for footnotes [string]
<xsl:value-of   select="$bodyMaster * 0.8"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
fo footnotenumSize Font size for footnote numbers [string]
<xsl:value-of   select="$bodyMaster * 0.7"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
fo giColor Colour for display of element names [string] black
fo headingOutdent Indentation of headings [string] 0em
fo hyphenate Hyphenate text [boolean] true
fo identColor Colour for display of <ident> values Customization parameter. [string] black
fo runFont Font family for running header and footer [string] sans-serif
fo runSize Font size for running header and footer [string] 9pt
fo sansFont Sans-serif font [string] Helvetica
fo smallSize Calculation of small font size (add dimension) [string]
<xsl:value-of   select="$bodyMaster * 0.9"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:text>pt</xsl:text>
fo tableSize Create font size for tables, by reference to $bodyMaster [string]
<xsl:value-of   select="$bodyMaster * 0.9"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:text>pt</xsl:text>
fo titleSize Font size for display of title [string] 16pt
fo tocSize Font size for TOC heading [string] 16pt
fo typewriterFont Font for literal code [string] Courier
latex typewriterFont Font for literal code [string] DejaVu Sans Mono
latex sansFont Font for sans-serif [string]
latex romanFont Font for serif [string]
latex gothicFont Font for gothic [string] Lucida Blackletter
latex calligraphicFont Font for calligraphic [string] Lucida Calligraphy

13.2. Templates

divXRefHeading
(for fo) [fo] How to display section headings in a cross-reference section title
<xsl:param name="head"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:apply-templates mode="section" select="tei:head"/> </xsl:param> <xsl:text> (</xsl:text> <xsl:value-of select="normalize-space($head)"/> <xsl:text>)</xsl:text>
linkStyle
(for fo) [fo] Set attributes for display of links
<xsl:attribute name="text-decoration"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">underline</xsl:attribute>
setupDiv0
(for fo) [fo] Set attributes for display of heading for chapters (level 0)
<xsl:attribute name="font-size"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">18pt</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="space-after">6pt</xsl:attribute> <xsl:attribute name="space-before.optimum">12pt</xsl:attribute> <xsl:attribute name="text-indent">  <xsl:value-of select="$headingOutdent"/> </xsl:attribute>
setupDiv1
(for fo) [fo] Set attributes for display of heading for 1st level sections
<xsl:attribute name="font-size"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">14pt</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="space-after">3pt</xsl:attribute> <xsl:attribute name="space-before.optimum">9pt</xsl:attribute> <xsl:attribute name="text-indent">  <xsl:value-of select="$headingOutdent"/> </xsl:attribute>
setupDiv2
(for fo) [fo] Set attributes for display of heading for 2nd level sections
<xsl:attribute name="font-size"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">12pt</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:attribute name="space-after">2pt</xsl:attribute> <xsl:attribute name="space-before.optimum">4pt</xsl:attribute> <xsl:attribute name="text-indent">  <xsl:value-of select="$headingOutdent"/> </xsl:attribute>
setupDiv3
(for fo) [fo]Set attributes for display of heading for 3rd level sections
<xsl:attribute name="font-size"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">10pt</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:attribute name="space-after">0pt</xsl:attribute> <xsl:attribute name="space-before.optimum">4pt</xsl:attribute> <xsl:attribute name="text-indent">  <xsl:value-of select="$headingOutdent"/> </xsl:attribute>
setupDiv4
(for fo) [fo] Set attributes for display of heading for 4th level sections
<xsl:attribute name="font-size"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">10pt</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:attribute name="space-after">0pt</xsl:attribute> <xsl:attribute name="space-before.optimum">4pt</xsl:attribute> <xsl:attribute name="text-indent">  <xsl:value-of select="$headingOutdent"/> </xsl:attribute>
setupDiv5
(for fo) [fo] Set attributes for display of heading for 5th level sections
<xsl:attribute name="font-size"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">10pt</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:attribute name="space-after">0pt</xsl:attribute> <xsl:attribute name="space-before.optimum">4pt</xsl:attribute> <xsl:attribute name="text-indent">  <xsl:value-of select="$headingOutdent"/> </xsl:attribute>
setupDiv6
(for fo) [fo] Set attributes for display of heading for 6th level sections
<xsl:attribute name="font-size"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">10pt</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:attribute name="space-after">0pt</xsl:attribute> <xsl:attribute name="space-before.optimum">4pt</xsl:attribute> <xsl:attribute name="text-indent">  <xsl:value-of select="$headingOutdent"/> </xsl:attribute>
showXrefURL
(for fo) [fo] How to display the link text of a <ptr>the URL being linked to
<xsl:param name="dest"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> <xsl:value-of select="$dest"/>

14. Hooks

A set of templates which are empty by default; they can be used to add code at strategic points. The content must be valid XSLT.

14.1. Variables

Type Name Description Default

14.2. Templates

sectionHeadHook
(for common) [common] Hook where actions can be inserted when making a heading
bodyHook
(for xhtml) [html] Hook where HTML can be inserted just after <body>
bodyEndHook
(for xhtml) [html] Hook where HTML can be inserted just before the <body> ends. This can be used to add a page-wide footer block.
bodyJavascriptHook
(for xhtml) [html] Hook where Javascript calls can be inserted just after <body>
cssHook
(for xhtml) [html] Hook where extra CSS can be inserted  
headHook
(for xhtml) [html] Hook where code can be added to the HTML <head>. This would be used to insert <meta> tags.
imgHook
(for xhtml) [html] Hook where HTML can be inserted when creating an <img>
figureHook
(for xhtml) [html] Hook where HTML can be inserted when processing a figure
javascriptHook
(for xhtml) [html] Hook where extra Javascript functions can be defined
preAddressHook
(for xhtml) [html] Hook where HTML can be inserted just before the <address>
startDivHook
(for xhtml) [html] Hook where HTML can be inserted at the start of processing each section
startHook
(for xhtml) [html] Hook where HTML can be inserted at the beginning of the main text, after the header
teiEndHook
(for xhtml) [html] Hook where HTML can be inserted after processing <TEI>
teiStartHook
(for xhtml) [html] Hook where HTML can be inserted before processing <TEI>
xrefHook
(for xhtml) [html] Hook where HTML can be inserted when creating an <a> element
egXMLStartHook
(for xhtml) [html] Hooks where HTML can be inserted when processing <egXML> element
afterBodyHook
(for fo) [fo] Hook where extra material can be inserted after the <body> has been processed
blockStartHook
(for fo) [fo] Hook where work can be done at the start of each block
pageMasterHook
(for fo) [fo] Hook where extra page masters can be defined
beginDocumentHook
(for latex) [latex] Hook where LaTeX commands can be inserted after the beginning of the document
latexSetupHook
(for latex) [latex] Hook where LaTeX commands can be at start of setup
latexPreambleHook
(for latex) [latex] Hook where LaTeX commands can be inserted in the preamble before the beginning of the document

15. Miscellaneous and advanced

Finally, some miscellaneous or advanced features which you probably won't use much.

15.1. Variables

Type Name Description Default
teixslHome The home page for these stylesheets [anyURI] http://www.tei-c.org/Stylesheets/
teiP4Compat Process elements according to assumptions of TEI P4 [boolean] false
useHeaderFrontMatter Title, author and date is taken from the <teiHeader> rather than looked for in the front matter [boolean] false
useFixedDate Whether to attempt to work out a current date (set to true for test results which won't differ [boolean] false
xhtml generateParagraphIDs Generate a unique ID for all paragraphs [boolean] false
xhtml rendSeparator Character separating values in a rend attribute. Some projects use multiple values in rend attributes. These are handled, but the separator character must be specified. [string] ;
xhtml showTitleAuthor Show a title and author at start of document [boolean] false
xhtml verbose Be talkative while working. [boolean] false

15.2. Templates

Sebastian Rahtz. Date: 2011-11-02
This page is copyrighted