Hello Gavin, Gavin Smith <[email protected]> writes:
> On 4 March 2017 at 16:06, Gavin Smith <[email protected]> wrote: >> I thought of putting something inside @bye, but the problem is that >> penalties and glue are discarded when the page is empty, and anything >> else risks outputting a completely empty page at the end even when >> non-empty pages have been output already. >> >> If anyone sees a problem with the idea of starting out by always >> outputting an empty @vbox on the page, please say so. > > The problem with using a @vbox is that this leads to @topskip glue > being added before it as well as @parskip glue before whatever follows > it (whatever comes first in the user's document). > > Using a @mark didn't play well with the output routine in texinfo.tex, > but @special does work. An page with no boxes can be output if it has > a @special on it. I've committed a change that adds a @special to set > the paper size of the document (can be changed with @afourpaper etc.); > this should fix the problem. Thanks, I have updated the "texinfo.tex" distributed in Automake accordingly. What do you think of adding the following test in the Texinfo test suite?
Index: Makefile.am =================================================================== --- Makefile.am (révision 7678) +++ Makefile.am (copie de travail) @@ -64,4 +64,11 @@ DISTCLEANFILES = txixml2texi -TESTS=tests/texi2dvi_helpversion.sh +# Use 'texinfo.tex' from "$(top_srcdir)/doc" +AM_TESTS_ENVIRONMENT = \ + TEXINPUTS="$(top_srcdir)/doc$(PATH_SEPARATOR)$$TEXINPUTS"; \ + export TEXINPUTS; + +TESTS= \ + tests/texi2dvi_helpversion.sh \ + tests/texi2dvi_empty_text.sh Index: tests/texi2dvi_empty_text.sh =================================================================== --- tests/texi2dvi_empty_text.sh (nonexistent) +++ tests/texi2dvi_empty_text.sh (copie de travail) @@ -0,0 +1,25 @@ +#!/bin/sh + +# Ensure that texi2dvi handles a file without text. + +set -x + +filename="foo-$$" +texi2dvi=$srcdir/texi2dvi + +trap "rm -f $filename.texi $filename.dvi $filename.log" EXIT + +cat > "$filename.texi" <<'EOF' +\input texinfo +@setfilename foo.info +@settitle foo manual +@bye +EOF + +$texi2dvi -o "$filename.dvi" "$filename.texi" +if test $? -ne 0; then + cat "$filename.log" + exit 1 +fi + +:
That would help detecting if any future change will re-introduce that regression. -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
