From b1655b295988694fb05b8388a953357c7c4804a8 Mon Sep 17 00:00:00 2001 From: Werner LEMBERG Date: Tue, 15 Mar 2005 10:14:15 +0000 Subject: [PATCH] makeinfo 4.8 doesn't produce good HTML output from groff.texinfo. * doc/fixinfo.sh: New script to postprocess makeinfo's HTML output. * doc/Makefile.in (.texinfo.html): Call fixinfo.sh. --- ChangeLog | 8 ++++++++ doc/Makefile.in | 3 ++- doc/fixinfo.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 doc/fixinfo.sh diff --git a/ChangeLog b/ChangeLog index 472b1a76..fa849fa1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-03-15 Werner LEMBERG + + makeinfo 4.8 doesn't produce good HTML output from groff.texinfo. + + * doc/fixinfo.sh: New script to postprocess makeinfo's HTML output. + + * doc/Makefile.in (.texinfo.html): Call fixinfo.sh. + 2005-03-14 Werner LEMBERG Add Cyrillic support to devutf8 and devhtml. diff --git a/doc/Makefile.in b/doc/Makefile.in index 5639710f..ac328e0c 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -102,7 +102,8 @@ imagedir=img .texinfo.pdf: $(TEXI2DVI) -e --pdf $< .texinfo.html: - $(MAKEINFO) --enable-encoding -I$(srcdir) --html --no-split $< + $(MAKEINFO) --enable-encoding -I$(srcdir) --html --no-split $< \ + && $(SHELL) $(srcdir)/fixinfo.sh $@ all: prepare_examples diff --git a/doc/fixinfo.sh b/doc/fixinfo.sh new file mode 100644 index 00000000..b5d91f52 --- /dev/null +++ b/doc/fixinfo.sh @@ -0,0 +1,46 @@ +#! /bin/sh +# +# Fix a problem with HTML output produced by makeinfo 4.8. +# +# groff.texinfo uses (after macro expansion) something like +# +# @deffn ... +# @XXindex ... +# @deffnx ... +# +# which has worked with earlier versions (using an undocumented feature +# of the implementation of @deffn and @deffnx). Version 4.8 has new +# code for generating HTML, and the above construction produces wrong +# HTML output: It starts a new
without closing it properly. +# The very problem is that, according to the documentation, the @deffnx +# must immediately follow the @deffn line, making it impossible to add +# entries into user-defined indices if supplied with macro wrappers around +# @deffn and @deffnx. +# +# Note that this script is a quick hack and tightly bound to the current +# groff.texinfo macro code. Hopefully, a new texinfo version makes it +# unnecessary. + +t=${TMPDIR-.}/gro$$.tmp + +cat $1 | sed ' +1 { + N + N +} +:b +$b +N +/^
\n

.*\n\n \—/ { + s/^

\n

\(.*\n\)\n \—/\1\—/ + n + N + N + bb +} +$b +P +D +' > $t +rm $1 +mv $t $1 -- 2.11.4.GIT