|
From: | Moritz Klammler |
Subject: | Duplicate variable values when using texi2any --pdf -D 'VARIABLE VALUE' |
Date: | Sun, 20 Sep 2020 17:56:52 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
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.
document.texi
Description: Text Data
patch.diff
Description: Text Data
0x8AE0FE4977592DF7.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |