Skip to content

Instantly share code, notes, and snippets.

@aruneko
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save aruneko/a6c307d190c8e92bcd6b to your computer and use it in GitHub Desktop.

Select an option

Save aruneko/a6c307d190c8e92bcd6b to your computer and use it in GitHub Desktop.

Revisions

  1. aruneko revised this gist Jun 25, 2015. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions latexmkInstall.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,13 @@
    #!/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';
  2. aruneko created this gist Jun 25, 2015.
    23 changes: 23 additions & 0 deletions latexmkInstall.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/bin/sh
    mkdir -p $HOME/opt/latexmk
    wget -O $HOME/opt/latexmk/latexmk http://mirrors.ctan.org/support/latexmk/latexmk.pl
    chmod +x $HOME/opt/latexmk/latexmk
    echo 'PATH="$HOME/opt/latexmk:$PATH"' >> $HOME/.bashrc

    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