Skip to content

Instantly share code, notes, and snippets.

@adrianp
Last active December 15, 2015 02:18
Show Gist options
  • Save adrianp/5185835 to your computer and use it in GitHub Desktop.
Save adrianp/5185835 to your computer and use it in GitHub Desktop.
For compiling LaTeX documents (with BibTex support) we basically have two options:
LaTeX - will produce a DVI file:
latex -interaction=nonstopmode -shell-escape %.tex|bibtex %.aux|latex -interaction=nonstopmode -shell-escape %.tex|latex -interaction=nonstopmode -shell-escape %.tex|"C:/Program Files (x86)/MiKTeX 2.9/miktex/bin/yap.exe" %.dvi
PdfLaTeX:
pdflatex --shell-escape --enable-write18 -synctex=1 -interaction=nonstopmode %.tex|bibtex %.aux|pdflatex --shell-escape --enable-write18 -synctex=1 -interaction=nonstopmode %.tex|pdflatex --shell-escape --enable-write18 -synctex=1 -interaction=nonstopmode %.tex|"C:/Program Files (x86)/Adobe/Reader 11.0/Reader/AcroRd32.exe" %.pdf
These commands are tailored for Texmaker (Win) and will open the approiate preview application after compiling the documents.
Also, (E)PS file support is included; to make sure such images will be correctly displayed, add the following to your LaTeX source preamble:
\usepackage{epstopdf}
\usepackage{auto-pst-pdf}
\epstopdfsetup{update}
\DeclareGraphicsExtensions{.ps}
\epstopdfDeclareGraphicsRule{.ps}{pdf}{.pdf}{ps2pdf -dEPSCrop -dNOSAFER #1 \OutputFile} % disable for LaTeX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment