Path: blob/main/docs/latex-setup.md
431 views
Recommended LaTeX environments
TeXStudio as LaTeX Editor
Grammar and spell checking is available at TeXstudio. Please download LanguageTool and configure TeXstudio to use it. Note that it is enough to point to languagetool-server.jar. 
The template is compiled using normal compilation commands. Your LaTeX environment (such as TeXStudio) should take care about the compilation transparently.
If you open main-minted-german.tex, there will be a warning that the compilation command will be overridden. Please answer (a) allow for this document:

At "Build & View", there will be a question to update to biber. Please answer (a) allow for this document:

When the "Package Installation" dialog pops up at TeXStudio, choose your username at "The package will be installed for:" and uncheck "Always show this dialog before installing packages." If you want to include .svg graphics, [inkscape] has to be in your path.
Attention! The first compilation will take at least 30 seconds, because there will be some LaTeX packages installed.
If TeXstudio doesn't fit your need, check the list of all available LaTeX Editors.
JabRef for managing literature
Use JabRef to manage your bibliography. Quick installation using Chocolatey: choco install texstudio languagetool jabref.
A comparison to other literature management software is available at https://ultimate-comparisons.github.io/ultimate-reference-management-software-comparison/. See LaTeX Editors/IDEs question on TeX.SX for a complete list of LaTeX editors.
Installation hints for Ubuntu
From Ubuntu 18.10 onwards, the basic version of the template works without issues. Advanced usages such as cool syntax highlighting with minted needs more configuration.
Ubuntu 16.04 ships biber 2.4, so you have to upgrade your texlive distribution. The easiest way is to uninstall the ubuntu package and use install-tl-ubuntu. Then, you can follow the instructions given at http://tex.stackexchange.com/a/55459/9075 to update your texlive distribution. If you do not want to have an updated installation, but fiddle around with dirty patching your installation, please follow http://tex.stackexchange.com/questions/84624/how-to-upgrade-biblatex-properly.
Always working solution: Use the docker image. This provides a perfectly configured latex distribution with all required tools.
Execute
sudo visudoto edit the sudoers fileAdd the line
myusername ALL = (root) NOPASSWD: /usr/bin/docker. Replacemyusernameaccordingly. (Source: https://unix.stackexchange.com/a/13058/18033)Execute
sudo docker pull registry.gitlab.com/islandoftex/images/texlive:latest. This should not ask for any password. Will download approx. 4GB.Open TeXstudio
Options > Configure TeXstudio > Commands
Set "PdfLaTeX" to
docker run --rm -v DIROFTEXDOCUMENT:DIROFTEXDOCUMENT --workdir=DIROFTEXDOCUMENT registry.gitlab.com/islandoftex/images/texlive:latest pdflatex --shell-escape -synctex=1 -interaction=nonstopmode %.tex, replaceDIROFTEXDOCUMENTby the directory of your latex document. Example:/home/user/thesis.Set "LuaLaTeX" to
docker run --rm -v DIROFTEXDOCUMENT:DIROFTEXDOCUMENT --workdir=DIROFTEXDOCUMENT registry.gitlab.com/islandoftex/images/texlive:latest lualatex --shell-escape -synctex=1 -interaction=nonstopmode %.tex, replaceDIROFTEXDOCUMENTby the directory of your latex document. Example:/home/user/thesis.Set "Biber" to
docker run --rm -v DIROFTEXDOCUMENT:DIROFTEXDOCUMENT --workdir=DIROFTEXDOCUMENT registry.gitlab.com/islandoftex/images/texlive:latest biber %, replaceDIROFTEXDOCUMENTby the directory of your latex document. Example:/home/user/thesis.Check if the "docker pull" command from step 3 succeed. If not, wait.
Try to press the "Compile" (F6) button in TeXstudio.
Installation hints for Windows
Note: The default installation of MiKTeX might ship with incompatible biblatex and biber packages. You have to keep your MiKTeX up to date. In case you followed the linked installation steps, you only have to run "Update MiKTeX". If you installed MiKTeX other ways, you have to run "Update MiKTeX (Admin)" and "Update MiKTeX" and check in both tools for updates (see http://tex.stackexchange.com/a/108490/9075).
Preparations
Install chocolatey:
Open
cmd.exeas AdministartorPaste and hit Enter
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Execute
choco feature enable -n=allowGlobalConfirmationto get rid off additional installation confirmations.Execute
choco install texstudio sumatrapdf.install strawberryperl jre8 jabref languagetoolto install necessary tooling.In case PlantUML should be used, follow the installation instructions at https://koppor.github.io/plantuml/ listed at the "pre-conditions" section.
For more recommended tooling see https://github.com/koppor/koppors-chocolatey-scripts.
Recommended setup of MiKTeX
Download the basic installer from http://miktex.org/download
Start it
First screen: Read the license conditions and be sure that you really agree.
Check "I accept the MiKTeX copying conditions"
Click "Next"
Second screen: "Shared Installation": Install MiKTeX for: "Only for:
username".Check first option
Click "Next"
Third screen: "Installation Directory": Install MiKTeX to:
C:\MiKTeX. This enabled browsing for documentation atC:\MiKTeX29\doc\latexInput "C:\MiKTeX" in the input field
Click "Next"
Fourth screen: "Settings": Preferred paper: A4 and install missing packages on the fly.
First combo box: "A4"
Second combo box: "Yes":
Click "Next"
Fifth screen: Press "Start"
Now a window "Executing" appears. It will take about 5 minutes until this is finished.
At the last screen: Click "Close"
After the installation:
Open
cmd.exeExecute
refreshenvto make MiKTeX's binaries known right after the installationExecute
mpm --update-dbExecute
mpm --updateExecute
mpm --install=tex-gyre(to resolvefontspec error: "font-not-found",\setmainfont{TeX Gyre Termes})Execute
mpm --install=tex-gyre-mathExecute
mpm --install=cm-superExecute
initexmf --update-fndb(ensure that no other MiKTeX tooling such as the MiKTeX Console is run in parallel - see https://github.com/MiKTeX/miktex/issues/98#issuecomment-375952270)Execute
initexmf --mklinks --force