[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Grohtml mega patch
From: |
Gaius Mulley |
Subject: |
[Groff] Grohtml mega patch |
Date: |
01 Oct 2004 23:13:41 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Hi Werner,
here is the grohtml mega patch! Finally I've found time to finish them
and I think the resultant grohtml is _much_ improved. Maybe, I'm
hoping, it might make grohtml go into a beta state? Certainly the
doc/webpage.html looks pleasing, imho.
It contains many bug fixes and importantly it contains the patches to
allow troff to tell grohtml about the troff state machine when in
diversions.
What is good about this patch:
(*) diversions should work now (fixed .nf, .in within diversions etc)
(*) macro sets require less -Thtml specific code as a result (see
reduction of if '\(.T'html' in s.tmac and an-old.tmac)
(*) .IP fixed
(*) titles (such as the one in doc/webpage.ms) now work
(*) css style sheets can now be utilised (see doc/webpage.ms)
(*) www.tmac now has the ability to force paragraphs to end </p>
and then issue an html tag. See the macro .HTML</p> and how
this is used during the construction of unordered lists.
The resulting html is much cleaner.
(*) there is now a small regression test-suite, but hey it is very easy to
add more tests :-). At least they can be executed automatically
without the need to check them using a browser. You simply
cd groff-build-directory ; make check-groff
though developers will need to install dejagnu.
(*) the regression test is really a big step forward for grohtml.
I'm hoping it will be the silver bullet, to ultimately slay those
grohtml bugs.
Basically the regression test, tests the tags which are emitted
from `troff'. The generation of these tags is, I guess, 70% of the
total grohtml complexity. So at least this component is isolated and
can verified separately. Also they can be run without having to eye
ball the results..
(*) some regression tests force internal assertions against post-grohtml.
The www:ASSERT feature can be inserted into other tests easily
enough.
(*) works fine on Debian pure64, SuSE 9.1 64 bit, SuSE 9.1 32 bit
and Debian Stable 32 bit. Note that the regression tests don't
run on Debian stable as they require a more recent version of
Tcl (I think). But they do run on Debian unstable, SuSE 9.1
and probably many others.
What is bad about this patch:
(*) the size, this is bad, :-( sorry, and for python enthusiasts:
for i in range(100):
print "I promise to submit smaller patches in the future"
(*) remaining bugs include:
grohtml looses line breaks between tables.
It also incorrectly orders .HR, .LK, .HR I'm not sure
why yet.
but I thought it better to push these patches out rather than
sit on them for even more time :-)
(*) probably many more problems of which I'm not yet aware.
The diffs (relative to the current cvs) and the new files are held
here:
ftp://floppsie.comp.glam.ac.uk/pub/c/groff-diffs.tar.gz
Given the size of the patch I'll upload my sandbox copy of
groff-html.tar.gz to:
ftp://floppsie.comp.glam.ac.uk/pub/c/groff-html.tar.gz
just in case there are any files which you might want in their entirety.
Gaius
- [Groff] Grohtml mega patch,
Gaius Mulley <=