0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fabricでtexファイルを管理する

Last updated at Posted at 2016-08-06

何をするか

texファイルをfabricファイルで管理する方法を書きます.
仮定として, texプロジェクトをgitで定義しているとします.
また, Linux or Mac で書いているとします.

latexmk

まず, latexmkを入れてない人は, 入れましょう.
自動的にlatexを何回実行したらいいかを計算して, 実行してくれます.

$ sudo apt-get install latexmk

日本語に対応するために, ~/.latexmkrc を作ります.

$latex = 'platex -synctex=1 %O %S';                                             
$bibtex = 'pbibtex %O %B';                                                      
$dvipdf = 'dvipdfmx %O -o %D %S';                                               
$makeindex = 'mendex %O -o %D %S';                                              
$max_repeat = 10;                                                          
$pdf_previewer = 'evince %S'    

fabric

入っていない人はfabricをインストールしておいてください.

$ pip install fabric

sample.tex-by-fab

自作のfabric.pyをdownloadしてきます.

$ wget https://raw.githubusercontent.com/yassu/sample.tex-by-fab/master/fabfile.py

後はfabric.pyのデフォルト値を変更して, 自由に使うだけです.
詳しくは documentを書いているので, そちらを見てください.

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?