ftilmann / latexdiff

Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors
GNU General Public License v3.0
506 stars 72 forks source link

'latexdiff-vc -p preamble-file' not passing the argument to 'latexdiff' #265

Closed xlucn closed 4 months ago

xlucn commented 2 years ago

If I run latexdiff-vc -p preamble-file ..., latexdiff-vc will think of preamble-file as its own argument and not passing it to latexdiff. Maybe some other options also share this issue.

Fortunately for now, this works: latexdiff-vc --preamble=preamble-file .... Maybe requiring only --long-option=argument style for latexdiff options would be a simple solve :)

ftilmann commented 4 months ago

The logic latexdiff-vc uses to distinguish whether an argument is a latexdiff option or a file argument to latexdiff-vc is to look at the extension, and if it is .tex, .bbl, or.flt it assumes it's a file argument. This logic obviously fails when the first form is used. It would not be too difficult to fix but as the work-around is straightforward I will not do this. In case anyone else wants to fix this: I feel the simplest approach would simply be to introduce the -p option as an explicit option of latexdiff-vc in the GetOptions call, and then pass it through.

ftilmann commented 4 months ago

I changed the wording in the documentation to recommend long form options, though.