On Tue, Jun 17, 2025 at 11:58:44PM +0200, Vincent Lefevre wrote: > With texinfo.tex 2025-03-22.08, I get > > Permission is granted to copy, distribute and/or modify this document under > the terms of > the GNU Free Documentation License, Version 1.3 or any later version > published by the Free > Software Foundation; with no Invariant Sections, with no Front-Cover Texts, > and with no Back- > Cover Texts. A copy of the license is included in Appendix A [GNU Free > Documentation > License], page 2. > > with a large space between "in" and "Appendix A".
Thanks for tracking down the commit where the bug became apparent. In fact, it is possible this bug is 10 years old. It is a problem with the \requireauxfile macro, which is used to read the .aux file when required, rather than in @setfilename which was formerly mandatory in Texinfo files: 2015-09-05 Gavin Smith <[email protected]> * doc/texinfo.tex (\requireauxfile): New macro. (\refx, \Efloat): Use it. (\fixbackslash): Read texinfo.cnf here if it exists. (\setfilename): Do nothing. The problem is when the .aux file, consisting of many @xrdef lines, is read: @xrdef{GNU Free Documentation License-title}{GNU Free Documentation License} @xrdef{GNU Free Documentation License-snt}{Appendix@tie @char65{}} @xrdef{GNU Free Documentation License-pg}{2} - the definition of @xrdef absorbs its two braced arguments, but not the ends of line thereafter. Thus the input of the aux file is as if several empty lines appeared in the source at the point where it happened. I am guessing nobody ever noticed this before because the space is only inserted the first time \requireauxfile appears, and this is often early in the output in an inconspicuous location. I can think of two ways to fix this problem. The easier, I think, is to add an @ignorespaces line to the end of the definition of @xrdef, which would absorb a space token arising from an end of line: diff --git a/doc/texinfo.tex b/doc/texinfo.tex index b665be4d1a..0868b4327f 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -9419,6 +9419,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi + \ignorespaces } % If working on a large document in chapters, it is convenient to This seems harmless, so I have committed it and will upload shortly to ftp.gnu.org, but please let me know if there are further problems. The more complicated way would be to redirect output to a dummy box while reading the aux file, as is already done in a few places in texinfo.tex with \dummybox. The difficulty with this would be being sure we weren't redirecting output while output was already being output to the same dummy box, which wouldn't be that simple.
