This is a LaTeX template to write a thesis.
Install TeX Live TeX Live.
This gem provides the ltx command. See the ltx
documentation for usage.
Use the following command to compile the project with latexmk and pdflatex:
#!bash
latexmk -cd -f -jobname=output -auxdir="OUTDIR" -outdir="OUTDIR" -pdf -e "$pdflatex='pdflatex -synctex=1 -interaction=batchmode %O %S'" ".../main.tex"
It is recommended to set OUTDIR to a temporary subdirectory (e.g. tmp).
Using a temporary directory is not required, but then all build artifacts will
be created in your project root. You can set the document file name prefix via
-jobname=. Replace $pdflatex='pdflatex with $pdflatex='lualatex if you
use LuaTeX. This and more is what
ltx allows you to configure via the
project.yml.
There are many tools and editors you can use. Here is a small collection:
There is the vim-latex plugin for Vim:
#!vimrc
Bundle 'git://git.code.sf.net/p/vim-latex/vim-latex'
Combine this with evince (supports auto-reloading) and a tiling window manager like xmoand, i3 or Sway and you have a great setup.
You can use guard or any other file change watcher for auto-compiling.
Set the Default Compiler to Latexmk under Build settings.
You can also compile to a temporary subdirectory:
- Change the
latex-mkcommand inOptions->Configure TeXstudio...->Commandsto:
latexmk -cd -f -jobname=% -auxdir="tmp" -outdir="tmp" -pdf -e "$pdflatex='pdflatex -synctex=1 -interaction=batchmode %%O %%S'" "%.tex"
If you use an external PDF-Viewer, adjust the path under External PDF-Viewer to outdir (tmp/).
For evince under Linux set the External PDF-Viewer to:
evince tmp/%.pdf > /dev/null
For Acrobat Reader under Windows (you may have to fix the path) set the External PDF-Viewer to:
"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" "tmp\?m.pdf"
Without changing the following the internal PDF-Viewer will not find the PDF and log files:
- Activate the
Advanced Optionsby checking the checkboxShow Advanced Options - Go to
Additional Search Pathsand addtmpforLog FileandPDF File
See LICENSE file.