Add option to use FO processor to teitopdf
At the moment the commands "teitopdf" and "teitoslides" both use LaTex as an intermediate format for conversion to PDf. It would be better to add an option to use FO rather than to define a new command for that. Suggested name --method with values "LaTeX" (current default) or "FO" . The "FOengine" stylesheet parameter is independent of this, of course. We don't yet have any method of using FO to generate slides, but it would be nice to have a --method parameter there as well for when we do.
This raises the question of whether we should move the FOP libraries from the TEI repo to the Stylesheets. I dumped them into the TEI repo perhaps without enough forethought, because I was concentrating on getting Exemplar ODDs to build to PDF, but it seems more sensible that they be in the Stylesheets repo. That would enable PDF creation without the requirement for a working LaTeX install. So:
- Move the FOP lib from TEI to Stylesheets.
- Add the hyphenation library from http://offo.sourceforge.net/, assuming the license terms allow us to distribute it (I think they do).
- Add support and documentation for the --method parameter to bin/transformtei.
- Add required switching based on that parameter to pdf/build-to.xsl.
- Add the FOP ant task and targets to common/teianttasks.xml (there's a full working example in TEIC/TEI/P5/Test/antruntest.xml, from my work on #205).
As a supplementary, I'd like to add automated builds of TEI/P5/Test/testbasic.odd and TEI/P5/Exemplars/tei_simplePrint.odd to the Stylesheets Test/Makefile; not sure yet how the location of the matching versions of those files should be determined, but they could just be pulled from the last release unless a source parameter is supplied. If my reading of the Stylesheets Test Makefile is correct, the teitopdf transformation is not currently run as part of the tests; this is presumably because it entails a requirement for LaTeX to be installed, but if we bundle FOP there's no problem with doing it that way. The number of issues not directly related to FO/PDF generation that were thrown up on ticket #205 shows that there's intrinsic value in running such a test; FOP is quite picky and verbose about errors that no other process catches (such as varying column-counts in rows of the same table), so it'll be a useful addition to the Stylesheets tests.
Just bumping this (nearly ~8 year old!) ticket after struggling (and failing) to get the LaTeX build to work on my machine. It does work in Docker, but, at least for ODDs, the PDF from the FO version looks much nicer in many respects