Publishing printed critical editions from TEI
Publishing printed critical editions from TEI encoded files is possible, but requires the use of third-party tools and some specific knowledge. This page aims at providing information on the various ways of producing a camera-ready file, including the usual features of critical editions, i.e. multiple layers of footnotes, and optionally footnotes referencing the line numbers in the text, instead of footnote calls, etc.
This transformation could be most easily done with XSL FO, but it is unclear whether FO supports the more elaborate options needed in a complex critical edition, like the multiple layers of footnotes or the references to line numbers. Any precision or experience on this welcome. For features unsupported by FO, the recommended solution is to convert the TEI to another format, which allows the publication as wanted.
TEI to InDesign
InDesign does not support round-tripping (converting back to XML TEI)
TEI to PDF / PS
There are TEI to LaTeX stylesheets, with the expectation of processing using XeLaTeX, and they come with a command-line script "teitolatex" for Unix/Linux. But there's a lot more to do there to get the right output.
ledmac is a LaTeX extension which can be used for this precise purpose. Maybe one can think of using: TEI > XSLT > LaTeX with ledmac > PDF
Checking this page Typesetting Critical Editions with LaTeX, about ledmac, will provide useful information.
The TEI Critical Apparatus Toolbox offers a feature with a visual interface guiding users through a transformation of a TEI XML critical edition (parallel segmentation method only) into a PDF, via LaTeX and RELEDMAC. The default transformation can be customised withou any knowledge of LaTeX, but users who know both XSLT and LaTeX also have the option of making advanced changes.
Example of a printed version of a volume of the Leibniz-Edition (Reihe 8), produced with LaTeX, which can be found as a pdf here: http://nbn-resolving.de/urn:nbn:de:kobv:b4-opus-11675 Some differences between TUSTEP and LaTeX by comparing the two printed Leibniz volumes:
- TUSTEP can count the lines as well in normal footnotes (margins), whereas LaTeX/ledmac cannot (or at least we haven't found a way to do so). This is however no problem, because you can for example use the package "fnlineno" for that.
- LaTeX has advantages with the math mode, which was extremely helpful in editing the mathematical texts of Leibniz.
ConTeXt is a document processing system which is a TeX macro package created and maintained by Pragma ADE. On ConTeXt wiki (contextgarden) there is a nicely written description of typesetting TEI XML with ConTeXt:  (there is a good succinct description of TEI strenghts and limitations, too).
Advantage: does the job
Drawback: very difficult to learn
The powerful typesetting routines support up to 9 critical apparatuses, layers of footnotes, endnotes, marginal notes, synopses (with individual apparatuses), special characters and character sets etc. A further benefit is that programming and typesetting interact very smoothly and in various directions. Thus, you can enrich the original XML-Markup with page or line references of the printed result automatically, which is useful when electronic and printed editions are supposed to accompany each other. TEI data (as all XML data) can be imported easily into TUSTEP. It treats XML data string based but not as node tree, which might be an advantage and a disadvantage as well. The output is PS or PDF. Therefore TEI > XSLT (to prepare encoding for TUSTEP with XML technologies) > TUSTEP > PDF or TEI <> TUSTEP > PDF are possible workflows respectively. Once the typesetting routine is set up for a specific edition it can be plugged as black box into XML-environments (e.g. Oxygen) to "typeset-on-demand" during XML-encoding. The shortcomings: Learning TUSTEP is not a walk in the park and there are no prepackaged solutions or patterns or cookbooks. A scholar with no or minor technical background will need support to get things work. For more information in English see http://www.tustep.uni-tuebingen.de/tustep_eng.html, which covers a list of scholarly edition made with use of TUSTEP. For editions produced with TUSTEP have a look at http://www.uni-muenster.de/Leibniz/bd_1_1_2009.html or http://www.albertus-magnus-institut.de/MeteoraSpecimen.pdf for example.
With TUSTEP roundtripping is no problem. Sometimes one just wants to have the information about page- and linebreaks within your outgoing XML, in order to show that information later in an online representation or use it while comparing the output with further witnesses. Then how do you do that? Here you need a system that can give you a XML-output with just that information.
Just besides, TUSTEP is much more than a publishing system. Within the scope of a critical edition you usually need to enrich data in various forms, compare witnesses, automatically generate apparatuses and indexes etc. TUSTEP even comprises a very powerful scripting language of it's own, Tuscript.
Advantage: very good
TEI -> XSLT -> XSL:FO -> XEP -> PDF
Nota: FOP http://xmlgraphics.apache.org/fop/ can be a free alternative, depending on your needs (it does not implement all XSL FO)