Skip to content

Instantly share code, notes, and snippets.

@matsu-chara
Created October 24, 2013 09:52
Show Gist options
  • Save matsu-chara/7134305 to your computer and use it in GitHub Desktop.
Save matsu-chara/7134305 to your computer and use it in GitHub Desktop.
latexdiffが日本語で動かなかったのでなんとかした。 線を引く機能なんてなかった。というか必要なかった > jlatexdff_win.bat before.tex after.tex で実行するとdiff.texが生成されます。 ディレクトリ内のtemp*.texが消えるので注意。 依存:latexdiff, nkf, sed
nkf -w %1 > temp1.tex
nkf -w %2 > temp2.tex
latexdiff -e utf8 temp1.tex temp2.tex >temp3.tex
nkf temp3.tex > temp4.tex
sed -e "s/\providecommand{.DIFadd}\[1\]{{.protect.color{blue}.uwave{#1}}}/\\providecommand{\\\\DIFadd}[1]{{\\\\protect\\\\color{red}#1}}/" ^
-e "s/\providecommand{.DIFdel}\[1\]{{.protect.color{red}.sout{#1}}}/\\providecommand{\\\\DIFdel}[1]{}/" ^
temp4.tex > temp5.tex
nkf -w temp5.tex > diff.tex
del temp*.tex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment