latexdiff로 붉은색만 강조해서 변경한 후.

2633 단어 LaTeXlatexdiff

서문


latexdiff는 두 TeX의 소스 코드를 비교할 때 편리한 명령입니다.tex에서 발견된 맞춤법 오류를 정정하세요.latexdiff를 사용하면 두 파일의 어디가 다른지 한눈에 확인할 수 있습니다.
[latexdiff의 표준 출력]

그러나 정정 후에 강조하기만 하면 된다. 정정 전의 기록은 종종 장애를 초래할 수 있다. 즉, 다음과 같이 출력해야 한다.
[이상 출력]

여기에 이 방법을 기재한다.

방법


여기는 아래의 before입니다.tex, after 수정tex로 저장된 상황을 고려합니다.
before.tex
\documentclass{jlreq}
\begin{document}
以下の文章を訂正します.\\
 hallo warld ? \\
こんにちわ世界.
\end{document}
after.tex
\documentclass{jlreq}
\begin{document}
以下の文章を訂正します.\\
 hello world ? \\
こんにちわ世界.
\end{document}
latexdiff를 사용하여 diff.tex를 생성합니다.
bash
$ latexdiff before.tex after.tex > diff.tex
vi 등 텍스트 편집기에서 diff.tex를 열고 앞 앰풀의 다음 줄을 다시 씁니다.
diff.tex(변경 전)
(前略)
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}}
\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}
(後略)
diff.tex(변경 후)
(前略)
\providecommand{\DIFadd}[1]{{\protect\color{red}#1}}
\providecommand{\DIFdel}[1]{{}}
(後略)
마지막으로 LuaLaTeX 등 적당한 엔진으로 diff.tex를 컴파일하면 상기 [이상적인 출력]의 diff.pdf를 출력할 수 있다.

좋은 웹페이지 즐겨찾기