Examples: twocols.pdf, onecol.pdf
- LaTeX compiler:
pdflatex
orlualatex
orxelatex
... (Recommendedlualatex
) - Needed LaTeX packages, see
config/tugraz-style.sty
. (Recommendedtexlive-full
) texlogfilter
, or remove| texlogfilter $(SUP)
frommakefile
- Clone repository or use template
git clone --depth 1 https://github.com/ecomaikgolf/tugraz-latex-template.git
cd tugraz-latex-template
or
- Edit
document.tex
, modify 'CHANGEME' values & write desired text after\begin{document}
- Compile document
make
- Open
document.pdf
I defined my own commands/enviroments with modifications, take it into consideration. For example, for code use code
and not lstlisting
.
- Add new packages in 'User Packages' (
document.tex
) - Write the bibliography at 'Bibliography' (
document.tex
)
\AtEndDocument{
\if\docbibliography1
\begin{thebibliography}{9}
% \bibitem{key}
% Text
\bibitem{texbook}
Donald E. Knuth (1986) \emph{The \TeX{} Book}, Addison-Wesley Professional.
\bibitem{lamport94}
Leslie Lamport (1994) \emph{\LaTeX: a document preparation system}, Addison Wesley, Massachusetts, 2nd ed.
\end{thebibliography}
\fi
}
- Insert a figure with
\fig
\fig{example-figure}{30m}{The Figure Caption}{figurelabel}
- Insert two figure with
\figtwo
\figtwo{example-figure}{30m}{The Figure Caption 1}{figurelabel1}{example-figure}{30m}{The Figure Caption 2}{figurelabel2}{The General Caption}
- Insert code listing
{
\begin{code}[main.cpp]
int
main() {
return 0;
}
\end{code}
\captionof{lstlisting}{Main Example}
}
- Insert terminal output listing
{
\begin{terminal}[uptime]
18:00:21 up 45 min, 1 user, load average: 0,29, 0,26, 0,27
\end{terminal}
\captionof{term}{Command Example}
}
- Insert verbatim boxed enviroment
{
\begin{verbox}
verbatimcontent
\end{verbox}
}
- Insert command
\begin{command}
yay -S texlive-full
\end{command}
- Open two/three/four/ncols enviroment
\begin{twocols}
\end{twocols}
\begin{threecols}
\end{threecols}
\begin{fourcols}
\end{fourcols}
\begin{ncols}{5}
\end{ncols}
- Reference labels
As seen in \autoref{label}
- Insert code/text "number balls" (like No Starch Press)
begin{code}[title]
int a; ¡\cb{1}¡
\end{code}
In \tb{1} we create an int
The template supports some 'tuning' parameters, such as accent/secondary colors, logo, font, twocols/onecol, twocols balancing, etc.
To change these options, go to 'Options' in document.tex
and modify the default values.
Manually modify config/tugraz-style.sty
I am not a LaTeX expert, this template is intended for my personal use.
Borders have to be that thick to not cause line glitching problems in some renderers (chrome, firefox...), zathura handles them well but I have to support chrome due to it's popularity