groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestions needed how to deal with tbl material in html output


From: Oliver Corff
Subject: Suggestions needed how to deal with tbl material in html output
Date: Fri, 5 Mar 2021 13:29:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

Dear All,

Before writing these lines I tried to locate earlier discussions on tbl
to html output, but given 1,390 hits on "tbl" in the search window
alone, I did not find appropriate messages. I remember, though, that
there are some very good reasons why tbl should be rendered as html and
not as embedded graphics in html pages, especially if there are
hyperlinks in the table pointing outwards, or if pointing into a huge
table is desired. So, I wish I could find a working tbl -> html strategy
for my problem.

My problem: I reconstructed approx. 1,400 tables with varying degrees of
complexity and size; the two examples attached give a good indication of
both ends of the spectrum.

My status: All 1,400 tables were converted to pdf and png by wrapping
the tbl code in a minimal .ms document the output of which (in case of
pdf) was cropped to printed areas, or which was produced by the -Thtml
driver.

Everything looks as intended, so far.

Now the publication goal shifts more and more towards html, I and think
converting all tables to html should be my optimal goal.

What I tried so far:

- Eric Raymond's doclifter. I failed because I could not construct a
minimal .ms document which would not be rejected by doclifter, and every
time I try the error message relates to "internal errors". I fail at
making doclifter accept documents as simple as the following one:

.TL
My Title
.AU
Oliver Corff
.SH
First Section
.PP
Text follows here.

- I searched the net and found a roff package called troffcvt-1.04 which
promises html output
(http://www.snake.net/software/troffcvt/doc/troffcvt.html) which is by
now more than 23 years old; I failed to compile the whole package on my
modern system (and have been away from compiling my own sources for
about the same time). The package contains a tbl preprocessor written in
perl which produces an intermediate output format suitable for
troffcvt's own processing pipeline. See the attached files tbl.tbl and
tbl.cvtoutput.

Possible options:

- Attempt to convert troffcvt's tblcvt output to html by own perl
script; the output format is well documented:
http://www.snake.net/software/troffcvt/doc/tblcvt.html
- Attempt to go via groff -Ttxt and convert that output to html;
- Attempt to write my own restricted minimal tbl parser in perl which
directly outputs html code.

Given the number of input files, rewriting them by hand in html is not a
good idea (if it were two handful, then ok). I have a good month or so
which I could spend on tinkering a solution, but before I begin and run
into dead ends, what would your suggestion be?

Thank you very much, and please accept my apologies for this lengthy post.

Oliver.

Attachment: 1979_0826_Politbuero_Mitglieder.pdf
Description: Adobe PDF document

Attachment: 1979_0843_Postleitzahlen.pdf
Description: Adobe PDF document

Attachment: tbl.tbl
Description: Text document

Attachment: tbl.cvtoutput
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]