diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df33f30dd6d61198937a71794bb16eae2545ebce..40f9a16055395539e2fb329240617d1ec308442f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,9 @@ -image: blang/latex +image: danteev/texlive -compile: +compile thesis: stage: build script: - # add or change commands here, e.g. if your thesis has an index - - pdflatex thesis - - bibtex thesis - - pdflatex thesis - - pdflatex thesis + - latexmk -pdf thesis artifacts: paths: - "*.pdf" diff --git a/README.md b/README.md index 6de207d5c27bd606d018bcddc0d76700b662453b..30fa5073dfe234eaf7ab44317beaa85f5a37ceaa 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,30 @@ You want to have the following things installed if you intend to use this template: * A LaTeX backend (e.g. [TeX Live](https://www.tug.org/texlive) or [MikTeX](https://miktex.org)) * A comfortable text editor (e.g. [Notepad++](https://notepad-plus-plus.org)) or a LaTeX frontend (e.g. [TeXstudio](http://www.texstudio.org)) - * A BibTeX manager (e.g. [JabRef](http://www.jabref.org)) + * [Visual Studio Code](https://code.visualstudio.com/) also has a quite usable [LaTeX extension](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) + * A bibliography manager (e.g. [JabRef](http://www.jabref.org)) + +You may also use a Docker-based workflow. See below for details. + ## HowTo +See [the automatically created PDF file](https://git.imp.fu-berlin.de/agse/thesis-template/-/jobs/artifacts/main/raw/thesis.pdf?job=compile-thesis) +for more documentation on the "configuration options" of your document. + To create a PDF file manually (i.e. if you don't use a LaTeX frontend), you need to call: - * `pdflatex thesis` - * `bibtex thesis` - * `pdflatex thesis` - * `pdflatex thesis` +```bash +latexmk -pdf thesis +``` + +### Alternative + +You can also use a Docker image to compile the LaTeX source: + +```bash +docker run --rm -it -v $(pwd):/home danteev/texlive latexmk -pdf thesis.tex + +# For continuous builds +docker run --rm -it -v $(pwd):/home danteev/texlive latexmk -pdf -pvc thesis.tex +``` \ No newline at end of file diff --git a/agse-thesis.cls b/agse-thesis.cls index 1a4f982d55cbf5f897f2dfc3df6be2701fdb4b94..3d90b264267527b3f122f5e13aa643dc48059484 100644 --- a/agse-thesis.cls +++ b/agse-thesis.cls @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{agse-thesis}[2018/10/17 v0.1.1 AGSE Thesis] +\ProvidesClass{agse-thesis}[2021/03/31 v0.2 AGSE Thesis] %%% Read options % Language: Default is German @@ -111,10 +111,8 @@ \RequirePackage[pdftex]{graphicx} -%%% BibTeX -\RequirePackage[numbers,sort&compress]{natbib} -\RequirePackage[nottoc]{tocbibind} -\bibliographystyle{plain} +%%% BibLaTeX +\RequirePackage[sorting=nyt]{biblatex} % Java Code Listing Style \RequirePackage{xcolor} @@ -210,9 +208,9 @@ \vspace{4mm} \begin{tabular}{rl} - \ifcsdef{advisor}{Betreuer: & \advisor\\}{} + \ifcsdef{advisor}{Betreuer/in: & \advisor\\}{} Eingereicht bei: & \firstExaminer \\ - \ifcsdef{secondExaminer}{Zweitgutachter: & \secondExaminer\\}{} + \ifcsdef{secondExaminer}{Zweitgutachter/in: & \secondExaminer\\}{} \end{tabular} \vspace{4mm} diff --git a/thesis.tex b/thesis.tex index 565a4856c755d70c8328e2dc3fdaa45eeffc0df2..f8f6eb887ee2bd161903463bffee197d4af1b38a 100644 --- a/thesis.tex +++ b/thesis.tex @@ -27,6 +27,8 @@ \hypersetup{pdftitle={\thesisTitle}} \hypersetup{pdfauthor={\studentName}} +\addbibresource{bibliography.bib} + % Blind texts, for demonstration only, not part of the actual template \usepackage{lipsum} @@ -66,8 +68,7 @@ \input{3_main} \input{4_conclusion} -% Refers to file `bibliography.bib` -\bibliography{bibliography} +\printbibliography \appendix \include{5_appendix}