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 a few ways to provide a constant navigation aid, with 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

TypeNameDescriptionDefault
consecutiveFNsNumber footnotes consecutively [boolean]false
autoEndNotesMake all notes into endnotes [boolean]false
oddWeaveLiteWhether to make simplified display of ODD [boolean]false
parIndentParagraph indentation [string]1em
biblioStyleStyle for formatted bibliography [string]
parSkipDefault spacing between paragraphs [string]0pt
xhtmlfilePerPageWhether we should construct a separate file for each page (based on page breaks) [boolean]false
xhtmlviewPortWidthWhen making fixed format epub, width of viewport [number]1200
xhtmlviewPortHeightWhen making fixed format epub, height of viewport [number]1700
xhtmlfootnoteBackLinkLink back from footnotes to reference [boolean]false
xhtmlcontentStructureHow 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
xhtmldivOffsetThe 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
xhtmlfootnoteFileMake a separate file for footnotes [boolean]false
xhtmllinksWidthWidth of left-hand column when $pageLayout is "Table" [string]15%
xhtmlnavbarFileXML resource defining a navigation bar. The XML should provide a <list> containing a series of <item> elements, each containing an <xref> link. [anyURI]
fobackMulticolumnsPut back matter in multiple columns [boolean]false
fobodyMarginBottomMargin at bottom of text body [string]24pt
fobodyMarginTopMargin at top of text body [string]24pt
fobodyMulticolumnsPut body matter in multiple columns [boolean]false
fobulletFourSymbol for 4th level itemized list [string]+
fobulletOneSymbol for top-level itemized list [string]
fobulletThreeSymbol for 3rd level itemized list [string]*
fobulletTwoSymbol for 2nd level itemized list [string]
focolumnCountNumber of columns, when multiple-column work is requested [integer]1
fobetweenStartsXSL FO "provisional-distance-between starts" [string]18pt
fobetweenGlossStartsXSL FO "provisional-distance-between starts" for gloss lists [string]42pt
fobetweenBiblStartsXSL FO "provisional-distance-between starts" for bibliographies [string]14pt
fodivRunningheadsDisplay section headings in running heads [boolean]false
foexampleAfterSpace below examples [string]4pt
foexampleBeforeSpace above examples [string]4pt
foexampleMarginLeft margin for examples [string]12pt
foflowMarginLeftLeft margin of flow [string]
foforcePageMasterWhich named page master name to use [string]
foformatBackpageHow to format page numbers in back matter (use XSLT number format) [string]1
foformatBodypageHow to format page numbers in main matter (use XSLT number format) [string]1
foformatFrontpageHow to format page numbers in front matter (use XSLT number format) [string]i
fofrontMulticolumnsPut front matter in multiple columns [boolean]false
folabelSeparationXSL FO "provisional-label-separation" [string]6pt
folistAbove-1Space above lists at top level [string]6pt
folistAbove-2Space above lists at 2nd level [string]4pt
folistAbove-3Space above lists at 3rd level [string]0pt
folistAbove-4Space above lists at 4th level [string]0pt
folistBelow-1Space below lists at top level [string]6pt
folistBelow-2Space below lists at 2nd level [string]4pt
folistBelow-3Space below lists at 3rd level [string]0pt
folistBelow-4Space below lists at 4th level [string]0pt
folistItemsepSpacing between list items [string]4pt
folistLeftGlossIndentLeft margin for gloss lists [string]0.5in
folistLeftGlossInnerIndentLeft margin for nested gloss lists [string]0.25in
folistLeftIndentIndentation for lists [string]0pt
folistRightMarginRight margin for lists [string]10pt
fopageHeightPaper height [string]297mm
fopageMarginBottomMargin at bottom of text area [string]100pt
fopageMarginLeftLeft margin [string]80pt
fopageMarginRightRight margin [string]150pt
fopageMarginTopMargin at top of text area [string]75pt
fopageWidthPaper width [string]211mm
foparSkipmaxMaximum space allowed between paragraphs [string]12pt
foreadColSpecFileExternal XML file containing specifications for column sizes for tables in document [anyURI]
foregionAfterExtentRegion after [string]14pt
foregionBeforeExtentRegion before [string]14pt
fosectionHeadersConstruct running headers from page number and section headings [boolean]true
fospaceAfterBiblSpace after bibliography [string]0pt
fospaceAroundTableSpace above and below a table [string]8pt
fospaceBeforeBiblSpace above bibliography [string]4pt
fospaceBelowCaptionSpace below caption of figure or table [string]4pt
fotitlePageMake title page [boolean]true
fotwoSidedMake 2-page spreads [boolean]true
latexclassParametersOptional parameters for documentclass [string]11pt,twoside
latexlatexLogoLogo graphics file [string]
latexpagebreakStyleWhen processing a "pb" element, decide what to generate: "active" generates a page break; "visible" generates a bracketed number (with scissors), and "bracketsonly" generates a bracketed number (without scissors). [float]
latextableMaxWidthWhen making a table, what width must be constrained to fit, as a proportion of the page width. [float]0.85
latexverseNumberingWhether to number lines of poetry [boolean]false
latexeveryHowManyLinesWhen numbering poetry, how often to put in a line number [integer]5
latexresetVerseLineNumberingWhen numbering poetry, when to restart the sequence; this must be the name of a TEI element [string]div1
latexlatexPaperSizeLaTeX 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
<xhtml:a href="#rh-coltitle="Go to main page contentclass="skiplinks"    xmlns:html="http://www.w3.org/1999/xhtml">Skip links</xhtml:a> <xhtml:a class="hide">|</xhtml:a> <xsl:call-template name="crumbPath"/> <xhtml:a class="hide">|</xhtml:a> <xhtml:a class="bannerrighthref="{$parentURL}title="Go to home page">  <xsl:value-of select="$parentWords"/> </xhtml:a>
lh-col-bottom
(for xhtml) [html]Bottom of left-hand column ID 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="currentIDselect="$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
<xhtml:a   class="framelogo"   href="http://www.tei-c.org/Stylesheets/"    xmlns:html="http://www.w3.org/1999/xhtml">  <xhtml:img    src="http://www.tei-c.org/release/common2/doc/tei-xsl-common/teixsl.png"    vspace="5"    width="124"    height="161"    border="0"    alt="created by TEI XSL Stylesheets"/> </xhtml: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"/> <xhtml:meta name="author">  <xsl:attribute name="content">   <xsl:sequence select="tei:generateAuthor(.)"/>  </xsl:attribute> </xhtml:meta> <xsl:if test="$filePerPage='true'">  <xhtml:meta    name="viewport"    content="width={$viewPortWidth}, height={$viewPortHeight}"/> </xsl:if> <xhtml:meta   name="generator"   content="Text Encoding Initiative Consortium XSLT stylesheets"/> <xsl:choose>  <xsl:when    test="$outputTarget='html5' or $outputTarget='epub3'">   <xhtml:meta charset="utf-8"/>  </xsl:when>  <xsl:otherwise>   <xhtml:meta     http-equiv="Content-Type"     content="text/html; charset={$outputEncoding}"/>   <xhtml:meta name="DC.Title">    <xsl:attribute name="content">     <xsl:value-of       select="normalize-space(translate($title,'<>','〈〉'))"/>    </xsl:attribute>   </xhtml:meta>   <xhtml:meta name="DC.Typecontent="Text"/>   <xhtml:meta name="DC.Formatcontent="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:html="http://www.w3.org/1999/xhtml"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:when test="$navbarFile=''">   <xsl:comment>no nav bar</xsl:comment>  </xsl:when>  <xsl:otherwise>   <xsl:element     name="{if ($outputTarget='html5') then 'nav' else 'div'}">    <xsl:for-each select="document($navbarFile,document(''))">     <xsl:for-each select="tei:list/tei:item">      <xhtml:span class="navbar">       <xhtml:a href="{$URLPREFIX}{tei:xref/@url}class="navbar">        <xsl:apply-templates select="tei:xref/text()"/>       </xhtml:a>      </xhtml:span>      <xsl:if test="following-sibling::tei:item"> | </xsl:if>     </xsl:for-each>    </xsl:for-each>   </xsl:element>  </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'">   <xhtml:table width="100%border="0">    <xhtml:tr>     <xhtml: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:sequence select="tei: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:sequence select="tei:generateTitle(.)"/>       </xsl:with-param>       <xsl:with-param name="level">1</xsl:with-param>      </xsl:call-template>     </xhtml:td>     <xhtml:td style="vertical-align:top;"/>    </xhtml:tr>   </xhtml: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:sequence select="tei: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:sequence select="tei: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="currentIDselect="$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{marginnote} \renewcommand*{\marginfont}{\itshape\footnotesize} \setlength\marginparwidth{.75in} \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:sequence select="tei:generateSimpleTitle(.)"/>}, pdfauthor={<xsl:sequence   select="replace(string-join(tei:generateAuthor(.),''),'\\newline','')"/>}]{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}    \PrerenderUnicode{–}    }%    {\usepackage[utf8]{inputenc}}     <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}{ }    \uc@dclc{10148}{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}} \newenvironment{biblfree}{}{\ifvmode\par\fi } \newenvironment{docImprint}{\vskip 6pt}{\ifvmode\par\fi } \newenvironment{docDate}{}{\ifvmode\par\fi } \newenvironment{docAuthor}{\ifvmode\vskip4pt\fontsize{16pt}{18pt}\selectfont\fi\itshape}{\ifvmode\par\fi } \newenvironment{docTitle}{\vskip6pt\bfseries\fontsize{18pt}{22pt}\selectfont}{\par } \newenvironment{titlePart}{}{\par } \newenvironment{byline}{\vskip6pt\itshape\fontsize{16pt}{18pt}\selectfont}{\par } \newenvironment{citbibl}{}{\ifvmode\par\fi } \newenvironment{bibl}{}{} \newenvironment{rubric}{}{} \newenvironment{msItem}{\vskip 6pt}{\par} \newenvironment{msHead}{\vskip 6pt}{\par} \def\titlem#1{\emph{#1}} \def\corr#1{#1} \def\sic#1{#1} \def\reg#1{#1} \def\orig#1{#1} \def\gap{} \def\abbr#1{#1} \def\expan#1{#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} \def\unusedattribute#1{\sout{\textcolor{label}{#1}}} \DeclareRobustCommand*{\xref}{\hyper@normalise\xref@} \def\xref@#1#2{\hyper@linkurl{#2}{#1}} \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($documentclass='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{\roman{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}{2} \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

TypeNameDescriptionDefault
autoHeadWhether to construct a heading for <div> elements with no <head> - by default, not. [boolean]false
numberSpacerCharacter 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:headmode="makeheading"/>  </xsl:when>  <xsl:when test="tei:head">   <xsl:apply-templates select="tei:headmode="plain"/>  </xsl:when>  <xsl:when test="tei:front/tei:head">   <xsl:apply-templates select="tei:front/tei:headmode="plain"/>  </xsl:when>  <xsl:when test="@n">   <xsl:value-of select="@n"/>  </xsl:when>  <xsl:when test="tei:docDate">   <xsl:apply-templates select="tei:docDatemode="plain"/>  </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

TypeNameDescriptionDefault
numberBackFiguresAutomatically number figures in back matter [boolean]false
numberBackHeadingsHow to construct heading numbering in back matter [string]A.1
numberBackTablesAutomatically number tables in back matter [boolean]true
numberFiguresAutomatically number figures [boolean]true
numberFrontFiguresAutomatically number figures in front matter [boolean]false
numberFrontHeadingsHow to construct heading numbering in front matter [string]
numberFrontTablesAutomatically number tables in front matter [boolean]true
numberHeadingsAutomatically number sections [boolean]true
numberHeadingsDepthDepth to which sections should be numbered [integer]9
numberTablesAutomatically number tables [boolean]true
prenumberedHeadingsUse value of "n" attribute to number sections [boolean]false
numberParagraphsAutomatically 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

TypeNameDescriptionDefault
outputTargetType of output being generated [string]html
REQUESTThe complete URL when the document is being delivered from a web server (normally set by Apache or Cocoon) [string]
STDOUTWrite to standard output channel [boolean]true
xhtmlIDAn ID passed to the stylesheet to indicate which section to display [string]
xhtmlrequestedIDA 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"/>
xhtmlURLPREFIXA path fragment to put before all internal URLs [string]
xhtmloutputNameThe name of the output file [string]
xhtmloutputDirDirectory in which to place generated files. [string]
xhtmloutputEncodingEncoding of output file(s). [string]utf-8
xhtmloutputMethodOutput method for output file(s). [string]xhtml
xhtmloutputSuffixSuffix of output file(s). [string].html
xhtmldoctypePublicPublic Doctype of output file(s). [string]-//W3C//DTD XHTML 1.0 Transitional//EN
xhtmldoctypeSystemSystem Doctype of output file(s). [string]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
xhtmlpageLayoutThe 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
xhtmlsplitBackmatterBreak back matter into separate HTML pages (if splitting enabled). [boolean]true
xhtmlsplitFrontmatterBreak front matter into separate HTML pages (if splitting enabled). [boolean]true
xhtmlsplitLevelLevel 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
xhtmlstandardSuffixSuffix 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>
xhtmltopNavigationPanelDisplay navigation panel at top of pages. [boolean]true
xhtmlurlChunkPrefixHow 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=
xhtmluseIDsConstruct 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
folanguageLanguage (for hyphenation) [string]en_US
fofoEngineName 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]
latexORIGDIRlocation of original XML file, for looking up relative pointers [string]
latexbaseURLURL root where referenced documents are located [string]
latexreencodeWhether 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
latexrealFiguresUse 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

TypeNameDescriptionDefault
xhtmlautoTocMake an automatic table of contents [boolean]true
xhtmlclass_subtocCSS class for second-level TOC entries [string]subtoc
xhtmlsubTocDepthDepth 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
xhtmltocBackInclude the back matter in the table of contents. [boolean]true
xhtmltocDepthDepth to which table of contents is constructed. [string]5
xhtmltocFrontInclude the front matter in the table of contents. [boolean]true
xhtmltocElementWhich HTML element to wrap each TOCs entry in. [string]p
xhtmltocContainerElementWhich HTML element to wrap each TOC sections in. [string]div
xhtmlrefDocFooterTextText to link back to from foot of ODD reference pages [string]TEI Guidelines
xhtmlrefDocFooterURLURL to link back to from foot of ODD reference pages [anyURI]index.html
xhtmlgenerateDivFromPWhen a TEI <p> generates an HTML <p> (possibly split) or a <div class="p"> [boolean]false
fodiv0TocindentIndentation for level 0 TOC entries [string]0in
fodiv1TocindentIndentation for level 1 TOC entries [string]0.25in
fodiv2TocindentIndentation for level 2 TOC entries [string]0.5in
fodiv3TocindentIndentation for level 3 TOC entries [string]0.75in
fodiv4TocindentIndentation for level 4 TOC entries [string]1in
fodiv5TocindentIndentation for level 5 TOC entries [string]1.25in
fotocBackMake TOC for sections in <back> [boolean]true
fotocFrontMake TOC for sections in <front> [boolean]true
fotocNumberSuffixPunctuation to insert after a section number in a TOC [string].
fotocStartPagePage number on which TOC should start [integer]1

8.2. Templates

navInterSep
(for xhtml) Gap between elements in navigation list
<xsl:text    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">: </xsl:text>

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

TypeNameDescriptionDefault

9.2. Templates

copyrightStatement
(for xhtml) [html] Make a copyright claim

10. CSS

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

10.1. Variables

TypeNameDescriptionDefault
class_tocCSS class for TOC entries [string]toc
xhtmlclass_ptrCSS class for links derived from <ptr> [string]ptr
xhtmlclass_refCSS class for links derived from <ref> [string]ref
xhtmlcssFileCSS style file to be associated with output file(s) [anyURI]http://www.tei-c.org/release/xml/tei/stylesheet/tei.css
xhtmlcssPrintFileCSS 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
xhtmlcssSecondaryFileSecondary 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]
xhtmlcssInlineFileCSS file to include in the output file directly [anyURI]

10.2. Templates

11. Tables

Default behaviour of table elements.

11.1. Variables

TypeNameDescriptionDefault
cellAlignDefault alignment of table cells [string]left
tableAlignDefault alignment of tables [string]left
fodefaultCellLabelBackgroundDefault colour for background of table cells which are labelling rows or columns [string]silver
foinlineTablesForce tables to appear inline [boolean]false
fomakeTableCaptionPut a caption on tables [boolean]true
fotableCaptionAlignAlignment of table captions [string]center
fotableCellPaddingDefault 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

TypeNameDescriptionDefault
graphicsPrefixDirectory specification to put before names of graphics files, unless they start with "./" [string]
graphicsSuffixDefault file suffix for graphics files, if not directly specified [string].png
standardScaleScaling of imported graphics [decimal]1
headInXref[common] Whether cross-reference to a figure or table includes its caption [boolean]true
xhtmldpiResolution of images. This is needed to calculate HTML width and height (in pixels) from supplied dimensions. [integer]96
xhtmlshowFiguresDisplay figures. [boolean]true
foautoScaleFiguresHow to scale figures if no width and height specified (pass to XSL FO content-width) [string]
focaptionInlineFiguresPut captions on inline figures [boolean]false
foshowFloatHeadShow the contents of <head> in a cross-reference to table or figure [boolean]false
foshowFloatLabelShow a title for figures or tables (eg Table or Figure) in a cross-reference [boolean]false
foxrefShowPageShow 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

TypeNameDescriptionDefault
pagebreakStyleDisplay of <pb> element. Choices are "visible", "active" and "none". [string]visible
displayModeHow to display Relax NG schema fragments (rnc or rng) [string]rnc
minimalCrossRefProvide minimal context for a link [boolean]false
postQuoteCharacter to insert at end of quote. [string]
preQuoteCharacter to insert at start of quote [string]
xhtmlurlMarkupHTML element to put around visible text of display URLs [string]span
foactiveLinebreaksMake <lb> active (ie cause a line break) [boolean]true
foalignmentAlignment of text (ie justified or ragged) [string]justify
fobiblSizeFont size for bibliography [string]16pt
fobodyFontDefault font for body [string]Times
fobodyMasterDefault font size for body (without dimension) [string]10
fobodySizeCalculation 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>
fodivFontFont for section headings [string]Times
foexampleColorColour for display of <eg> blocks. [string]black
foexampleBackgroundColorColour for background display of <eg> blocks. [string]gray
foexampleSizeCalculation 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>
foquoteSizeCalculation 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>
fofootnoteSizeFont size for footnotes [string]
<xsl:value-of   select="$bodyMaster * 0.9"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
fofootnotenumSizeFont size for footnote numbers [string]
<xsl:value-of   select="$bodyMaster * 0.7"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
fogiColorColour for display of element names [string]black
foheadingOutdentIndentation of headings [string]0em
fohyphenateHyphenate text [boolean]true
foidentColorColour for display of <ident> values Customization parameter. [string]black
forunFontFont family for running header and footer [string]sans-serif
forunSizeFont size for running header and footer [string]9pt
fosansFontSans-serif font [string]Helvetica
fosmallSizeCalculation 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>
fotableSizeCreate 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>
fotocSizeFont size for TOC heading [string]16pt
fotypewriterFontFont for literal code [string]Courier
latextypewriterFontFont for literal code [string]DejaVu Sans Mono
latexsansFontFont for sans-serif [string]
latexromanFontFont for serif [string]
latexgothicFontFont for gothic [string]Lucida Blackletter
latexcalligraphicFontFont 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="sectionselect="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

TypeNameDescriptionDefault

14.2. Templates

sectionHeadHook
(for common) [common] Hook where actions can be inserted when making a heading
attDefHook
(for common) [common] Hook where actions can be inserted when processing an attDef Used in Guidelines output to create an anchor/link pilcrow.
<xsl:param name="attName"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
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

TypeNameDescriptionDefault
teixslHomeThe home page for these stylesheets [anyURI]http://www.tei-c.org/Stylesheets/
teiP4CompatProcess elements according to assumptions of TEI P4 [boolean]false
xhtmlgenerateParagraphIDsGenerate a unique ID for all paragraphs [boolean]false
xhtmlrendSeparatorCharacter separating values in a rend attribute. Some projects use multiple values in rend attributes. These are handled, but the separator character(s) must be specified. [string];
xhtmlshowTitleAuthorShow a title and author at start of document [boolean]false
xhtmlverboseBe talkative while working. [boolean]false

15.2. Templates

Sebastian Rahtz. Date: 2013-06-21