Skip to content

Instantly share code, notes, and snippets.

@tschwaerzl
Created December 13, 2017 15:22
Show Gist options
  • Save tschwaerzl/a3170bf0f14335ddb3a1cae5e36b45f5 to your computer and use it in GitHub Desktop.
Save tschwaerzl/a3170bf0f14335ddb3a1cae5e36b45f5 to your computer and use it in GitHub Desktop.
Thesis LaTeX Guide for OSX

Thesis LaTeX Guide for OSX

Requirements

# Install Basic TeX
brew cask install basictex

# Install Skim (awesome pdf viewer with autoreload)
brew cask install skim
# Install Tex Live Dependencies
sudo tlmgr update --self
sudo tlmgr install latexmk
sudo tlmgr install biblatex
sudo tlmgr install logreq
sudo tlmgr install collection-fontsrecommended
sudo tlmgr install was
sudo tlmgr install ellipsis
sudo tlmgr install floatrow
sudo tlmgr install framed

Add this to .latexmkrc in project root

# always process the following tex files
@default_files = ("thesis.tex");

# gen synctex
$latex = "latex -synctex=1 %O %S";

# gen .pdf on osx with pstopdf
$pdf_mode = "2";
$ps2pdf = "pstopdf %S -o %D";

# open .ps and .pdf with skim
$ps_previewer = "open -a Skim";
$pdf_previewer = "open -a Skim";

Compile and watch

# run latexmk and open skim
latexmk -pvc

# run latexmk and open skim (postscript only)
latexmk -ps -pdf- -pvc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment