bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: backslashes, macros, indexes, texinfo


From: Gavin Smith
Subject: Re: backslashes, macros, indexes, texinfo
Date: Sat, 8 Aug 2015 21:27:26 +0100

On 8 August 2015 at 20:31, David Kastrup <address@hidden> wrote:
> Gavin Smith <address@hidden> writes:
>> The change I've attached to this email works for macros taking a
>> single argument only, and allows backslashes to appear on their own in
>> braced arguments, while double backslashes are converted into a single
>> backslash.

>> I've attached a test file showing use of a @macro and a @rmacro for
>> braced and whole-line arguments. Please have a play around and post if
>> anything breaks.
>
> breaks.
>
> This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) 
> (preloaded format=pdfetex)
>  restricted \write18 enabled.
> entering extended mode
> (./music-glossary.texi (/usr/local/tmp/lilypond/tex/texinfo.tex
> Loading texinfo [version 2015-08-03.11]: pdf, fonts, markup, glyphs,
> page headings, tables, conditionals, indexing, sectioning, toc, environments,
> defuns, macros, cross references, insertions,
> (/usr/share/texlive/texmf-dist/tex/generic/epsf/epsf.tex
> This is `epsf.tex' v2.7.4 <14 February 2011>
> ) localization, formatting, and turning on texinfo input format.)
> (/usr/local/tmp/lilypond/tex/txi-en.tex) (./macros.texi (./version.texi)
> (./common-macros.texi{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}{/usr/l
> ocal/tmp/lilypond/tex/./out-www/lilypond.map} (./cyrillic.texi)))
> ./music-glossary.texi:39: Missing @endcsname inserted.
> <to be read again>
>                    @macroargdummy


The attached patch comments out the line that calls the macro that
adds this dummy token. It works with the test file attached.

All I can think of at the moment is not to add the dummy token at the
end of the argument, and not use the backslash as the last character
of the argument of the macro. It will work sometimes, depending on
which token a final backslash absorbs, but there are likely cases when
this could cause a problem as well.

I'd like to make the @macroargdummy token completely disappear at some
point, but maybe it isn't possible.

Attachment: ref-in-macro.texi
Description: TeXInfo document

Attachment: macro-backslash-no-terminator.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]