groff
[Top][All Lists]
Advanced

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

Re: Suggestions needed how to deal with tbl material in html output


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

Hi Anthony,

You made my day! I had known the alternative manpage formatter mandoc by
name for a while but I had never been aware of its built-in tbl
processing capabilities.

I challenged the mdoc(7) instructions by by providing an extremely
minimal file, being just a wrapper, to my tabular material:

.\" This is the wrapper wrapper.mdoc used to feed tbl descriptions to mandoc
.so my_table_here.tbl

mandoc -T html wrapper.mdoc > test.html

delivers promising results.

Then I became daring and tried

mandoc -T html my_table.tbl > test.html

and it worked, too.

The behemoth table I attached to my first post in this thread came out
as intended, still needing a bit of tweaking here and there, but since
style instructions are already contained in the file it these offer
themselves for manipulation.

Tables with horizontal lines do not display perfectly for the moment,
but this should be fixable.

The only element which I use extensively (for comment boxes below
tables, different sections etc.) that is not always treated properly by
mandoc is .T& but then, .T& is only a shorthand which saves the effort
to store the description of *all* table lines in the tbl header.

Just to give an impression of what mandoc can do to a table of average
complexity, I included the original and the mandoc conversion result. I
use a few macros which are mostly text substituted and did not yet
bother to adapt my input file. You can see the output file, it looks
definitely promising, much more than I hoped for, and a little bit of
tinkering will produce the desired results.

Since my goal was a 95:5 goal anyway (save 95% of the manual work by
investing 5% of total time) and I was always prepared for intervention,
this is the way to go.

Thank you very much again, Anthony, and everybody who took the time to
read and send private suggestions.

Oliver.


On 05/03/2021 17:38, Anthony J. Bentley wrote:
Hi Oliver,

Oliver Corff writes:
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.
How well does 'mandoc -Thtml' handle your inputs?

Attachment: 1979_0650_Landwirtschaft_Viehhaltung_Produktionsleistung.tbl
Description: Text document


reply via email to

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