## TEI-L@LISTSERV.BROWN.EDU

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Subject:

Re: tei tables -> fo -> pdf using fop

From:

Date:

Tue, 15 Feb 2005 12:10:51 +0800

Content-Type:

text/plain

Parts/Attachments:

 text/plain (100 lines)
 Funnily enough, I spent all day yesterday trying to do a similar thing -- convert to PDF a DocBook XML document that contains a lot of tables. FOP exited thus: [ERROR] -2 Eventually, I tried Sebastian Rahtz's PassiveTeX way (see http://www.tei-c.org.uk/Software/passivetex/). My Linux machine (Fedora Core 3) has all of the necessary software and Sebastian's macros installed already. My XML file is straightforward enough, containing numerous tables without any specifications concerning column width, etc. It transforms to HTML without any problems. To make a PDF, I followed Sebastian's instructions: (1) produce an fo file using Saxon to transform the XML file with Sebastian's stylesheet (tei/xsl/4.3.3/p4/fo/tei.xsl); (2) use pdfxmltex to produce a PDF from the fo file. While processing the fo file, pdfxmltex complained a lot; e.g.  ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help.  ... l.5 ..."2" hyphenation-remain-character-count="2"> Chapter^^c2^^a01.^^c2^^a0U... ? ! Missing number, treated as zero.                    \fotable25:5 l.145 ...ble-row>                                                                       \fotable25:5 l.145 ...ble-row>                                                                       \fotable25:5 l.145 ...ble-row>                                                    at the question mark prompts and a PDF file eventually appeared. Not surprisingly, given the complaints above, the tables are not properly formatted. There are also a number of spurious "- -4pc" and "0.60+1em" strings at the tops of pages and preceding list headings. Nevertheless, it did produce PDF. Best Tim Finney On Sun, 2005-02-13 at 14:04 -0500, Eric Lease Morgan wrote: > Does anybody here have experience converting TEI tables -> FO -> PDF > using fop? > > I am (slowly) marking up sets of etexts in TEI. I plan to provide > full-text searching against the collection and disseminated the whole > thing in various ebook formats. You can see what have done so far here: > > http://infomotions.com/alex2/ > > I have written various xslt stylesheets to convert my TEI to HTML, > SHTML, and plain text. My stylesheet to convert TEI to FO has hit a > roadblock when it comes to tables. Specifically, my FO processor (FOP) > does not support tables very well. It only seems to support fixed-width > cells and wants to know exactly how many columns there will be in each > table. Given the wide variety of table types I am to encounter, this > seem rather limiting. I am having a tough time writing a TEI -> FO > stylesheet that FOP can use. I'm getting desperate, and I'm about to > mark up my tables as pre-formatted paragraph. Ick. > > Does anybody here convert their TEI files into PDF documents, and if > so, how do you handle table data? > > -- > Eric Lease Morgan > University Libraries of Notre Dame