![我应该如何将 latexdiff 选项传递给 latexdiff-vc?](https://linux22.com/image/429876/%E6%88%91%E5%BA%94%E8%AF%A5%E5%A6%82%E4%BD%95%E5%B0%86%20latexdiff%20%E9%80%89%E9%A1%B9%E4%BC%A0%E9%80%92%E7%BB%99%20latexdiff-vc%EF%BC%9F.png)
我使用latexdiff-vc -r paper\paper.tex
来比较当前 .tex 文件与最近提交到 Git 存储库的版本的差异。如果引用在版本之间没有变化,则此命令效果很好。但是,如果引用在版本之间发生变化,则需要使用 的latexdiff
选项--disable-citation-markup
。latexdiff-vc
帮助文件建议我可以将--disable-citation-markup
选项传递给latexdiff-vc
:
latexdiff-vc [ latexdiff-options ] [ latexdiff-vc-options ] -r [rev1] [-r rev2] file1.tex [ file2.tex ...]
当我将--disable-citation-markup
选项传递给时latexdiff-vc
,出现以下错误:
C:\Users\richa\Research\payout-and-gov41-paper>latexdiff-vc --disable-citation-markup -r paper\paper.tex
Guess you are using GIT ...
Working on paper\paper.tex
patching file paper/paper.tex
Running: latexdiff '--disable-citation-markup' "paper\paper-oldtmp-18928.tex" "paper\paper.tex" > "paper\paper-diff.tex"
2 and only 2 non-option arguments required. Write latexdiff -h to get help
C:\texlive\2020\bin\win32\runscript.tlu:915: command failed with exit code 2:
perl.exe c:\texlive\2020\texmf-dist\scripts\latexdiff\latexdiff.pl '--disable-citation-markup' "paper\paper-oldtmp-18928.tex" "paper\paper.tex"
Something went wrong in latexdiff. Deleting paper\paper-diff.tex and abort
C:\texlive\2020\bin\win32\runscript.tlu:915: command failed with exit code 5:
perl.exe c:\texlive\2020\texmf-dist\scripts\latexdiff\latexdiff-vc.pl --disable-citation-markup -r paper\paper.tex
问题可能是将选项latexdiff-vc
括--disable-citation-markup
在单引号中。我当前的解决方案是复制并粘贴失败的命令,删除单引号,然后重新运行。有没有更好的解决方案可以避免复制粘贴和手动删除latexdiff-vc
临时文件?
值得一提的是,我在 Windows 10 上使用 TeX Live。