[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Duplicate variable values when using texi2any --pdf -D 'VARIABLE VAL
From: |
Gavin Smith |
Subject: |
Re: Duplicate variable values when using texi2any --pdf -D 'VARIABLE VALUE' |
Date: |
Sun, 20 Sep 2020 19:51:53 +0100 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Sun, Sep 20, 2020 at 05:56:52PM +0200, Moritz Klammler wrote:
> When texi2any is used as a driver for texi2dvi and variable definitions
> are given on the command line like so,
>
> texi2any --pdf -D 'VARIABLE VALUE' document.texi
>
> texi2any will pass --command='@set VARIABLE VALUE VALUE' to texi2dvi so
> the variable will have a duplicate value. The attached example
> demonstrates this. When running
>
> texi2any -D 'TheAnswer 42' document.texi
>
> the Info file contains "The answer is 42." as expected. However, when
> running
>
> texi2any --pdf -D 'TheAnswer 42' document.texi
>
> then the PDF file will contain "The answer is 42 42." instead.
>
> It seems that the problem is that texi2any tokenizes the argument given
> to the -D option but then uses the original raw text /followed/ by the
> extracted value, thus effectively duplicating the variable's value.
>
> The attached patch is supposed to fix this problem.
>
Thank you very much, I have committed it in commit d8c9d4e81.