enricojoerns.de

Writing my thesis with LaTeX

22.04.2014

latexmk

Handles number of compilations and dependency compilations

simply run:

latexmk -pdf mymain.tex

Add this to your ~/.latexmkrc to automatically run makeglossaries, too:

add_cus_dep('glo', 'gls', 0, 'makeglossaries');
add_cus_dep('acn', 'acr', 0, 'makeglossaries');

sub makeglossaries {
    if ( $silent ) {
        system "makeglossaries -q $_[0]";
    }
    else {
        system "makeglossaries $_[0]";
    }
    if ( -z "$_[0].glo" ) {
        open GLS, ">$_[0].gls";
        close GLS;
    }
    return 0;
}

push @generated_exts, 'glo', 'gls', 'glg';
push @generated_exts, 'acn', 'acr', 'alg';
$clean_ext .= ' %R.ist %R.xdy';

tikz graphics

Use tikz externalize library.

Full makefile

all:
    latexmk -pdf $(ROOTDOC).tex
    make -j4 -f $(ROOTDOC).makefile
    latexmk -pdf $(ROOTDOC).tex

vim

vim-latex

Document structure support:

A file mymain.tex.latexmain in the same folder as your main.tex will tell vim-latex that mymain.tex is the main document of your project. [1]

Zotero

Latex export

Use the plugin

References

[1] http://vim-latex.sourceforge.net/documentation/latex-suite/latex-project.html#latex-project-example