A latex protocol template

Quickstart

git clone [email protected]:tgm-hit/latex-protocol.git protocol
cd protocol
./maketex

Contents

Dependencies

For local compilation a TeX distribution is required. Both TeX Live and MiKTeX are fully supported. The compilation script requires Python 3.

Some features might depend on packages which are not installed by default! A growing list of optional dependencies can be found here.

Arch Linux

sudo pacman -S texlive-most python-pygments

Usage

With Python 3 and LaTeX installed you can easily compile your project using the maketex script which simplifies the compilation progress, handles multiple source files and removes unnecessary files. For most use-cases you only have to run ./maketex which compiles the main.tex file using pdflatex while looking for bibliography and glossary entries.

Latex

If (for some reason) you do not want to depend on the maketex script you can also use pdflatex, makeglossaries and bibtex from the shell.

pdflatex -shell-escape main    # Initial compilation
makeglossaries main         # Compile glossaries
pdflatex -shell-escape main    # Progressive compilation for glossaries
bibtex main             # Compile bibliography
pdflatex -shell-escape main    # Progressive compilation for bibtex
pdflatex -shell-escape main    # Progressive compilation for bibtex

TexStudio

In TexStudio a custom command can be added under OptionsConfigure TexStudioBuildUser Commands. The following line completely compiles a LaTeX file with glossaries, bibliography and minted.

pdflatex -shell-escape -interaction=nonstopmode % | txs:///makeglossaries | pdflatex -shell-escape -interaction=nonstopmode % | txs:///bibtex | pdflatex -shell-escape -interaction=nonstopmode % | pdflatex -shell-escape -interaction=nonstopmode % | txs:///view-pdf-internal --embedded

Of course you can also add the maketex script as a user command but you might want to set -lm so TexStudio can find your log files and minted cache after cleanup.

python maketex -lm | txs:///view-pdf-internal --embedded

Overleaf

Overleaf is a popular online latex editor and is also fully supported by this template. Just download the archived repository or latest release and upload as a new project.

Overleaf usage

Options

Options are added to the \documentclass command usually found in main.tex.

\documentclass[<option1>,<option2>,...]{protocol}
Option Result
en Set main document language to english
landscape Change the page format to landscape orientation
minted Add and configure minted package
natbib Change bibtex backend to natbib
nobib No bibliography
nofonts No additional fonts
noglo No acronyms and glossary
nologos No logos on titlepage
notable No table on titlepage
notitle No titlepage
notoc No table of contents
parskip Skip a line instead of indenting after blank line
sans Load sans-serif fonts

Variables

Variables are set as commands with their parameter being the variable value.

\myvariable{value}
Command Content
mysubtitle Subtitle of group
mysubject Thematic group / subject
mycourse Current course / class
myteacher Current teacher
myversion Current version of the document
mybegin Start of documentation
myfinish End of documentation

Latex Protocol

LaTeX template for documents and laboratory documentation :books:

Latex Protocol Info

⭐ Stars 14
🔗 Source Code github.com
🕒 Last Update 8 months ago
🕒 Created 3 years ago
🐞 Open Issues 5
➗ Star-Issue Ratio 3
😎 Author TGM-HIT