This is a family of XSLT 2.0 stylesheets to transform TEI XML documents to various textual formats formats, including XHTML, LaTeX, XSL Formatting Objects, ePub, plain text, RDF, and JSON; and to/from Word OOXML (docx) and OpenOfice (odt). They concentrate on the core TEI modules which are used for simple transcription and ‘born digital’ writing. It is important to understand that they do not:
and should not be treated as the definitive view of the TEI Consortium.
The stylesheets support a set of profiles, which are project starting points. Each profile is a subdirectory of the profiles directory. Each profile represents a specific set of customizations of the basic stylesheet functions, each for a particular audience or purpose. For example, the ota profile is customized for working with texts from the Oxford Text Archive, and the dhoxss profile is for materials related to the Digital Humanities Oxford Summer School. Most users will want to work with the default profile.
The profile default
is used if no other setup is selected, and is the fallback when a profile is requested but does not contain any customization directory for the chosen format.
The profiles are implemented as a set of directories each of which may have a file to.xsl for one or more of the supported output formats. There may also be a from.xsl to go from the selected format to TEI XML.
The stylesheets code is divided into directories by input or output format, as described in the table below. In addition there are some general-purpose directories:
Within each directory there is usually a separate file for the templates which implement each of the TEI modules (eg html_textstructure.xsl, html_linking.xsl, or html_drama.xsl); these are included by a master file eg html.xsl. This also includes a parameterization layer in the file eg html_param.xsl, and the parameterization file from the common directory. The file (eg) html.xsl does any necessary declaration of constants and XSL keys.
name | Description | from TEI | to TEI |
---|---|---|---|
bibtex | LaTeX BibTeX | x | |
cocoa | Cocoa simple markup | x | |
csv | Comma-separated values (TEI tables only) | x | x |
docbook | Docbook 5.0 | x | x |
docx | Microsoft Word (OOXML) | x | x |
dtd | XML DTD (from ODD) | x | |
epub3 | ePub version 3 | x | |
epub | ePub | x | |
fo | XSL Formatting Objects | x | |
html5 | HTML5 | x | |
html | HTML (also used by ePub) | x | |
json | JSON (minimal) | x | |
latex | LaTeX | x | |
markdown | Markdown | x | x |
nlm | NLM | x | |
odd | TEI compiled ODD | x | |
odt | OpenOffice (ODF) | x | x |
p4 | TEI P4 | x | |
PDF (generated by running LaTeX) | x | ||
rdf | RDF (CIDOC CRM) | x | |
relaxng | RELAX NG schema (from ODD) | x | |
rnc | RELAX NG schema (compact format) | x | |
schematron | Schematron schema (from ODD) | x | |
tbx | TBX | x | |
tcp | Text Creation Partnership P4 XML | x | |
tite | TEI Tite capture format | x | |
txt | Plain text | x | |
verbatimxml | Pretty-printed XML | x | |
wordpress | Wordpress | x | |
xlsx | Excel (OOXML) | x | |
xsd | W3C schema (from ODD) | x |
The stylesheets are embedded in various services, or can be used on their own to perform the transformations.
The stylesheets are available for immediate use in the oXygen XML editor, if you have the TEI framework installed (it is enabled by default). This will make various transformations available immediately for documents which are detected as TEI. You set up a transformation by pressing the icon which looks like this: . The first time you do this, you should be offered a choice of built-in options:
.
From these, tick (for example) the box by ‘TEI P5 XHTML’ and click on Apply associated
.
The transformation is run, and the default web browser is fired up with the resulting web page.
If you want to make sure you keep up with the latest versions of these stylesheets, and the TEI P5 schemas, you can subscribe to the TEI addon (maintained by the TEI Consortium) for oXygen. Go to Add-ons
section of oXygen's Preferences
and add http://www.tei-c.org/release/oxygen/updateSite.oxygen
to the list. Then go to Help/Manage add-ons
and activate the TEI P5 + XSL entry. After a restart, you'll be using the latest version in preference to what is delivered with your copy of oXygen. When updates appear, you'll be asked if you want to install them.
In addition to editing the copy of the stylesheets in oXygen, you can set up a copy of TEI framework, and configure oXygen to look at it. First, grab the current oXygen TEI framework by downloading the big zip file from https://sourceforge.net/projects/tei/files/tei-oxygen/. Create a directory in your own directory area called oxygenframeworks
and unpack the zip file into there.
Start up oXygen, and go to Preferences/Global and scroll down on the right to ‘Use custom frameworks’, and put in your frameworks directory.
tei/xml/tei/stylesheet/profiles
. For example, to create your local profile for Word to TEI, create and a directory called local
, and under that one called docx
. In there, create a file called from.xsl
which looks like this: local
profile in oXygen transformations.OxGarage1 is a web, and RESTful, service to manage the transformation of documents between a variety of formats. The majority of transformations have the TEI format as a pivot format, using these stylesheets.
There are instances of OxGarage at http://www.tei-c.org/ege-webclient/ and http://oxgarage.oucs.ox.ac.uk:8080/ege-webclient note that the latter is not a fully-supported service, so please do not rely on it for production use.
OxGarage is open source, and runs as a Java servlet. A Debian package is available at http://tei.oucs.ox.ac.uk/teideb/. Source code is on Github at https://github.com/sebastianrahtz/oxgarage.git
To use OxGarage, go to the web site, click on Documents and select TEI P5 XML Document as your input. When you do so a list of possible conversion targets should appear on the right. Choose, for example, Microsoft Word Document (.docx). When you've done this a Choose File button should appear on the upper left. Click the button and navigate to your file. Click the Convert button and open the resulting document in Microsoft Word.
By selecting Show Advanced options you can access a drop-down list of the different profiles supported for the current conversion path.
When the stylesheet package is installed, either by running make install
from source, or installing a Debian package, there are Linux/OSX command-line shell scripts available (cocoatotei
, docbooktotei
, docxtotei
, htmltotei
, markdowntotei
, odttotei
, p4totei
, tcptotei
, teitobibtex
, teitocsv
, teitodocbook
, teitodocx
, teitodtd
, teitoepub
, teitoepub3
, teitofo
, teitohtml
, teitohtml5
, teitojson
, teitolatex
, teitolite
, teitomarkdown
, teitonlm
, teitoodd
, teitoodt
, teitopdf
, teitordf
, teitorelaxng
, teitornc
, teitoschematron
, teitoslides
, teitotxt
, teitoverbatimxml
, teitoxsd
, wordpresstotei
, and xlsxtotei
) for converting to/from Word, to/from OpenOffice, and to DTD, ePub, HTML, RDF, Relax NG, plain text, W3C schema etc. These are implemented using Ant tasks, so a local installation of Java 1.6+ and Ant is required.
The simplest use of the scripts is (eg)
teitohtml inputfile outputfile⚓
but there are also a set of options, which you see by giving the command name followed by --help
:
$ teitohtml --help TEI conversion: from tei to html Usage: /usr/bin/teitohtml [options] inputfile [outputfile] Options, binary switches: --verbose # be verbose --debug # be verbose, do not delete intermediate files --apphome=/usr/share/xml/tei/stylesheet # where to find app directory --profiledir=/usr/share/xml/tei/stylesheet/profiles # where to find profile directory --profile=default # which transformation profile to use --oxygenlib=/usr/share/oxygen/lib # where is oxygenlib --odd # perform processing of ODD (if appropriate) --localsource=DIR # where is local copy of source of TEI Guidelines --summaryDoc # only make summary, when doing ODD processing Options, shown with defaults: --saxonjar=/usr/share/saxon/saxon9he.jar # location of Saxon jar file ⚓
If, for example, you want to write a customization of the HTML conversion you can simply refer to the specification html/html.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="html/html.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>.
The TEI stylesheets are designed to be customized. There are several hundred things you can set to change the output in various formats. They are either XSL variables, named templates which you can override, or empty ‘hook’ templates into which you can add your own code. You need to understand a little of XSL syntax to work with these. If you know a bit more, you can override any of the templates in the style files, but then you are on your own.
The Stylebear web form will construct a XSL file for you, with all the variables configured.
You can also change any of the parameters from within the oXygen editor. Do this by going to the stylesheet configuration. Untick (eg) TEI P5 XHTML, but keep it highlighted and select ‘Duplicate’. You should see something like this:
Select ‘Parameters’, and you should see this:
Now you can scroll down to find a parameter to change, press ‘Edit’ and you'll see a dialogue like this:
Change the value, press OK to exit each dialogue, and then ‘Apply Associated’ to see the result.
You might apply, for example, some changes to the HTML rendering, by setting parameters as followws, and checking the results:
autoToc
to ‘false’numberHeadings
to falsepageLayout
to ‘CSS’numberParagraphs
to ‘true’There are 13 areas for customization. In most cases there are parameters and templates which are specific to one of the three main output methods (HTML, FO and LaTeX), and those which are common to all three.
The default behaviour of the system is to construct each HTML page with per-page navigation bars top and bottom, and a standard set of navigation links underneath.
Type | Name | Description | Default |
department | Name of department within institution [string ] | ||
homeLabel | Name of link to home page of application [string ] | Home | |
homeURL | Project url [anyURI ] | / | |
homeWords | Project name [string ] | Home | |
institution | Institution or project name [string ] | ||
parentURL | Institution link [anyURI ] | ||
parentWords | Name of overall institution [string ] | Parent Institution | |
searchURL | Link to search application [anyURI ] | ||
feedbackURL | Link for feedback [anyURI ] | ||
html | alignNavigationPanel | How to align the navigation panel at the bottom of the page [string ] | right |
html | bottomNavigationPanel | Display navigation panel at bottom of pages [boolean ] | true |
html | htmlTitlePrefix | Fixed string to insert before normal page title in HTML meta <title> element [string ] | |
html | linkPanel | Make a panel with next page/previous page links. [boolean ] | true |
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:
Type | Name | Description | Default |
consecutiveFNs | Number footnotes consecutively [boolean ] | false | |
autoEndNotes | Make all notes into endnotes [boolean ] | false | |
oddWeaveLite | Whether to make simplified display of ODD [boolean ] | false | |
parIndent | Paragraph indentation [string ] | 1em | |
biblioStyle | Style for formatted bibliography [string ] | ||
DOIResolver | The initial part of a the URI of a DOI resolution service [string ] | ||
parSkip | Default spacing between paragraphs [string ] | 0pt | |
html | separator | Separator between items in header, footer etc [string ] | |
<xsl:text
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> </xsl:text> | |||
html | treestyle | which Javascript library to use for drawing trees [string ] | googlechart |
html | filePerPage | Whether we should construct a separate file for each page (based on page breaks) [boolean ] | false |
html | viewPortWidth | When making fixed format epub, width of viewport [number ] | 1200 |
html | viewPortHeight | When making fixed format epub, height of viewport [number ] | 1700 |
html | footnoteBackLink | Link back from footnotes to reference [boolean ] | false |
html | 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 |
html | 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 |
html | footnoteFile | Make a separate file for footnotes [boolean ] | false |
html | 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 ] | |
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 | lineheightApplicationRules | Set line-height for back matter [string ] | |
fo | lineheightBackpage | Sequence of identifiers for lineheight application (has to be evaluated as XPath). Add the following values to the sequence in order to: 'p' : apply lineheight to tei:p elements, excluding those in tei:note, and in tei:quote elements returning false from tei:isInline. 'footnote' : in addition to 'p' apply lineheight to all tei:note elements with @place ='foot' 'block-quote' : in addition to 'p' apply lineheight to block quotes 'all' : apply lineheight parameters respectively to the whole page sequences [string ] | 1 |
fo | lineheightBodypage | Set line-height for main matter [string ] | 1 |
fo | lineheightFrontpage | Set line-height for front matter [string ] | 1 |
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 ] | 72pt |
fo | pageMarginLeft | Left margin [string ] | 72pt |
fo | pageMarginRight | Right margin [string ] | 72pt |
fo | pageMarginTop | Margin at top of text area [string ] | 72pt |
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" generates 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 | quoteEnv | Which environment to use for quotes (quote, quotation, quoting, ...) [string ] | quote |
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 |
Headings for sections can be customized in various ways.
Type | Name | Description | Default |
autoHead | Whether to construct a heading for <div> elements with no <head> - by default, not. [boolean ] | false | |
numberSpacer | Character to put after number of section header [string ] | ||
<xsl:text
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> |
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.
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 | |
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 | |
prenumberedHeadings | Use value of "n" attribute to number sections [boolean ] | false | |
numberParagraphs | Automatically number paragraphs. [boolean ] | false |
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.
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 | |
html | ID | An ID passed to the stylesheet to indicate which section to display [string ] | |
html | 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"/> | |||
html | URLPREFIX | A path fragment to put before all internal URLs [string ] | |
html | outputName | The name of the output file [string ] | |
html | outputDir | Directory in which to place generated files. [string ] | |
html | outputEncoding | Encoding of output file(s). [string ] | utf-8 |
html | outputMethod | Output method for output file(s). [string ] | xhtml |
html | outputSuffix | Suffix of output file(s). [string ] | .html |
html | doctypePublic | Public Doctype of output file(s). [string ] | -//W3C//DTD XHTML 1.0 Transitional//EN |
html | doctypeSystem | System Doctype of output file(s). [string ] | http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd |
html | pageLayout | The style of HTML (Simple or Complex) which creates the layout for generated pages. The choice is between Simple: A linear presentation is createdComplex: 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 |
html | splitBackmatter | Break back matter into separate HTML pages (if splitting enabled). [boolean ] | true |
html | splitFrontmatter | Break front matter into separate HTML pages (if splitting enabled). [boolean ] | true |
html | 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 |
html | 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> | |||
html | topNavigationPanel | Display navigation panel at top of pages. [boolean ] | true |
html | 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= |
html | 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 | 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 ] | |
fo | language | Language (for hyphenation). This was originally en_US, but that's invalid and causes trouble, so it's now set to the default 'en' (MDH 2017-04-14). [string ] | |
latex | ORIGDIR | location of original XML file, for looking up relative pointers [string ] | |
latex | baseURL | URL root where referenced documents are located [string ] | |
latex | realFigures | Use real name of graphics files rather than pointers [boolean ] | true |
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.
Type | Name | Description | Default |
html | autoToc | Make an automatic table of contents [boolean ] | true |
html | class_subtoc | CSS class for second-level TOC entries [string ] | subtoc |
html | 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 |
html | tocBack | Include the back matter in the table of contents. [boolean ] | true |
html | tocDepth | Depth to which table of contents is constructed. [string ] | 5 |
html | tocFront | Include the front matter in the table of contents. [boolean ] | true |
html | tocElement | Which HTML element to wrap each TOCs entry in. [string ] | p |
html | tocContainerElement | Which HTML element to wrap each TOC sections in. [string ] | div |
html | refDocFooterText | Text to link back to from foot of ODD reference pages [string ] | TEI Guidelines |
html | 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 |
fo | tocJustify | TOC justify [boolean ] | false |
fo | tocLeaderPattern | TOC leader pattern, options are: - rule A rule. If this choice is selected, the "rule-thickness" and "rule-style" properties are used to set the leader's style. - dots A repeating sequence of dots. The choice of dot character is dependent on the user agent. - use-content A repeating pattern as specified by $tocLeaderPatternContent. inherit [string ] | space |
fo | tocLeaderPatternContent | TOC leader pattern content, will only be applied if $tocLeaderPattern is set to 'use-content' [string ] | -. |
At various places, the system has to create text. You can choose the words it uses (eg translate them to another language).
Setting up material for the CSS file to accompany HTML output.
Type | Name | Description | Default |
class_toc | CSS class for TOC entries [string ] | toc | |
html | class_ptr | CSS class for links derived from <ptr> [string ] | ptr |
html | class_ref | CSS class for links derived from <ref> [string ] | ref |
html | cssFile | CSS style file to be associated with output file(s) [anyURI ] | https://www.tei-c.org/release/xml/tei/stylesheet/tei.css |
html | cssPrintFile | CSS style file for print; this will be given a media=print attribute. [anyURI ] | https://www.tei-c.org/release/xml/tei/stylesheet/tei-print.css |
html | 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 ] | |
html | cssInlineFiles | CSS file to include in the output file directly [anyURI ] |
Default behaviour of table elements.
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 |
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.
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 | |
headInXref | [common] Whether cross-reference to a figure or table includes its caption [boolean ] | true | |
html | dpi | Resolution of images. This is needed to calculate HTML width and height (in pixels) from supplied dimensions. [integer ] | 96 |
html | 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 |
You can choose lots of features which affect the font, size, etc
Type | Name | Description | Default |
pagebreakStyle | Display of <pb> element. Choices are "active" or "none"; the default is to put in a display of the page break [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 ] | ‘ | |
html | 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 | 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 | 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 ] | lightgray |
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.9"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
<xsl:text>pt</xsl:text> | |||
fo | footnotenumSize | Font size for footnote numbers [string ] | |
<xsl:value-of select="$bodyMaster * 0.7"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
<xsl:text>pt</xsl:text> | |||
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 | tocSize | Font size for TOC heading [string ] | 16pt |
fo | typewriterFont | Font for literal code [string ] | Courier |
latex | exampleFont | Font for examples [string ] | Courier New |
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 |
latex | marginFont | Command to set margin font [string ] | \itshape\footnotesize |
latex | chineseFont | Font for Chinese script [string ] | Noto Sans CJK SC |
latex | koreanFont | Font for Korean script [string ] | Noto Sans CJK KR |
latex | japaneseFont | Font for Japanese script [string ] | Noto Sans CJK JP |
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.
Finally, some miscellaneous or advanced features which you probably won't use much.
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 | |
html | generateParagraphIDs | Generate a unique ID for all paragraphs [boolean ] | false |
html | showTitleAuthor | Show a title and author at start of document [boolean ] | false |
html | generationComment | Add a comment to web page showing when it was generated, stylesheet version, etc [boolean ] | true |
html | verbose | Be talkative while working. [boolean ] | false |
These stylesheets use XSLT 2.0, and have only been tested with Saxon (from http://saxon.sourceforge.net). An older set of XSLT 1.0 stylesheets are also available, but is not maintained or updated.
It is up to the user to find out how to run the XSLT processor! This may be from within a Java program, from your editor, on the command-line, or inside a web server.
The XSL FO style sheets were developed for use with PassiveTeX (http://projects.oucs.ox.ac.uk/passivetex/), a system using XSL formatting objects to render XML to PDF via LaTeX. They have not been extensively tested with the other XSL FO implementations.