
私は Windows に arara をインストールしました。cmd シェルから実行したところ、正常に動作していることが分かりました。複数のドキュメントを生成するための入力ファイルとして使用する「テンプレート」プリアンブルに次の構文を入れると、ドキュメントをコンパイルするのに十分でしょうか。それとも、各 tex ファイルで毎回ファイル名を指定する必要がありますか。私は texwork を使用しています。
ファイルが変更されたときに texwork で自動的にファイルをビルドするにはどうすればよいでしょうか?
% arara: xelatex
% arara: xelatex
% arara: clean: { files: [ *.aux, *.bbl ] }
% arara: clean: { files: [ *.bcf, *.cod ] }
% arara: clean: { files: [ *.blg, *.lof ] }
% arara: clean: { files: [ *.lot, *.out ] }
% arara: clean: { files: [ *.toc, *.log ] }
答え1
remove
次のような規則がありますPaulo Cereda
:
!config
# Clean rule for arara
# author: Paulo Cereda
# requires arara 3.0+
identifier: remove
name: Remove
command: <arara> @{remove}
arguments:
- identifier: remove
default: <arara> @{isNotEmpty(item, isWindows("cmd /c del", "rm -f").concat(' "').concat(getBasename(file))concat('.').concat(item).concat('"'))}
これは削除します
% arara: remove: { items: [ aux , toc , bbl ] }
ファイルjobname.aux
とjobname.toc
およびjobname.bbl
。
*.aux
および*.toc
のような任意の名前のファイルを削除する場合は*.bbl
、次の小さな変更を試してください。
!config
# Clean rule for arara
# requires arara 3.0+
identifier: removex
name: RemoveX
command: <arara> @{removex}
arguments:
- identifier: removex
default: <arara> @{isNotEmpty(item, isWindows("cmd /c del", "rm -f").concat(' "').concat('*')concat('.').concat(item).concat('"'))}
これは削除します
% arara: removex: {items: [ png , tmp ] }
拡張子*.png
が およびのすべてのファイル*.tmp
。