Bug#815369: [BUG] command line definitions not expanded
> >Did this ever work, and if so, which version of texinfo.tex and > >texi2dvi? Forget this - sorry for the noise - this was introduced recently by Debian packaging. Can be closed on the texinfo side. Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live & Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Bug#815369: [BUG] command line definitions not expanded
Hi Gavin, no idea, guess so. I'll try on texinfo 4.8 in stable. I just was informed of the report and it seems that it was working before. I'll investigate, and hope that the maintainer of the package will comment, too. Thanks Norbert On 21 February 2016 19:18:39 GMT+09:00, Gavin Smith wrote: >On 21 February 2016 at 09:50, Norbert Preining >wrote: >> HI Gavin, >> >>> The problem is that @setfilename is missing from the file, and >>> texi2dvi looks for that line to add the extra line. @setfilename was >>> required before, so this isn't a regression (I hope). >> >> Ahh, I see. The original did have a line like this: >> @setfilename @value{cmd1}.info >> so it might be necessary to add it *before* this line. >> > >Did this ever work, and if so, which version of texinfo.tex and >texi2dvi? --- PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live & Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Bug#815369: [BUG] command line definitions not expanded
On 21 February 2016 at 09:50, Norbert Preining wrote: > HI Gavin, > >> The problem is that @setfilename is missing from the file, and >> texi2dvi looks for that line to add the extra line. @setfilename was >> required before, so this isn't a regression (I hope). > > Ahh, I see. The original did have a line like this: > @setfilename @value{cmd1}.info > so it might be necessary to add it *before* this line. > Did this ever work, and if so, which version of texinfo.tex and texi2dvi?
Bug#815369: [BUG] command line definitions not expanded
HI Gavin, > The problem is that @setfilename is missing from the file, and > texi2dvi looks for that line to add the extra line. @setfilename was > required before, so this isn't a regression (I hope). Ahh, I see. The original did have a line like this: @setfilename @value{cmd1}.info so it might be necessary to add it *before* this line. Here is the had of the original file (gnat_rm.texi): \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename @value{fngnatrm}.info @documentencoding UTF-8 @ifinfo @*Generated by Sphinx 1.3b2.@* @end ifinfo @settitle GNAT Reference Manual @defindex ge @paragraphindent 0 @exampleindent 4 @finalout @dircategory GNU Ada Tools @direntry * @value{fngnatrmlong}: (@value{fngnatrm}). Reference Manual for GNU Ada tools. @end direntry @definfoenclose strong,`,' @definfoenclose emph,`,' @c %**end of header Maybe better to add it *before* the @setfilename directive? Thanks Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live & Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Bug#815369: [BUG] command line definitions not expanded
On 21 February 2016 at 06:19, Norbert Preining wrote: > Hi Gavin, hi all > > (please keep Cc) > > I am sorry for all the bug reports, but here is the next one that > surfaced when building the documentation for gcc. > > In short, it seems that definitions given on the command line > --command='@set foobar value' > are not properly expanded in the aux files. > > Here a minimal not working example: > > The following code works without problems: > \input texinfo @c -*-texinfo-*- > @set cmd1 HELLO > > What ever > @anchor{@value{cmd1} doc}@anchor{0} > Here we go > @bye > > But when I remove the @set line and instead call > texi2pdf --command='@set cmd1 HELLO' mwe.texi > I get the following error: > > /home/norbert/Debian/gcc-doc/mwe/mwe.aux:1: TeX capacity exceeded, sorry > [input > stack size=5000]. > @value ->@begingroup @makevalueexpandable > @valuexxx > . > l.1 ..., used in @value, is not set.} doc-title}{} > > > The reason is that the mwe.aux file contains: > > @xrdef{{[No value for ``cmd1'']}@message {Variable `cmd1', used in @value, is > not set.} doc-title}{} The problem is that @setfilename is missing from the file, and texi2dvi looks for that line to add the extra line. @setfilename was required before, so this isn't a regression (I hope). Here's a patch. Please try it, and if it works fine, I'll commit it and upload the new texi2dvi. It might work fine just to always add the extra lines after the first, depending on how people use this command: for example, --command "\ngngnngng" would break for older versions of texinfo.tex (similarly index commands could break, and possibly others as well). I can't think of a likely use-case which would break, but it's more reliable to do it this way. Index: texi2dvi === --- texi2dvi(revision 7006) +++ texi2dvi(working copy) @@ -1312,7 +1312,14 @@ insert_commands () verbose "Inserting extra commands: $textra" case $in_lang in latex) textra_cmd=1i;; - texinfo) textra_cmd='/^@setfilename/a';; + texinfo) +# If @setfilename is used in the first few lines of the file, +# add the extra lines after it, otherwise add after the first line. +if sed 10q "$in_input" | grep "^@setfilename"; then + textra_cmd='/^@setfilename/a' +else + textra_cmd=1a +fi ;; *) error 1 "internal error, unknown language: $in_lang";; esac $SED "$textra_cmd\\
Bug#815369: [BUG] command line definitions not expanded
Hi Gavin, hi all (please keep Cc) I am sorry for all the bug reports, but here is the next one that surfaced when building the documentation for gcc. In short, it seems that definitions given on the command line --command='@set foobar value' are not properly expanded in the aux files. Here a minimal not working example: The following code works without problems: \input texinfo @c -*-texinfo-*- @set cmd1 HELLO What ever @anchor{@value{cmd1} doc}@anchor{0} Here we go @bye But when I remove the @set line and instead call texi2pdf --command='@set cmd1 HELLO' mwe.texi I get the following error: /home/norbert/Debian/gcc-doc/mwe/mwe.aux:1: TeX capacity exceeded, sorry [input stack size=5000]. @value ->@begingroup @makevalueexpandable @valuexxx . l.1 ..., used in @value, is not set.} doc-title}{} The reason is that the mwe.aux file contains: @xrdef{{[No value for ``cmd1'']}@message {Variable `cmd1', used in @value, is not set.} doc-title}{} @xrdef{{[No value for ``cmd1'']}@message {Variable `cmd1', used in @value, is not set.} doc-snt}{} @xrdef{0-title}{} @xrdef{0-snt}{} @xrdef{{[No value for ``cmd1'']}\message {Variable `cmd1', used in @value, is not set.} doc-pg}{1} @xrdef{0-pg}{1} Thanks for consideration Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live & Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13