PassiveTeX

PassiveTeX
Sebastian Rahtz
August 2005

1. Summary

  • PassiveTeX is a library of TeX macros which can be used to process an XML document which results from an XSL transformation to formatting objects.
  • PassiveTeX provides a rapid development environment for experimenting with XSL FO, using a reliable pre-existing formatter
  • Running PassiveTeX with the pdfTeX variant of TeX generates high-quality PDF files in a single operation.
  • PassiveTeX shows how TeX can remain the formatter of choice for XML, while hiding the details of its operation from the user.

2. How does it work?

PassiveTeX relies heavily on work by David Carlisle (his namespace-aware XML parser written in TeX, xmltex), and was developed from my JadeTeX macros for processing DSSSL via Jade.

Taking the XML version of the TEI Lite guidelines (teiu5.xml, with DTD teixlite.dtd, we apply an XSL stylesheet (see my page of TEI style sheets), and run it through the xsltproc XSL processor:
xsltproc -o teiu5.fo teip4/stylesheet/fo/tei.xsl teiu5.xml
This creates the new XML file teiu5.fo. We now run XMLTeX on this
pdfxmltex teiu5.fo
which creates teiu5.pdf. Voila! Actually, we need to do
pdfxmltex teiu5.fo
again, to resolve page-number references in the table of contents.

3. Installation

The PassiveTeX macros should be downloaded (as a ZIP file, passivetex.zip), unpacked, and installed in a TeX system (eg in texmf/tex/latex/passivetex) in the normal place where you put macros. Consult your local documentation or local expert if you do not know how to install a new package; on a web2c-based system, don't forget to run mktexlsr when you have the files in place, to update the file lookup table.

What about that pdfxmltex command we saw in the last section? You don't have it on your system? You need to download xmltex from CTAN and install it in the your TeX system. It too is just a set of TeX macro packages. IMPORTANT NOTE. You need a copy of xmltex.tex latex than 2001/11/30.

Now you can use xmltex on a file called (eg) teiu5.fo in one of two ways:
  1. Build an xmltex format file for pdfTeX with
    pdftex -ini "&pdflatex" pdfxmltex.ini
    and process your file with
    pdflatex "&pdfxmltex" teiu5.fo
    The command pdfxmltex used above is just a script which does
    tex -fmt=pdfxmltex -progname=pdfxmltex
    Or,
  2. Make a wrapper file called (eg) teiu5.tex looking like this:
    \def\xmlfile{teiu5.fo} \input xmltex
    and run pdfTeX on it as normal with
    pdflatex teiu5.tex
Do not worry, xmltex knows how to find the PassiveTeX macros as it needs them. You will likely need to increase TeX memory values (in the file texmf.cnf if you use a Web2c-based TeX); I use:
main_memory = 2500000 param_size = 1500 stack_size = 1500 hash_extra = 50000 string_vacancies = 45000 pool_free = 47500 nest_size = 500 save_size = 10000 pool_size = 500000 max_strings = 55000
For reference, the PassiveTeX package consists of the following files:
  • The core xmltex `style' files for XSL FO XML:
    fotex.xmt fotex.sty
  • Support for direct formatting of TEI XML with xmltex
    tei.xmt teixml.sty
  • Some support files, shared with JadeTeX:
    unicode.sty ucharacters.sty mlnames.sty dummyels.sty nomulticol.sty

NOTE: TeX has a limit on the length of line it can read, and some .fo files you generate may cause TeX to die with an message about increasing buf_size. If you get that, edit your texmf.cnf file, increase the size of buf_size (mine is 200000), and remake any format files.

3.1. LaTeX package dependencies

This setup assumes you have a decent modern TeX setup. The TeX Live 6 CD-ROM is what I use, and it is up to date (see http://www.tug.org/texlive/).

Here is a list of the packages loaded in a typical run of PassiveTeX, with their version numbers where known:
amsbsy.sty 1999/11/29 v1.2d
amsfonts.sty 1997/09/17 v2.2e
amsgen.sty 1999/11/30 v2.0
amsmath.sty 2000/03/29 v2.08 AMS math features
amsopn.sty 1999/12/14 v2.01 operator names
amssymb.sty 1996/11/03 v2.2b
amstext.sty 1999/11/15 v2.0
array.sty 1998/05/13 v2.3m Tabular extension package (FMi)
article.cls 1999/09/10 v1.4a Standard LaTeX document class
bm.sty 1999/07/05 v1.0g Bold Symbol Support (DPC/FMi)
color.sty 1999/02/16 v1.0i Standard LaTeX Color (DPC)
fontenc.sty (version not available)
graphics.sty 1999/02/16 v1.0l Standard LaTeX Graphics (DPC,SPQR)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
hpdftex.def 2000/05/08 v6.70f Hyperref driver for pdfTeX
hyperref.sty 2000/05/08 v6.70f Hypertext links for LaTeX
ifthen.sty 1999/09/10 v1.1b Standard LaTeX ifthen package (DPC)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
longtable.sty 1998/05/13 v4.09 Multi-page Table package (DPC)
multicol.sty 1999/10/21 v1.5w multicolumn formatting (FMi)
nameref.sty 2000/05/08 v2.18 Cross-referencing by name of section
ot1phv.fd 2000/01/12 PSNFSS-v8.1 scalable font definitions for OT1/phv.
pd1enc.def 2000/05/08 v6.70f Hyperref: PDFDocEncoding definition (HO)
pifont.sty 2000/01/12 PSNFSS-v8.1 Pi font support (SPQR)
rotating.sty 1997/09/26, v2.13 Rotation package
size10.clo 1999/09/10 v1.4a Standard LaTeX file (size option)
stmaryrd.sty 1994/03/03 St Mary's Road symbol package
t1enc.def 1999/12/08 v1.9x Standard LaTeX file
t1phv.fd 2000/01/12 PSNFSS-v8.1 scalable font definitions for T1/phv.
t1ptm.fd 2000/01/12 PSNFSS-v8.1 font definitions for T1/ptm.
t2acmr.fd 1999/01/07 v1.0 Computer Modern Cyrillic font definitions
t2aenc.def 1999/11/29 v1.0c Cyrillic encoding definition file
t3enc.def (version not available)
textcomp.sty 1999/12/08 v1.9x Standard LaTeX package
times.sty 2000/01/12 PSNFSS-v8.1 Times font as default roman (SPQR)
tipa.sty 1996/06/10 TIPA version 1.0
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
ts1enc.def 1998/06/12 v3.0d (jk/car/fm) Standard LaTeX file
ts1ptm.fd 2000/01/12 PSNFSS-v8.1 font definitions for TS1/ptm.
ulem.sty 1997/04/21
umsa.fd 1995/01/05 v2.2e AMS font definitions
umsb.fd 1995/01/05 v2.2e AMS font definitions
upsy.fd 2000/01/12 PSNFSS-v8.1 font definitions for U/psy.
upzd.fd 2000/01/12 PSNFSS-v8.1 font definitions for U/pzd.
url.sty 1999/03/28 ver 1.5x Verb mode for urls, etc.
Ustmry.fd (version not available)
uwasy.fd 1999/05/13 v1.0iWasy-2 symbol font definitions
wasysym.sty 1999/05/13 v1.0i Wasy-2 symbol support package

4. LICENSE

Copyright 2003 Sebastian Rahtz/Oxford University (sebastian.rahtz@oucs.ox.ac.uk)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and any associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

5. Extensions

PassiveTeX interprets MathML natively (elements must use the MathML namespace). I also support a bookmark element in the fotex namespace, used to make PDF bookmarks. Usage is like this:
<xsl:template match="div2"> <xsl:apply-templates select="head"/> <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" fotex-bookmark-level="2" fotex-bookmark-label="{@id}"> <xsl:value-of select="head"/> </fotex:bookmark> </fo:block> </xsl:template>

6. Notes on conformance to the XSL specification

The following general limitations apply to most of the PassiveTeX implementation of XSL FO:
  1. The `px' unit is not recognised
  2. Absolute dimensions always work, but proportional ones are often not recognized
  3. The functions allowed in attribute values are usually not recognized
  4. There is no error checking at all, and all properies are recognized; do not assume that they do anything...
Most of the formatting objects are implemented more or less; the following are not implemented at all:
  1. fo:bidi-override
  2. fo:color-profile
  3. fo:declarations
  4. fo:initial-property-set
  5. fo:instream-foreign-object
  6. fo:multi-case
  7. fo:multi-properties
  8. fo:multi-property-set
  9. fo:multi-switch
  10. fo:multi-toggle
  11. fo:region-end
  12. fo:region-start
  13. fo:table-footer

6.1. Properties needed for basic conformance

alignment-adjustauto | percentage | length | inheritBasic 2. should be possible
azimuthangle | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards | inheritBasic 4. N/A
background-colorcolor | transparent | inheritBasic 3. does not really map in TeX
baseline-identifierbaseline | before-edge | text-before-edge | middle | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | inheritBasic 3. not at all sure where to start
baseline-shiftbaseline | sub | super | percentage | length | inheritBasic 1. basically works
block-progression-dimensionauto | length | percentage | length-range | inheritBasic 3. do not really understand it
border-after-colorcolor | inheritBasic 2. works for blocks (non-breaking)
border-after-styleborder-style | inheritBasic 2. works for blocks (non-breaking)
border-after-widthborder-width | length-conditional | inheritBasic 2. works for blocks (non-breaking)
border-before-colorcolor | inheritBasic 2. works for blocks (non-breaking)
border-before-styleborder-style | inheritBasic 2. works for blocks (non-breaking)
border-before-widthborder-width | length-conditional | inheritBasic 2. works for blocks (non-breaking)
border-bottom-colorcolor | inheritBasic 2. works for blocks (non-breaking)
border-bottom-styleborder-style | inheritBasic 1. used in places
border-bottom-widthborder-width | inheritBasic 2. works for blocks (non-breaking)
border-end-colorcolor | inheritBasic 2. works for blocks (non-breaking)
border-end-styleborder-style | inheritBasic 2. works for blocks (non-breaking)
border-end-widthborder-width | inheritBasic 2. works for blocks (non-breaking)
border-left-colorcolor | inheritBasic 2. works for blocks (non-breaking)
border-left-styleborder-style | inheritBasic 2. works for blocks (non-breaking)
border-left-widthborder-width | inheritBasic 2. works for blocks (non-breaking)
border-right-colorcolor | inheritBasic 2. works for blocks (non-breaking)
border-right-styleborder-style | inheritBasic 2. works for blocks (non-breaking)
border-right-widthborder-width | inheritBasic 2. works for blocks (non-breaking)
border-start-colorcolor | inheritBasic 2. works for blocks (non-breaking)
border-start-styleborder-style | inheritBasic 2. works for blocks (non-breaking)
border-start-widthborder-width | inheritBasic 2. works for blocks (non-breaking)
border-top-colorcolor | inheritBasic 2. works for blocks (non-breaking)
border-top-styleborder-style | inheritBasic 1. used in places
border-top-widthborder-width | inheritBasic 2. works for blocks (non-breaking)
break-afterauto | column | page | even-page | odd-page | inheritBasic 0. should be working
break-beforeauto | column | page | even-page | odd-page | inheritBasic 0. should be working
charactercharacterBasic 0. should be working
clipshape | auto | inheritBasic 2. theoretically possible
colorcolor | inheritBasic 1. more or less complete
column-numbernumberBasic 0. OK
column-widthlengthBasic 0. OK
content-typestring | autoBasic 4. N/A, I think
cue-afteruri | none | inherit Basic 4. N/A
cue-beforeuri | none | inherit Basic 4. N/A
directionltr | rtl | inheritBasic 3. waiting for extended TeX
display-alignauto | before | center | after | inheritBasic 0. working
dominant-baselineauto | autosense-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | inheritBasic 3. dont know where to begin
elevationangle | below | level | above | higher | lower | inheritBasic 4. N/A
end-indentlength | inheritBasic 0. working
flow-namenameBasic 0. working
font-family[[ family-name | generic-family ],]* [family-name | generic-family] | inheritBasic 1. more or less OK
font-sizeabsolute-size | relative-size | length | percentage | inheritBasic 1. more or less all implemented
font-stylenormal | italic | oblique | backslant | inheritBasic 1. no oblique or backslant
font-variantnormal | small-caps | inheritBasic 0. done
font-weightnormal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inheritBasic 1. normal and bold only at present, others to follow
formatstringBasic 3. dont want to think about it
grouping-separatorcharacterBasic 3. dont want to think about it
grouping-sizenumberBasic 3. dont want to think about it
heightlength | percentage | auto | inheritBasic 2. should be OK, waiting for a need
id idBasic 0. used
initial-page-numberauto | auto-odd | auto-even | number | inheritBasic 0. done
inline-progression-dimensionauto | length | percentage | length-range | inheritBasic 3. have not considered at all
keep-with-nextkeep | inheritBasic 1. done in theory, not working 100%
keep-with-previouskeep | inheritBasic 1. done in theory, not working 100%
leader-lengthlength-range | inheritBasic 2. waiting to do soon
leader-patternspace | rule | dots | use-content | inheritBasic 2. waiting to do soon
letter-valueauto | alphabetic | traditionalBasic 3. dont want to think about it
line-heightnormal | length | number | percentage | space | inheritBasic 1. largely done
line-stacking-strategyline-height | font-height | max-height | inheritBasic 3. untouched
margin-bottommargin-width | inheritBasic 1. done in places
margin-leftmargin-width | inheritBasic 1. done in places
margin-rightmargin-width | inheritBasic 1. done in places
margin-topmargin-width | inheritBasic 1. done in places
master-namenameBasic 0. ok
max-heightlength | percentage | none | inherit Basic 2. should be doable
max-widthlength | percentage | none | inheritBasic 2. should be doable
min-heightlength | percentage | inherit Basic 2. should be doable
min-widthlength | percentage | inheritBasic 2. should be doable
number-columns-repeatednumberBasic 2. doable in theory
number-columns-spannednumberBasic 2. doable in theory
number-rows-spannednumberBasic 2. doable in theory
orphansinteger | inheritBasic 2. should be doable
overflowvisible | hidden | scroll | auto | inheritBasic 2. theoretically
padding-afterpadding-width | length-conditional | inheritBasic 1. implemented crudely
padding-beforepadding-width | length-conditional | inheritBasic 1. implemented crudely
padding-bottompadding-width | inheritBasic 1. implemented crudely
padding-endpadding-width | inheritBasic 1. implemented crudely
padding-leftpadding-width | inheritBasic 1. implemented crudely
padding-rightpadding-width | inheritBasic 1. implemented crudely
padding-startpadding-width | inheritBasic 1. implemented crudely
padding-toppadding-width | inheritBasic 1. implemented crudely
page-break-afterauto | always | avoid | left | right | inheritBasic 1. Mostly implemented
page-break-beforeauto | always | avoid | left | right | inheritBasic 1. Mostly implemented
page-heightauto | indefinite | length | inheritBasic 1. not all possibilities
page-widthauto | indefinite | length | inheritBasic 1. not all possibilities
pause-aftertime | percentage | inheritBasic 4. N/A
pause-beforetime | percentage | inheritBasic 4. N/A
pitchfrequency | x-low | low | medium | high | x-high | inheritBasic 4. N/A
pitch-rangenumber | inheritBasic 4. N/A
play-duringuri mix? repeat? | auto | none | inherit Basic 4. N/A
precedencetrue | false | inheritBasic 3. do not know where to start
provisional-distance-between-startslength | inheritBasic 1. does something, probably wrong
provisional-label-separationlength | inheritBasic 1. does something, probably wrong
ref-ididref | inheritBasic 0. used in pagenumber
reference-orientation 0 | 90 | 180 | 270 | -90 | -180 | -270 | inheritBasic 2. doable for most objects
region-namexsl-region-body | xsl-region-start | xsl-region-end | xsl-region-before | xsl-region-after | xsl-before-float-separator | xsl-footnote-separator | nameBasic 0. done
relative-alignbefore | baseline | inheritBasic 3. have not got to grips with this
richnessnumber | inheritBasic 4. N/A
rolestring | none | inheritBasic 4. N/A what should I do with it?
rule-stylenone | dotted | dashed | solid | double | groove | ridge | inheritBasic 1. done as far as possible
rule-thicknesslengthBasic 0. done
source-documenturi+ | none | inheritBasic 4. N/A not sure what to do with it
space-afterspace | inheritBasic 1. working more or less
space-beforespace | inheritBasic 1. working more or less
space-endspace | inheritBasic 1. working more or less
space-startspace | inheritBasic 1. working more or less
speaknormal | none | spell-out | inheritBasic 4. N/A
speak-headeronce | always | inheritBasic 4. N/A
speak-numeraldigits | continuous | inheritBasic 4. N/A
speak-punctuationcode | none | inheritBasic 4. N/A
speech-ratenumber | x-slow | slow | medium | fast | x-fast | faster | slower | inheritBasic 4. N/A
src uri | inheritBasic 0. implemented
start-indentlength | inheritBasic 0. done
stressnumber | inheritBasic 4. N/A
text-alignstart | center | end | justify | inside | outside | left | right | string | inheritBasic 0. done
text-indentlength | percentage | inheritBasic 0. done
visibilityvisible | hidden | collapse | inheritBasic 2. I think can do this
voice-family[[specific-voice | generic-voice ],]* [specific-voice | generic-voice ] | inheritBasic 4. N/A
volumenumber | percentage | silent | x-soft | soft | medium | loud | x-loud | inheritBasic 4. N/A
widowsinteger | inheritBasic 2. should be doable
widthlength | percentage | auto | inheritBasic 2. should be OK, waiting for a need
wrap-optionno-wrap | wrap | inheritBasic 0. should be working
writing-modelr-tb | rl-tb | tb-rl | lr | rl | tb | inheritBasic 3. will need an extended TeX
z-indexauto | integer | inheritBasic 3. dont know where to start

6.2. Properties needed for full conformance

absolute-positionauto | absolute | fixed | inheritComplete 2. should be doable
background[background-color || background-image || background-repeat || background-attachment || background-position | ]]inheritComplete 1. implemented but very fragile
background-position[ [percentage | length ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ] | inheritComplete
border[ border-width || border-style || color ] | inheritComplete
border-bottom[ border-top-width || border-style || color ] | inheritComplete
border-colorcolor{1,4} | transparent | inheritComplete
border-left[ border-top-width || border-style || color ] | inheritComplete
border-right[ border-top-width || border-style || color ] | inheritComplete
border-spacinglength length? | inheritComplete
border-styleborder-style{1,4} | inheritComplete
border-top[ border-top-width || border-style || color ] | inheritComplete
border-widthborder-width{1,4} | inheritComplete
caption-sidebefore | after | start | end | top | bottom | left | right | inheritComplete
cuecue-before || cue-after | inheritComplete
font[ [ font-style || font-variant || font-weight ]? font-size [ / line-height]? font-family ] | caption | icon | menu | message-box | small-caption | status-bar | inheritComplete
marginmargin-width{1,4} | inherit Complete
paddingpadding-width{1,4} | inheritComplete
page-break-insideavoid | auto | inheritComplete
pause[time | percentage]{1,2} | inheritComplete
positionstatic | relative | absolute | fixed | inheritComplete
sizelength{1,2} | auto | landscape | portrait | inheritComplete
vertical-alignbaseline | middle | sub | super | text-top | text-bottom | percentage | length | top | bottom | inheritComplete
white-spacenormal | pre | nowrap | inheritComplete
xml:langcountry-language | inheritComplete 2. not done yet, but will be

6.3. Properties needed for extended conformance

table-layoutauto | fixed | inheritExtended.Fallback: fixed
background-attachmentscroll | fixed | inheritExtended.Fallback: Initial value 2. I can see where I might start
background-imageuri | none | inheritExtended.Fallback: Initial value 2. I can see where I might start
background-position-horizontalpercentage | length | left | center | right | inheritExtended.Fallback: Initial value 2. I can see where I might start
background-position-verticalpercentage | length | top | center | bottom | inheritExtended.Fallback: Initial value 2. I can see where I might start
border-collapsecollapse | separate | inheritExtended.Fallback: Initial value
border-separationlength-bp-ip-direction | inheritExtended.Fallback: Initial value
column-countnumber | inheritExtended.Fallback: Initial value 0. implemented
content-heightauto | length | percentage | inheritExtended.Fallback: Initial value 1. done for graphics
content-widthauto | length | percentage | inheritExtended.Fallback: Initial value 1. done for graphics
countrynone | country | inheritExtended.Fallback: Initial value 2. waiting to find a use for it
empty-cellsshow | hide | inheritExtended.Fallback: Initial value
ends-rowyes | noExtended.Fallback: Initial value
font-height-override-afteruse-font-metrics | length | inheritExtended.Fallback: Initial value 3. need extended TeX
font-height-override-beforeuse-font-metrics | length | inheritExtended.Fallback: Initial value 3. need extended TeX
font-size-adjustnumber | none | inheritExtended.Fallback: Initial value 2. doable, I think
font-stretchnormal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded |inheritExtended.Fallback: Initial value 0. should be OK
glyph-orientation-horizontalangle | inheritExtended.Fallback: Initial value 3. need extended TeX
glyph-orientation-verticalauto | angle | inheritExtended.Fallback: Initial value 3. need extended TeX
hyphenatefalse | true | inheritExtended.Fallback: Initial value 0. done
keep-togetherkeep | inheritExtended.Fallback: Initial value
languagenone | language | inheritExtended.Fallback: Initial value 0. done, if underlying TeX system OK
last-line-end-indentlength | percentage | inheritExtended.Fallback: Initial value
leader-alignmentnone | reference-area | page | inheritExtended.Fallback: Initial value
leader-pattern-widthuse-font-metrics | length | inheritExtended.Fallback: Initial value
letter-spacingnormal | length | space | inheritExtended.Fallback: Initial value 2. doable in limited circumstances
line-height-shift-adjustmentconsider-shifts | disregard-shifts | inheritExtended.Fallback: Initial value
linefeed-treatmentignore | preserve | treat-as-space | inheritExtended.Fallback: Initial value 2. doable, if tiresome
relative-positionauto | static | relative | inheritExtended.Fallback: Initial value
scalinguniform | non-uniform | inheritExtended.Fallback: Initial value 0. ok
scaling-methodauto | integer-pixels | resample-any-method | inheritExtended.Fallback: Initial value 4. N/A, I think
score-spacestrue | false | inheritExtended.Fallback: Initial value 3. dont think I can do this
space-treatmentignore | preserve | inheritExtended.Fallback: Initial value 0. seems to work
spannone | all | inheritExtended.Fallback: Initial value 3. proving hard
starts-rowyes | noExtended.Fallback: Initial value 0. works
suppress-at-line-breakauto | suppress | retain | inheritExtended.Fallback: Initial value
table-omit-footer-at-breakyes | noExtended.Fallback: Initial value
table-omit-header-at-breakyes | noExtended.Fallback: Initial value
text-align-lastrelative | start | center | end | justify | inside | outside | left | right | string | inheritExtended.Fallback: Initial value 1. works, usually
text-decorationnone | [ [ underline | no-underline] || [ overline | no-overline ] || [ line-through | no-line-through ] || [ blink | no-blink ] ] | inheritExtended.Fallback: Initial value 1. done for some possibilities, not all
text-shadownone | [color || length length length? ,]* [color || length length length?] | inheritExtended.Fallback: Initial value
text-transformcapitalize | uppercase | lowercase | none | Extended.Fallback: Initial value 2. doable
treat-as-word-spaceauto | yes | no | inheritExtended.Fallback: Initial value
white-space-collapsefalse | true | inheritExtended.Fallback: Initial value 0. Done
word-spacingnormal | length | space | inheritExtended.Fallback: Initial value
bottomlength | percentage | auto | inheritExtended.Fallback: N/A due to fallback for absolute-position, relative-position 2. doable, I think
leftlength | percentage | auto | inheritExtended.Fallback: N/A due to fallback for absolute-position, relative-position 2. doable, I think
rightlength | percentage | auto | inheritExtended.Fallback: N/A due to fallback for absolute-position, relative-position 2. doable, I think
toplength | percentage | auto | inheritExtended.Fallback: N/A due to fallback for absolute-position, relative-position 2. doable, I think
column-gaplength | percentage | inheritExtended.Fallback: N/A due to fallback for column-count 1. implemented (not for all value types)
hyphenation-charactercharacter | inheritExtended.Fallback: N/A due to fallback for hyphenate 3. need to think about how to do this
hyphenation-keepauto | column | page | inheritExtended.Fallback: N/A due to fallback for hyphenate 3. not sure how to do this
hyphenation-ladder-countno-limit | number | inheritExtended.Fallback: N/A due to fallback for hyphenate 3. I dont see how to do this
hyphenation-push-character-countnumber | inheritExtended.Fallback: N/A due to fallback for hyphenate 2. I think this maps in TeX
hyphenation-remain-character-countnumber | inheritExtended.Fallback: N/A due to fallback for hyphenate 2. I think this maps in TeX
color-profile-namename | inheritExtended.Fallback: N/A use fallback for fo:color-profile 3. would need a lot of thought
rendering-intentauto | perceptual | relative-colorimetric | saturation | absolute-colorimetric | inheritExtended.Fallback: N/A use fallback for fo:color-profile 3. not sure how to do this
clearstart | end | left | right | both | none | inheritExtended.Fallback: N/A use fallback for fo:float
floatbefore | start | end | left | right | none | inheritExtended.Fallback: N/A use fallback for fo:float
marker-class-namenameExtended.Fallback: N/A use fallback for fo:marker
active-statelink | visited | active | hover | focusExtended.Fallback: N/A use fallback for fo:multi-properties
auto-restoreyes | noExtended.Fallback: N/A use fallback for fo:multi-switch
case-namenameExtended.Fallback: N/A use fallback for fo:multi-switch
case-titlestringExtended.Fallback: N/A use fallback for fo:multi-switch
starting-stateshow | hideExtended.Fallback: N/A use fallback for fo:multi-switch
switch-toxsl-preceding | xsl-following | xsl-any | name[ name]*Extended.Fallback: N/A use fallback for fo:multi-switch
extentlength | percentage | inheritExtended.Fallback: N/A use fallback for fo:region-before, fo:region-after, fo:region-start, and fo:region-end
blank-or-not-blankblank | not-blank | any | inheritExtended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives 3. dont want to think about it
odd-or-evenodd | even | any | inheritExtended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives
page-positionfirst | last | rest | any | inheritExtended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives
maximum-repeatsnumber | no-limit | inheritExtended.Fallback: N/A use fallback for fo:repeatable-page-master-reference and fo:repeatable-page-master-alternatives
retrieve-boundarypage | page-sequence | documentExtended.Fallback: N/A use fallback for fo:retrieve-marker
retrieve-class-namenameExtended.Fallback: N/A use fallback for fo:retrieve-marker 1. works usually
retrieve-positionfirst-starting-within-page | first-including-carryover | last-starting-within-page | last-ending-within-pageExtended.Fallback: N/A use fallback for fo:retrieve-marker
destination-placement-offsetlengthExtended.Fallback: N/A use fallback for fo:simple-link
external-destinationuri-referenceExtended.Fallback: N/A use fallback for fo:simple-link 0. works ok
indicate-destinationyes | noExtended.Fallback: N/A use fallback for fo:simple-link 1. should work
internal-destinationnull string | idrefExtended.Fallback: N/A use fallback for fo:simple-link 0. works
show-destinationreplace | newExtended.Fallback: N/A use fallback for fo:simple-link
force-page-countauto | even | odd | end-on-even | end-on-odd | no-force | inheritExtended.Fallback: no-force
background-repeatrepeat | repeat-x | repeat-y | no-repeat | inheritExtended.Fallback: no-repeat
scriptnone | auto | script | inheritExtended.Fallback: none 4. dont know what to do with it
unicode-bidinormal | embed | bidi-override | inheritExtended.Fallback: See prose

7. Sample files

8. Concerns and problems

Some points to bear in mind
  1. This is an experimental system to check whether the idea works. Expect something more polished eventually.
  2. You need a modern TeX setup (like teTeX or TeX Live) to get to grips with it.
  3. Quite a few flow objects and characteristics are not dealt with yet. I will add support for more things as needed or requested.
  4. I do not have any objective check that what I think XSL FOs are supposed to do is actually right :-}
  5. I have only worked so far with the TEI Lite (XML version) and Docbook DTDs, and probably misinterpreted half of what they say.

9. Things for LaTeX users to remember

  • No use is made of LaTeX high-level constructs. No sections, no lists, no cross-refs, no bibliographies; on the other hand, some extensions in the fotex: namespace are supported (eg to get Acrobat bookmarks)
  • XSL FO's underlying character set is Unicode; by default, entities are mapped to their Unicode position;
  • All vertical and horizontal space is explicit in the specification
  • Page and line breaking is left to TeX: the rest is up to you.

10. Future directions

  • Complete the MathML handling
  • Handle more variety in property values (eg colors, fonts)
  • Deal with more complex tables
  • Support SVG. How?
    • By direct intepretation and mapping to raw PDF
    • By translation to MetaPost, and spawning a MetaPost process
    • By pre-processing to existing TeX graphics languages
    In any case, SVG fragments need to be recognized directly to perform in-line graphical functions (setting text at an angle?)
  • Use Unicode-based TeX variant (Omega) to handle non-Latin material more naturally

I will be very glad to discuss details with anyone. Contact me (Sebastian Rahtz) as sebastian.rahtz@it.ox.ac.uk