
LaTeX ドキュメントをコンパイルすると、常に 2 つの PDF (片面バージョンと両面バージョン) が作成される可能性はありますか。私の場合、2 つのバージョンでは最初の行のみが異なります。
\documentclass[11pt, a4paper, oneside]{scrreprt}
\documentclass[11pt, a4paper, twoside]{scrreprt}
答え1
もっと簡単なら、.tex
コンパイル中にバッチ スクリプト内でソース ファイルを変更することもできます。たとえば、DOS
スクリプトを使用した例を次に示します。
ファイルが与えられた場合sample.tex
:
\begin{document}
\thispagestyle{empty}
Hello
\end{document}
次のバッチ ファイルは 2 つの異なるtex
ファイルを作成し、それらを処理して、表示されている出力を生成します。
echo \documentclass[10pt]{article} > temp10.tex
type sample.tex >> temp10.tex
pdflatex temp10.tex
echo \documentclass[12pt]{article} > temp12.tex
type sample.tex >> temp12.tex
pdflatex temp12.tex