possible fix for overwide tables in PGTEI text (was: XML version of some books...)

Joshua Hutchinson wrote:
I'm curious to see if your script can handle tables. That is our current biggest bugaboo when it comes to transforming to PG TXT format.
Now that you mentioned it.... I've been playing with PGTEI, and encountered this problem (too wide tables) also. If anyone is wondering what we're talking about, please search for string "1271-95." in http://koti.welho.com/jkukkone/geo/teioutput.txt Oh, feel free to see the html version also while you're there: http://koti.welho.com/jkukkone/geo/teioutput.html (warning for modem users - some images might still be pretty large). So, I spent some time with Groff* and Tbl** manuals and I think I found a fix for this. Currently Tbl input tables look like this (3 rows, 2 columns): *** 1873. Livingstone discovers Lake Moero. 1874-75. Lieut. Cameron crosses equatorial Africa. 1875-94. Élisée Reclus publishes his _Géographie Universelle_. *** Tbl _can_ be instructed to wrap lines when needed by changing the input to this: *** T{ 1873. T} T{ Livingstone discovers Lake Moero. T} T{ 1874-75. T} T{ Lieut. Cameron crosses equatorial Africa. T} T{ 1875-94. T} T{ Élisée Reclus publishes his _Géographie Universelle_. T} *** According to my tests it works suprisingly well. Sometimes Tbl does wrap too eagerly, but I saw nothing that wasn't acceptable. Marcello (or anyone with some authority on PGTEI), I can try and come up with a patch for tei2nroff-common.xsl, if that's wished for. Let me know. - jussi *, ** For those not familiar with the more obscure unix tools: Groff, or GNU Troff, is a document typesetting tool used in PGTEI to produce TXT and PDB versions. Tbl is a table formatting tool used by Groff -- Jussi Kukkonen

Jussi Kukkonen wrote:
Tbl _can_ be instructed to wrap lines when needed by changing the input to this: *** T{ 1873. T} T{ Livingstone discovers Lake Moero. T} T{ 1874-75. T} T{ Lieut. Cameron crosses equatorial Africa. T} T{ 1875-94. T} T{ Élisée Reclus publishes his _Géographie Universelle_. T} ***
According to my tests it works suprisingly well. Sometimes Tbl does wrap too eagerly, but I saw nothing that wasn't acceptable.
Marcello (or anyone with some authority on PGTEI), I can try and come up with a patch for tei2nroff-common.xsl, if that's wished for. Let me know.
The new forthcoming version 0.3 of the PGTEI converter already does this. (with a little help from the markup: you have to manually specify the width of the column.) -- Marcello Perathoner webmaster@gutenberg.org
participants (2)
-
Jussi Kukkonen
-
Marcello Perathoner