[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix spacing issue in @verbatiminclude
From: |
Gavin Smith |
Subject: |
Re: fix spacing issue in @verbatiminclude |
Date: |
Fri, 1 Feb 2019 11:49:09 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Feb 01, 2019 at 11:02:40AM +0100, Werner LEMBERG wrote:
>
> [texinfoversion{2019-01-03-15}]
>
> The following input file `zzz.texi'
>
> \input texinfo
> @verbatiminclude yyy.txt
> @bye
>
> with file `yyy.txt'
>
> : a
> | b
>
> produces the attached image, showing that the space factor values
> aren't correctly set. The attached patch fixes this. However, I'm
> not sure whether this is the right fix, given that @verbatim doesn't
> show the faulty behaviour...
>
>
> Werner
Yes, it appears that \verbatiminclude and \verbatim are set up
differently. In both, a space character had an active definition which
expanded to the definition of \tie, which in turn used the definition of
'\ ' (control space). However, in \verbatiminclude, \indexnofonts had
given '\ ' a definition of ' ' - a regular space character. In
\verbatim, '\ ' retains its default definition from TeX, which is to
insert a space assuming that \spacefactor is 1000 - no extra space after
a colon or full stop.
Commenting out the \indexnofonts call in \doverbatiminclude solves the
problem. That was put there to support '@' in file names:
2008-10-20 Oleg Katsitadze <address@hidden>
* doc/texinfo.tex (\includezzz, \doverbatiminclude): Better fix
to allow @-commands in file names, as set up by \indexnofonts.
help-texinfo request from David Bateman, 13 Oct 2008 15:58:07.
This is (now) git commit fee2e28313b4a298429f2ee8f1218e888171162e.
https://lists.gnu.org/archive/html/help-texinfo/2008-10/msg00000.html
It seems quite disruptive to set \indexnofonts while the entire file is
being input, when the change only needed to be made for the sake of the
filename. I checked and \indexnofonts is indeed needed to include a
file with '@' in the name (even though there is also
\parseargusing\filenamecatcodes).
I followed the example of \include and confined the effect of \indexnofonts
to a group outside of which the file is input. Fixed in git commit
970a289.
Maybe another fix would have been to change the definition of
\filenamecatcodes or make another macro that could have been used for
\parseargusing.