LoginSignup
9
3

More than 5 years have passed since last update.

Overleafでスクリプトを実行する

Last updated at Posted at 2016-06-14

Overleafで句読点「、。」をカンマ・ピリオド「,.」に自動的に置換したくなった。

Overleafはlatexmkrcを読み込んでくれるので、次のように書くとlatexコマンドの実行時にスクリプトが実行され、ついでに代わりにplatexを読んでくれる。

$latex = "find . -type f -name '*.tex' -print0 | xargs -0 sed -i '' -e 's/、/,/g' -e 's/。/./g'; platex";

Overleaf公式とこんなやり取りをしている人も見つけた。

実際、上記のスクリプトを実行しても元のtexファイルは変更されないので、どこかにコピーしてからコンパイルしているはず。
なるほどなぁ。

9
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
3