## Text Encoding Initiative

# PassiveTeX

Home

Summary

How does it work?

Installation

LICENSE

Extensions

Notes on conformance to the XSL specification

Sample files

Concerns and problems

Things for LaTeX users to remember

Future directions

PassiveTeX
Sebastian Rahtz
March 2003

## 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.

## 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 Mike Kay's Saxon XSL processor:

      java com.icl.saxon.StyleSheet -o teiu5.fo teiu5.xml tei.xsl

(assuming you have `saxon.jar` and `sax.jar` on your CLASSPATH). 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. For a comparison with an HTML rendering of the same document (using XSL again), see teiu5.html on the TEI pages.

## 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.

### 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

## 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.

## 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>

## 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`

### Properties needed for basic conformance

alignment-adjust | auto | percentage | length | inherit | Basic | 2. should be possible
azimuth | angle | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards | inherit | Basic | 4. N/A
background-color | color | transparent | inherit | Basic | 3. does not really map in TeX
baseline-identifier | baseline | before-edge | text-before-edge | middle | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | inherit | Basic | 3. not at all sure where to start
baseline-shift | baseline | sub | super | percentage | length | inherit | Basic | 1. basically works
block-progression-dimension | auto | length | percentage | length-range | inherit | Basic | 3. do not really understand it
border-after-color | color | inherit | Basic | 2. works for blocks (non-breaking)
border-after-style | border-style | inherit | Basic | 2. works for blocks (non-breaking)
border-after-width | border-width | length-conditional | inherit | Basic | 2. works for blocks (non-breaking)
border-before-color | color | inherit | Basic | 2. works for blocks (non-breaking)
border-before-style | border-style | inherit | Basic | 2. works for blocks (non-breaking)
border-before-width | border-width | length-conditional | inherit | Basic | 2. works for blocks (non-breaking)
border-bottom-color | color | inherit | Basic | 2. works for blocks (non-breaking)
border-bottom-style | border-style | inherit | Basic | 1. used in places
border-bottom-width | border-width | inherit | Basic | 2. works for blocks (non-breaking)
border-end-color | color | inherit | Basic | 2. works for blocks (non-breaking)
border-end-style | border-style | inherit | Basic | 2. works for blocks (non-breaking)
border-end-width | border-width | inherit | Basic | 2. works for blocks (non-breaking)
border-left-color | color | inherit | Basic | 2. works for blocks (non-breaking)
border-left-style | border-style | inherit | Basic | 2. works for blocks (non-breaking)
border-left-width | border-width | inherit | Basic | 2. works for blocks (non-breaking)
border-right-color | color | inherit | Basic | 2. works for blocks (non-breaking)
border-right-style | border-style | inherit | Basic | 2. works for blocks (non-breaking)
border-right-width | border-width | inherit | Basic | 2. works for blocks (non-breaking)
border-start-color | color | inherit | Basic | 2. works for blocks (non-breaking)
border-start-style | border-style | inherit | Basic | 2. works for blocks (non-breaking)
border-start-width | border-width | inherit | Basic | 2. works for blocks (non-breaking)
border-top-color | color | inherit | Basic | 2. works for blocks (non-breaking)
border-top-style | border-style | inherit | Basic | 1. used in places
border-top-width | border-width | inherit | Basic | 2. works for blocks (non-breaking)
break-after | auto | column | page | even-page | odd-page | inherit | Basic | 0. should be working
break-before | auto | column | page | even-page | odd-page | inherit | Basic | 0. should be working
character | character | Basic | 0. should be working
clip | shape | auto | inherit | Basic | 2. theoretically possible
color | color | inherit | Basic | 1. more or less complete
column-number | number | Basic | 0. OK
column-width | length | Basic | 0. OK
content-type | string | auto | Basic | 4. N/A, I think
cue-after | uri | none | inherit | Basic | 4. N/A
cue-before | uri | none | inherit | Basic | 4. N/A
direction | ltr | rtl | inherit | Basic | 3. waiting for extended TeX
display-align | auto | before | center | after | inherit | Basic | 0. working
dominant-baseline | auto | autosense-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | inherit | Basic | 3. dont know where to begin
elevation | angle | below | level | above | higher | lower | inherit | Basic | 4. N/A
end-indent | length | inherit | Basic | 0. working
flow-name | name | Basic | 0. working
font-family | [[ family-name | generic-family ],]* [family-name | generic-family] | inherit | Basic | 1. more or less OK
font-size | absolute-size | relative-size | length | percentage | inherit | Basic | 1. more or less all implemented
font-style | normal | italic | oblique | backslant | inherit | Basic | 1. no oblique or backslant
font-variant | normal | small-caps | inherit | Basic | 0. done
font-weight | normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit | Basic | 1. normal and bold only at present, others to follow
format | string | Basic | 3. dont want to think about it
grouping-separator | character | Basic | 3. dont want to think about it
grouping-size | number | Basic | 3. dont want to think about it
height | length | percentage | auto | inherit | Basic | 2. should be OK, waiting for a need
id | id | Basic | 0. used
initial-page-number | auto | auto-odd | auto-even | number | inherit | Basic | 0. done
inline-progression-dimension | auto | length | percentage | length-range | inherit | Basic | 3. have not considered at all
keep-with-next | keep | inherit | Basic | 1. done in theory, not working 100%
keep-with-previous | keep | inherit | Basic | 1. done in theory, not working 100%
leader-length | length-range | inherit | Basic | 2. waiting to do soon
leader-pattern | space | rule | dots | use-content | inherit | Basic | 2. waiting to do soon
letter-value | auto | alphabetic | traditional | Basic | 3. dont want to think about it
line-height | normal | length | number | percentage | space | inherit | Basic | 1. largely done
line-stacking-strategy | line-height | font-height | max-height | inherit | Basic | 3. untouched
margin-bottom | margin-width | inherit | Basic | 1. done in places
margin-left | margin-width | inherit | Basic | 1. done in places
margin-right | margin-width | inherit | Basic | 1. done in places
margin-top | margin-width | inherit | Basic | 1. done in places
master-name | name | Basic | 0. ok
max-height | length | percentage | none | inherit | Basic | 2. should be doable
max-width | length | percentage | none | inherit | Basic | 2. should be doable
min-height | length | percentage | inherit | Basic | 2. should be doable
min-width | length | percentage | inherit | Basic | 2. should be doable
number-columns-repeated | number | Basic | 2. doable in theory
number-columns-spanned | number | Basic | 2. doable in theory
number-rows-spanned | number | Basic | 2. doable in theory
orphans | integer | inherit | Basic | 2. should be doable
overflow | visible | hidden | scroll | auto | inherit | Basic | 2. theoretically
padding-after | padding-width | length-conditional | inherit | Basic | 1. implemented crudely
padding-before | padding-width | length-conditional | inherit | Basic | 1. implemented crudely
padding-bottom | padding-width | inherit | Basic | 1. implemented crudely
padding-end | padding-width | inherit | Basic | 1. implemented crudely
padding-left | padding-width | inherit | Basic | 1. implemented crudely
padding-right | padding-width | inherit | Basic | 1. implemented crudely
padding-start | padding-width | inherit | Basic | 1. implemented crudely
padding-top | padding-width | inherit | Basic | 1. implemented crudely
page-break-after | auto | always | avoid | left | right | inherit | Basic | 1. Mostly implemented
page-break-before | auto | always | avoid | left | right | inherit | Basic | 1. Mostly implemented
page-height | auto | indefinite | length | inherit | Basic | 1. not all possibilities
page-width | auto | indefinite | length | inherit | Basic | 1. not all possibilities
pause-after | time | percentage | inherit | Basic | 4. N/A
pause-before | time | percentage | inherit | Basic | 4. N/A
pitch | frequency | x-low | low | medium | high | x-high | inherit | Basic | 4. N/A
pitch-range | number | inherit | Basic | 4. N/A
play-during | uri mix? repeat? | auto | none | inherit | Basic | 4. N/A
precedence | true | false | inherit | Basic | 3. do not know where to start
provisional-distance-between-starts | length | inherit | Basic | 1. does something, probably wrong
provisional-label-separation | length | inherit | Basic | 1. does something, probably wrong
ref-id | idref | inherit | Basic | 0. used in pagenumber
reference-orientation | 0 | 90 | 180 | 270 | -90 | -180 | -270 | inherit | Basic | 2. doable for most objects
region-name | xsl-region-body | xsl-region-start | xsl-region-end | xsl-region-before | xsl-region-after | xsl-before-float-separator | xsl-footnote-separator | name | Basic | 0. done
relative-align | before | baseline | inherit | Basic | 3. have not got to grips with this
richness | number | inherit | Basic | 4. N/A
role | string | none | inherit | Basic | 4. N/A what should I do with it?
rule-style | none | dotted | dashed | solid | double | groove | ridge | inherit | Basic | 1. done as far as possible
rule-thickness | length | Basic | 0. done
source-document | uri+ | none | inherit | Basic | 4. N/A not sure what to do with it
space-after | space | inherit | Basic | 1. working more or less
space-before | space | inherit | Basic | 1. working more or less
space-end | space | inherit | Basic | 1. working more or less
space-start | space | inherit | Basic | 1. working more or less
speak | normal | none | spell-out | inherit | Basic | 4. N/A
speak-header | once | always | inherit | Basic | 4. N/A
speak-numeral | digits | continuous | inherit | Basic | 4. N/A
speak-punctuation | code | none | inherit | Basic | 4. N/A
speech-rate | number | x-slow | slow | medium | fast | x-fast | faster | slower | inherit | Basic | 4. N/A
src | uri | inherit | Basic | 0. implemented
start-indent | length | inherit | Basic | 0. done
stress | number | inherit | Basic | 4. N/A
text-align | start | center | end | justify | inside | outside | left | right | string | inherit | Basic | 0. done
text-indent | length | percentage | inherit | Basic | 0. done
visibility | visible | hidden | collapse | inherit | Basic | 2. I think can do this
voice-family | [[specific-voice | generic-voice ],]* [specific-voice | generic-voice ] | inherit | Basic | 4. N/A
volume | number | percentage | silent | x-soft | soft | medium | loud | x-loud | inherit | Basic | 4. N/A
widows | integer | inherit | Basic | 2. should be doable
width | length | percentage | auto | inherit | Basic | 2. should be OK, waiting for a need
wrap-option | no-wrap | wrap | inherit | Basic | 0. should be working
writing-mode | lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit | Basic | 3. will need an extended TeX
z-index | auto | integer | inherit | Basic | 3. dont know where to start

### Properties needed for full conformance

absolute-position | auto | absolute | fixed | inherit | Complete | 2. should be doable
background | [background-color || background-image || background-repeat || background-attachment || background-position | ]]inherit | Complete | 1. implemented but very fragile
background-position | [ [percentage | length ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ] | inherit | Complete |
border | [ border-width || border-style || color ] | inherit | Complete |
border-bottom | [ border-top-width || border-style || color ] | inherit | Complete |
border-color | color{1,4} | transparent | inherit | Complete |
border-left | [ border-top-width || border-style || color ] | inherit | Complete |
border-right | [ border-top-width || border-style || color ] | inherit | Complete |
border-spacing | length length? | inherit | Complete |
border-style | border-style{1,4} | inherit | Complete |
border-top | [ border-top-width || border-style || color ] | inherit | Complete |
border-width | border-width{1,4} | inherit | Complete |
caption-side | before | after | start | end | top | bottom | left | right | inherit | Complete |
cue | cue-before || cue-after | inherit | Complete |
font | [ [ font-style || font-variant || font-weight ]? font-size [ / line-height]? font-family ] | caption | icon | menu | message-box | small-caption | status-bar | inherit | Complete |
margin | margin-width{1,4} | inherit | Complete |
padding | padding-width{1,4} | inherit | Complete |
page-break-inside | avoid | auto | inherit | Complete |
pause | [time | percentage]{1,2} | inherit | Complete |
position | static | relative | absolute | fixed | inherit | Complete |
size | length{1,2} | auto | landscape | portrait | inherit | Complete |
vertical-align | baseline | middle | sub | super | text-top | text-bottom | percentage | length | top | bottom | inherit | Complete |
white-space | normal | pre | nowrap | inherit | Complete |
xml:lang | country-language | inherit | Complete | 2. not done yet, but will be

### Properties needed for extended conformance

table-layout | auto | fixed | inherit | Extended.Fallback: fixed |
background-attachment | scroll | fixed | inherit | Extended.Fallback: Initial value | 2. I can see where I might start
background-image | uri | none | inherit | Extended.Fallback: Initial value | 2. I can see where I might start
background-position-horizontal | percentage | length | left | center | right | inherit | Extended.Fallback: Initial value | 2. I can see where I might start
background-position-vertical | percentage | length | top | center | bottom | inherit | Extended.Fallback: Initial value | 2. I can see where I might start
border-collapse | collapse | separate | inherit | Extended.Fallback: Initial value |
border-separation | length-bp-ip-direction | inherit | Extended.Fallback: Initial value |
column-count | number | inherit | Extended.Fallback: Initial value | 0. implemented
content-height | auto | length | percentage | inherit | Extended.Fallback: Initial value | 1. done for graphics
content-width | auto | length | percentage | inherit | Extended.Fallback: Initial value | 1. done for graphics
country | none | country | inherit | Extended.Fallback: Initial value | 2. waiting to find a use for it
empty-cells | show | hide | inherit | Extended.Fallback: Initial value |
ends-row | yes | no | Extended.Fallback: Initial value |
font-height-override-after | use-font-metrics | length | inherit | Extended.Fallback: Initial value | 3. need extended TeX
font-height-override-before | use-font-metrics | length | inherit | Extended.Fallback: Initial value | 3. need extended TeX
font-size-adjust | number | none | inherit | Extended.Fallback: Initial value | 2. doable, I think
font-stretch | normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded |inherit | Extended.Fallback: Initial value | 0. should be OK
glyph-orientation-horizontal | angle | inherit | Extended.Fallback: Initial value | 3. need extended TeX
glyph-orientation-vertical | auto | angle | inherit | Extended.Fallback: Initial value | 3. need extended TeX
hyphenate | false | true | inherit | Extended.Fallback: Initial value | 0. done
keep-together | keep | inherit | Extended.Fallback: Initial value |
language | none | language | inherit | Extended.Fallback: Initial value | 0. done, if underlying TeX system OK
last-line-end-indent | length | percentage | inherit | Extended.Fallback: Initial value |
leader-alignment | none | reference-area | page | inherit | Extended.Fallback: Initial value |
leader-pattern-width | use-font-metrics | length | inherit | Extended.Fallback: Initial value |
letter-spacing | normal | length | space | inherit | Extended.Fallback: Initial value | 2. doable in limited circumstances
line-height-shift-adjustment | consider-shifts | disregard-shifts | inherit | Extended.Fallback: Initial value |
linefeed-treatment | ignore | preserve | treat-as-space | inherit | Extended.Fallback: Initial value | 2. doable, if tiresome
relative-position | auto | static | relative | inherit | Extended.Fallback: Initial value |
scaling | uniform | non-uniform | inherit | Extended.Fallback: Initial value | 0. ok
scaling-method | auto | integer-pixels | resample-any-method | inherit | Extended.Fallback: Initial value | 4. N/A, I think
score-spaces | true | false | inherit | Extended.Fallback: Initial value | 3. dont think I can do this
space-treatment | ignore | preserve | inherit | Extended.Fallback: Initial value | 0. seems to work
span | none | all | inherit | Extended.Fallback: Initial value | 3. proving hard
starts-row | yes | no | Extended.Fallback: Initial value | 0. works
suppress-at-line-break | auto | suppress | retain | inherit | Extended.Fallback: Initial value |
table-omit-footer-at-break | yes | no | Extended.Fallback: Initial value |
table-omit-header-at-break | yes | no | Extended.Fallback: Initial value |
text-align-last | relative | start | center | end | justify | inside | outside | left | right | string | inherit | Extended.Fallback: Initial value | 1. works, usually
text-decoration | none | [ [ underline | no-underline] || [ overline | no-overline ] || [ line-through | no-line-through ] || [ blink | no-blink ] ] | inherit | Extended.Fallback: Initial value | 1. done for some possibilities, not all
text-shadow | none | [color || length length length? ,]* [color || length length length?] | inherit | Extended.Fallback: Initial value |
text-transform | capitalize | uppercase | lowercase | none | | Extended.Fallback: Initial value | 2. doable
treat-as-word-space | auto | yes | no | inherit | Extended.Fallback: Initial value |
white-space-collapse | false | true | inherit | Extended.Fallback: Initial value | 0. Done
word-spacing | normal | length | space | inherit | Extended.Fallback: Initial value |
bottom | length | percentage | auto | inherit | Extended.Fallback: N/A due to fallback for absolute-position, relative-position | 2. doable, I think
left | length | percentage | auto | inherit | Extended.Fallback: N/A due to fallback for absolute-position, relative-position | 2. doable, I think
right | length | percentage | auto | inherit | Extended.Fallback: N/A due to fallback for absolute-position, relative-position | 2. doable, I think
top | length | percentage | auto | inherit | Extended.Fallback: N/A due to fallback for absolute-position, relative-position | 2. doable, I think
column-gap | length | percentage | inherit | Extended.Fallback: N/A due to fallback for column-count | 1. implemented (not for all value types)
hyphenation-character | character | inherit | Extended.Fallback: N/A due to fallback for hyphenate | 3. need to think about how to do this
hyphenation-keep | auto | column | page | inherit | Extended.Fallback: N/A due to fallback for hyphenate | 3. not sure how to do this
hyphenation-ladder-count | no-limit | number | inherit | Extended.Fallback: N/A due to fallback for hyphenate | 3. I dont see how to do this
hyphenation-push-character-count | number | inherit | Extended.Fallback: N/A due to fallback for hyphenate | 2. I think this maps in TeX
hyphenation-remain-character-count | number | inherit | Extended.Fallback: N/A due to fallback for hyphenate | 2. I think this maps in TeX
color-profile-name | name | inherit | Extended.Fallback: N/A use fallback for fo:color-profile | 3. would need a lot of thought
rendering-intent | auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric | inherit | Extended.Fallback: N/A use fallback for fo:color-profile | 3. not sure how to do this
clear | start | end | left | right | both | none | inherit | Extended.Fallback: N/A use fallback for fo:float |
float | before | start | end | left | right | none | inherit | Extended.Fallback: N/A use fallback for fo:float |
marker-class-name | name | Extended.Fallback: N/A use fallback for fo:marker |
active-state | link | visited | active | hover | focus | Extended.Fallback: N/A use fallback for fo:multi-properties |
auto-restore | yes | no | Extended.Fallback: N/A use fallback for fo:multi-switch |
case-name | name | Extended.Fallback: N/A use fallback for fo:multi-switch |
case-title | string | Extended.Fallback: N/A use fallback for fo:multi-switch |
starting-state | show | hide | Extended.Fallback: N/A use fallback for fo:multi-switch |
switch-to | xsl-preceding | xsl-following | xsl-any | name[ name]* | Extended.Fallback: N/A use fallback for fo:multi-switch |
extent | length | percentage | inherit | Extended.Fallback: N/A use fallback for fo:region-before, fo:region-after, fo:region-start, and fo:region-end |
blank-or-not-blank | blank | not-blank | any | inherit | Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives | 3. dont want to think about it
odd-or-even | odd | even | any | inherit | Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives |
page-position | first | last | rest | any | inherit | Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives |
maximum-repeats | number | no-limit | inherit | Extended.Fallback: N/A use fallback for fo:repeatable-page-master-reference and fo:repeatable-page-master-alternatives |
retrieve-boundary | page | page-sequence | document | Extended.Fallback: N/A use fallback for fo:retrieve-marker |
retrieve-class-name | name | Extended.Fallback: N/A use fallback for fo:retrieve-marker | 1. works usually
retrieve-position | first-starting-within-page | first-including-carryover | last-starting-within-page | last-ending-within-page | Extended.Fallback: N/A use fallback for fo:retrieve-marker |
destination-placement-offset | length | Extended.Fallback: N/A use fallback for fo:simple-link |
external-destination | uri-reference | Extended.Fallback: N/A use fallback for fo:simple-link | 0. works ok
indicate-destination | yes | no | Extended.Fallback: N/A use fallback for fo:simple-link | 1. should work
internal-destination | null string | idref | Extended.Fallback: N/A use fallback for fo:simple-link | 0. works
show-destination | replace | new | Extended.Fallback: N/A use fallback for fo:simple-link |
force-page-count | auto | even | odd | end-on-even | end-on-odd | no-force | inherit | Extended.Fallback: no-force |
background-repeat | repeat | repeat-x | repeat-y | no-repeat | inherit | Extended.Fallback: no-repeat |
script | none | auto | script | inherit | Extended.Fallback: none | 4. dont know what to do with it
unicode-bidi | normal | embed | bidi-override | inherit | Extended.Fallback: See prose |

## Sample files

- The TEI Lite description (teiu5.xml) converted PDF as teiu5.pdf
- A TEI test file (exercise.xml) converted to PDF as exercise.pdf
- A physics paper (teimath.xml) containing a fair amount of MathML markup, originally translated from LaTeX into XML. It is used extensively as an example in the LaTeX Web Companion. Here we see it converted to teimath.pdf using test/teimath.xsl
- James Tauber prepared a simple XSL spec (darkness.xsl) for Joseph Conrad's Heart of Darkness, which I ran to PDF as darkness.pdf

## 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.

## 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.

## 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@oucs.ox.ac.uk