[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: REVIEW REQUEST - user manual generation
From: |
Vincent Belaïche |
Subject: |
Re: Fwd: REVIEW REQUEST - user manual generation |
Date: |
Wed, 04 May 2016 23:40:33 +0200 |
Feedback below...
Le 04/05/2016 22:57, Gavin Smith a écrit :
> On 2 May 2016 at 20:53, Gavin Smith <address@hidden> wrote:
>> On 29 April 2016 at 09:27, Vincent Belaïche <address@hidden> wrote:
>>> Attached is an attempt to do that. Unfortunately using \egroup for group
>>> end does not work, because whether it is a \toks or a \def you need the
>>> the end of the definition terminated by a catcode=2 character.
>>>
>>> So, I need only one forbidden character in filenames (in addition to
>>> backslash) to make it.
>>
>> The use of \expandafter and groups seems like a good trick to get
>> arbitrary filenames.
>
> Been playing around with this, but appear to have hit a bug in my
> version of TeX:
>
> $ etex '\input test.texi'
> This is e-TeX, Version 3.141592-2.2 (Web2C 7.5.4)
> entering extended mode
> (./test.texi (./texinfo.tex Loading texinfo [version 2016-04-14.07]: pdf,
> fonts, markup, glyphs, page headings, tables, conditionals, indexing,
> sectioning, toc, environments, defuns, macros, cross references, insertions,
> (/usr/share/texmf/tex/generic/epsf/epsf.tex
> This is `epsf.tex' v2.7.4 <14 February 2011>
> ) localization, formatting, and turning on texinfo input format.)
> (./test2.texi
> Chapter 1 [1]) [2] )
> Output written on test.dvi (2 pages, 904 bytes).
> Transcript written on test.log.
> $ etex '\toks0={\input test.texi}\the\toks0'
> This is e-TeX, Version 3.141592-2.2 (Web2C 7.5.4)
> entering extended mode
>
> *x
> *** Error in `etex': malloc(): memory corruption: 0x09d4f6d0 ***
>
> ============
> (I typed the "x" here as input.) I may try upgrading to a newer
> version and see if the same happens.
That is defintely a bug : any crash is a bug. You should try
etex '\toks0={\input toto.texi\relax}\the\toks0'
because otherwise when \the\toks0 is expanded, then the \input command
is waiting from input to conclude the filename, as the filename has to
be terminated by a space or \relax.
The bug is probably that with the \input expansion etex reads past the
end of the argument string an ``infinite'' file name and doing so corrupt
somehow the memory.
Vincent.
Re: Fwd: REVIEW REQUEST - user manual generation, Gavin Smith, 2016/05/03
Re: Fwd: REVIEW REQUEST - user manual generation, Gavin Smith, 2016/05/04