At present, tables are presented as space-separated columns in text. Tables with more visual markup would be more readable.
I checked in a version with a new option, --NEW_TXT, it requires a patched HTML::FormatText::WithLinks::AndTables which I'll get to you soon. Not 100% happy with it ATM, but it's not too bad.
Not greatly happy with the new formatter when use on complex tables. I've added a new parameter, txt_formater, which allows controlling which formatter to use. Default is current formatter. 'links' is HTML::FormatText::WithLinks 'tables' is HTML::FormatText::WithLinks::AndTables Requires lots of testing.
Jeff, Please advise if one of the above-mentioned parameters is required in the command for a text build. I just built a text version of a book with Publican 3.0 (publican build --formats=txt --langs=en-US) and the tables are rendering as: Table 1.1. Java EE Standards Technology Version in JBoss EAP 5.1 Version in JBoss EAP 4.3 Java EE 5.0 1.4 JavaBean Activation Framework (JAF) 1.1 1.1 Java API for XML-based RPC (JAX-RPC) 1.1 1.1 SOAP with Attachments API for Java (SAAJ) 1.3 1.3 ... ... ...
Documentation required for the new parameters. Publican User Guide 3.0 tracking ticket added to this issue.
(In reply to comment #3) > Jeff, > Please advise if one of the above-mentioned parameters is required in the > command for a text build. Controlling which text formatter is used requires setting txt_formater in the publican.cfg file. Unset is the old behaviour. txt_formater: links This is a slightly better layout, for complete doco run: man HTML::FormatText::WithLinks txt_formater: tables Is a different layout engine again, seems to work better with simple tables but fails on more complex ones. man HTML::FormatText::WithLinks::AndTables I think for this bug we should verify that the options work and then people can raise particular issues against the text formatters themselves.
Jeff, I rebuilt the document using both 'txt_formater: links' and 'txt_formater: tables' in the publican.cfg file. I also purged the tmp/ directory before each build, just to be sure. In both instances the table rendered as it is shown in my comment above (i.e. vertically). tl,dnr: It doesn't seem to be working.
make book with table. build with publican 2.8 build with publican 3.0 compare output.
Checked on publican-3.0-0.fc16.t180 Added following parameters to publican.cfg file: txt_formater: links txt_formater: tables Table rows render in alternate colours, providing a better visual distinction between rows. Behaviour in comment 6 was not observed.
(In reply to comment #8) > Checked on publican-3.0-0.fc16.t180 > > Added following parameters to publican.cfg file: > > txt_formater: links > txt_formater: tables > > Table rows render in alternate colours, providing a better visual > distinction between rows. Behaviour in comment 6 was not observed. Had a chat with Cheryn and comment#8 may have been based upon the html output not the text output. Same behaviour as comment#6 / comment#3 was observed in publican-3.0-0.fc17.t210.noarch. ------------------ Steps to reproduce: 1. Create a book: publican create --name Test_Book --lang en-US 2. Add txt_formater to publican.cfg echo "txt_formater: tables" >> publican.cfg 2. Edit Chapter.xml and copy in the table example from http://docbook.org/tdg/en/html/table.html 3. Build: publican build --format txt --lang en-US 4. Examine the txt file in your editor: gedit tmp/en-US/txt/Test_Book.txt 5. Output as per comment#3 ---snip--- Table 1.1. Sample Table Horizontal Span a3 a4 a5 f1 f2 f3 f4 f5 b1 b2 b3 b4 Vertical Span [...]
Fixed typo where txt_formatters wasn't being checked properly. This revealed a bug in HTML::FormatText::WithLinks::AndTables, which I patched and updated from 0.01 to 0.02. Contacted package maintainer to get package updated in Fedora. We will need to document that the patches in the new package will need to be carried to support the modified txt layout.
I still get the cells displayed vertically as per comment 9 when I build with: publican-3.0-0.fc17.t213.noarch perl-HTML-FormatText-WithLinks-AndTables-0.02-2.fc17.noarch perl-HTML-FormatText-WithLinks-0.14-4.fc17.noarch ================================================== Table 4.1. 'Fedora' in Czech Case Usage Form Nominative the subject of a sentence Fedora Genitive indicates possession Fedory Accusative the direct object of a sentence Fedoru Dative the indirect object of a sentence Fedoře Vocative the subject of direct address Fedoro Locative relates to a location Fedoře Instrumental relates to a method Fedorou
Oops; forgot to set txt_formater :) With: txt_formater: tables the book builds and a simple table is rendered usefully: Table 4.1. 'Fedora' in Czech Case Usage Form Nominative the subject of a sentence Fedora Genitive indicates possession Fedory Accusative the direct object of a sentence Fedoru Dative the indirect object of a sentence Fedoře Vocative the subject of direct address Fedoro Locative relates to a location Fedoře Instrumental relates to a method Fedorou During the build though, there are multiple lines of: Use of uninitialized value $tag in concatenation (.) or string at /usr/share/perl5/vendor_perl/HTML/Formatter.pm line 150, <FH> line 12. output.