Re: macro expansion problem

2025-02-08 Thread Werner LEMBERG
>> Alas, this fails with `@xrefautomaticsectiontitle on` and non-ASCII >> characters. Attached is an example that worked with `texinfo.tex` >> version 2025-01-31.21, and which now yields >> >> ``` >> ./ref.texinfo:19: Missing @endcsname inserted. > > It should be fixed now. It is, thanks!

Re: macro expansion problem

2025-02-07 Thread Gavin Smith
On Fri, Feb 07, 2025 at 06:30:19AM +, Werner LEMBERG wrote: > > I've made the changes already for texinfo.tex (in version > > 2025-02-03.17). > > Thanks again. Alas, this fails with `@xrefautomaticsectiontitle on` > and non-ASCII characters. Attached is an example that worked with > `texinfo

Re: macro expansion problem

2025-02-06 Thread Werner LEMBERG
[texinfo.tex 2025-02-06.22] > Yes, it was a bug. I've committed a fix in version 2025-02-06.22, > and rethought how the space trimming works for macro arguments and > hopefully made the implementation in texinfo.tex a bit simpler. > Thanks for the report. Thanks for the quick fix! > > > This

Re: macro expansion problem

2025-02-06 Thread Gavin Smith
On Thu, Feb 06, 2025 at 06:40:31AM +, Werner LEMBERG wrote: > Looks like a bug, since we actually have something similar in > LilyPond, and it works! My guess is that a combination of other > Texinfo commands 'fixes' this... Yes, it was a bug. I've committed a fix in version 2025-02-06.22, a

Re: macro expansion problem

2025-02-05 Thread Werner LEMBERG
[texinfo.tex 2025-02-03.17] > We should document that node names should not contain @macro-defined > macros, and texi2any could give a warning if a document does this. Yes, please do. > One possibility is to expand to the entire @node line instead, as in: > > @macro Node {name} > @node \n

Re: macro expansion problem

2025-02-05 Thread Gavin Smith
On Wed, Feb 05, 2025 at 02:56:29PM +, Werner LEMBERG wrote: > > > The reason, AFAICS, is that user-defined macros are not immediately > > expanded while writing an entry to the `.toc` file. Is there a > > reason for it? > > Note that it works just fine if I use `@set` and `@value` for the >

Re: macro expansion problem

2025-02-05 Thread Werner LEMBERG
> The reason, AFAICS, is that user-defined macros are not immediately > expanded while writing an entry to the `.toc` file. Is there a > reason for it? Note that it works just fine if I use `@set` and `@value` for the purpose shown in the file, and this is probably even a better solution for th

Re: macro expansion problem

2025-02-05 Thread Werner LEMBERG
[texinfo.tex 2025-02-03.17] > Please consider the attached example. Oops, here is the right example. Werner \input texinfo @macro A urgh @end macro @contents @node Top @top Top Top @unmacro A @macro A foo @end macro @node @A{} @chapter @A{} @A{} @page @unmacro A @macro A bar

macro expansion problem

2025-02-05 Thread Werner LEMBERG
Please consider the attached example. It works as expected if processed with `texi2any`. However, the output of `texi2pdf` is incorrect, producing a bad ToC. The reason, AFAICS, is that user-defined macros are not immediately expanded while writing an entry to the `.toc` file. Is there a reaso