Last active
August 29, 2015 14:23
-
-
Save aruneko/a6c307d190c8e92bcd6b to your computer and use it in GitHub Desktop.
latexmkの一発インストールシェルスクリプト(Linux用)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# インストール先ディレクトリの生成と本体のダウンロード | |
mkdir -p $HOME/opt/latexmk | |
wget -O $HOME/opt/latexmk/latexmk http://mirrors.ctan.org/support/latexmk/latexmk.pl | |
# 実行権限とPATHの設定 | |
chmod +x $HOME/opt/latexmk/latexmk | |
echo 'PATH="$HOME/opt/latexmk:$PATH"' >> $HOME/.bashrc | |
# 設定ファイルの書き込み | |
# 参考:http://konn-san.com/prog/why-not-latexmk.html | |
cat << 'EOS' > $HOME/.latexmkrc | |
#!/usr/bin/env perl | |
$latex = 'platex -shell-escape -halt-on-error'; | |
$latex_silent = 'platex -shell-escape -halt-on-error -interaction=batchmode'; | |
$bibtex = 'pbibtex'; | |
$dvipdf = 'dvipdfmx %O -o %D %S'; | |
$makeindex = 'mendex %O -o %D %S'; | |
$max_repeat = 5; | |
$pdf_mode = 3; # generates pdf via dvipdfmx | |
# Prevent latexmk from removing PDF after typeset. | |
# This enables Skim to chase the update in PDF automatically. | |
$pvc_view_file_via_temporary = 0; | |
# Use Skim as a previewer | |
$pdf_previewer = "xdg-open"; | |
EOS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment