From a1cc9562a993ae03fb0ce4e9ff44f546104c3dce Mon Sep 17 00:00:00 2001 From: servostar Date: Wed, 27 Sep 2023 15:38:55 +0200 Subject: [PATCH 1/4] updated latexmkrc, moved page geometry to own file --- .gitignore | 4 ++-- .latexmkrc | 4 ++-- config/geomerty.tex | 15 +++++++++++++++ config/pages.tex | 10 +--------- main.tex | 4 +++- 5 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 config/geomerty.tex diff --git a/.gitignore b/.gitignore index d212ee4..dcd6835 100644 --- a/.gitignore +++ b/.gitignore @@ -318,5 +318,5 @@ main.pdf # ignore build directories # these hold all the clutter we do not want to have -tmp -build \ No newline at end of file +.tmp +.build \ No newline at end of file diff --git a/.latexmkrc b/.latexmkrc index 398277b..cd16ee4 100644 --- a/.latexmkrc +++ b/.latexmkrc @@ -16,10 +16,10 @@ # Move all axuiliary files to a separate directory, so they do not clutter up the project directory $emulate_aux = 1; -$aux_dir = "tmp"; +$aux_dir = ".tmp"; # Move the compiled files (and synctex) to a separate directory -$out_dir = 'build'; +$out_dir = '.build'; # command to compile and run $pdflatex = 'pdflatex %O -interaction=nonstopmode -shell-escape %S'; diff --git a/config/geomerty.tex b/config/geomerty.tex new file mode 100644 index 0000000..9bb4d85 --- /dev/null +++ b/config/geomerty.tex @@ -0,0 +1,15 @@ +% Set page geometry such as: margin, aspect ratio, ... +% Documentation see: https://texdoc.org/serve/geometry.pdf/0 +\geometry { + papername=a4paper, % size of paper + portrait, % aspect ratio format + % margins + left=3cm, + right=2cm, + top=2cm, + bottom=2cm, + % includes the head of the page, \headheight and \headsep, into total body. + includehead, + % show a frame around text (for debuging) + showframe=false, +} \ No newline at end of file diff --git a/config/pages.tex b/config/pages.tex index 6e63f00..191f3ad 100644 --- a/config/pages.tex +++ b/config/pages.tex @@ -1,12 +1,3 @@ -% set page margins -\newgeometry { - left=3cm, - right=2cm, - top=2cm, - bottom=2cm, - includehead -} - % configure hyper links \hypersetup{ bookmarksopen=false, @@ -18,6 +9,7 @@ pdfborder={0 0 0} % disable border } +% translate caption title to german \captionsetup*[figure]{name=Bild} \captionsetup*[table]{name=Tabelle} \captionsetup*[listing]{name=Quelltext} diff --git a/main.tex b/main.tex index 499d4b5..e626677 100644 --- a/main.tex +++ b/main.tex @@ -1,4 +1,4 @@ -\documentclass[a4paper, 12pt]{article} +\documentclass[12pt]{article} % ===================================================================== % latex packages to use @@ -36,6 +36,8 @@ % include file with fixes and workaround % as well as special settings \input{extra/fixes} +% article page geometry configuration +\input{config/geomerty} \begin{document} From 5cbdb52c607672147bb6420a1623b2574d4918fe Mon Sep 17 00:00:00 2001 From: servostar Date: Wed, 27 Sep 2023 15:44:19 +0200 Subject: [PATCH 2/4] added paragraph about build files --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49abe47..38ef7f1 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,13 @@ This project requires the following: - TexLive - latexmk (often packaged with TexLive full-scheme) - python -- pygments (python package for minted) \ No newline at end of file +- pygments (python package for minted) + +## Files created during build +The build process of latexmk will create two folders for storing temporary cache files for faster rebuilds. The primary folder being `.tmp` which will hold every created .aux file. Additionally the resulting pdf file will be located besides main.tex as well as an index file called `main.synctex.gz` used for indexing between main.tex and main.pdf (unused by VSCode, used by Overleaf). + +Build files: +- main.pdf +- main.synctex.gz +- .build/* +- .tmp/* \ No newline at end of file From d1f7ff0c20b00e893605dd44be9f077368f3419c Mon Sep 17 00:00:00 2001 From: servostar Date: Wed, 27 Sep 2023 17:05:50 +0200 Subject: [PATCH 3/4] added support for reference sources --- README.md | 1 - config/bibtex.tex | 1 + main.tex | 7 +++++- pages/page-09-bibliography.tex | 6 +++++ refs.bib | 45 ++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 config/bibtex.tex create mode 100644 pages/page-09-bibliography.tex create mode 100644 refs.bib diff --git a/README.md b/README.md index 38ef7f1..4bc8640 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ The directories are as follows: Acronyms are defined in the file `acros.tex`. Likewise, glossaries are all defined in `glossary.tex`. ## Build - The project is intended to be build by TexLive through the use of latexmk. This is why there is a custom `.latexmkrc` file specified to keep the build process clean. ## Dependencies diff --git a/config/bibtex.tex b/config/bibtex.tex new file mode 100644 index 0000000..1ea1605 --- /dev/null +++ b/config/bibtex.tex @@ -0,0 +1 @@ +\bibliographystyle{unsrtnat} % set listing style of reference sources: Harvard Method \ No newline at end of file diff --git a/main.tex b/main.tex index e626677..6a6c2da 100644 --- a/main.tex +++ b/main.tex @@ -24,7 +24,8 @@ \usepackage{listings} % code listings \usepackage{color} % more colors \usepackage{tikz} % painting -\usepackage{tikz-imagelabels} % overlay labels for images +\usepackage{tikz-imagelabels} % overlay labels for images +\usepackage{cite} % citation for bibliography \makeindex \makenomenclature @@ -33,6 +34,7 @@ % include acronym definitions \input{acros} \input{glossary} +\input{config/bibtex} % include file with fixes and workaround % as well as special settings \input{extra/fixes} @@ -72,4 +74,7 @@ % include all used chapters \input{pages/page-08-chapter} + % source references follow content of article + \input{pages/page-09-bibliography} + \end{document} diff --git a/pages/page-09-bibliography.tex b/pages/page-09-bibliography.tex new file mode 100644 index 0000000..f2c1acf --- /dev/null +++ b/pages/page-09-bibliography.tex @@ -0,0 +1,6 @@ +% ===================================================================== +% Bilbiography + +\cleardoublepage % should start on new empty page +\addcontentsline{toc}{section}{Literatur} % add table of contents entry +\bibliography{../refs} % Entries are in the refs.bib file \ No newline at end of file diff --git a/refs.bib b/refs.bib new file mode 100644 index 0000000..eb0382c --- /dev/null +++ b/refs.bib @@ -0,0 +1,45 @@ +% ____ _ _ _ +% | __ )(_) |__ | |_ _____ __ +% | _ \| | '_ \| __/ _ \ \/ / +% | |_) | | |_) | || __/> < +% |____/|_|_.__/ \__\___/_/\_\ +% +% Biblatex database for storing bibliography entries that can be cited within the document. +% See: https://www.overleaf.com/learn/latex/Bibliography_management_with_bibtex. +% +% -------------------------------------------------------- +% Reference a book: +% +% @book{reference-name, +% author = {Donald E. Knuth}, +% year = {1986}, +% title = {The Book}, +% publisher = {Addison-Wesley Professional} +% edition = {2} +% } +% +% -------------------------------------------------------- +% Reference an article: +% +% @article{reference-name, +% title = {Literate Programming}, +% author = {Donald E. Knuth}, +% journal = {The Computer Journal}, +% volume = {27}, +% number = {2}, +% pages = {97--111}, +% year = {1984}, +% publisher = {Oxford University Press} +% } +% +% -------------------------------------------------------- +% For citing a certain reference within the document use: +% \cite{reference-name} + +@book{somebook, + author = {Donald E. Knuth}, + year = {1986}, + title = {The Book}, + publisher = {Addison-Wesley Professional} + edition = {2} +} \ No newline at end of file From 0458d8b744813ab6f50a89b2e4698fb315176a93 Mon Sep 17 00:00:00 2001 From: servostar Date: Wed, 27 Sep 2023 17:13:28 +0200 Subject: [PATCH 4/4] cleaned up refs.bib --- pages/page-09-bibliography.tex | 33 +++++++++++++++++++++++++++-- refs.bib | 38 +--------------------------------- 2 files changed, 32 insertions(+), 39 deletions(-) diff --git a/pages/page-09-bibliography.tex b/pages/page-09-bibliography.tex index f2c1acf..83972fd 100644 --- a/pages/page-09-bibliography.tex +++ b/pages/page-09-bibliography.tex @@ -1,6 +1,35 @@ % ===================================================================== -% Bilbiography +% Bilbiography referecnes must be put into refs.bib +% +% -------------------------------------------------------- +% Reference a book: +% +% @book{reference-name, +% author = {Donald E. Knuth}, +% year = {1986}, +% title = {The Book}, +% publisher = {Addison-Wesley Professional} +% edition = {2} +% } +% +% -------------------------------------------------------- +% Reference an article: +% +% @article{reference-name, +% title = {Literate Programming}, +% author = {Donald E. Knuth}, +% journal = {The Computer Journal}, +% volume = {27}, +% number = {2}, +% pages = {97--111}, +% year = {1984}, +% publisher = {Oxford University Press} +% } +% +% -------------------------------------------------------- +% For citing a certain reference within the document use: +% \cite{reference-name} \cleardoublepage % should start on new empty page \addcontentsline{toc}{section}{Literatur} % add table of contents entry -\bibliography{../refs} % Entries are in the refs.bib file \ No newline at end of file +\bibliography{refs} % Entries are in the refs.bib file \ No newline at end of file diff --git a/refs.bib b/refs.bib index eb0382c..f53d4cd 100644 --- a/refs.bib +++ b/refs.bib @@ -6,40 +6,4 @@ % % Biblatex database for storing bibliography entries that can be cited within the document. % See: https://www.overleaf.com/learn/latex/Bibliography_management_with_bibtex. -% -% -------------------------------------------------------- -% Reference a book: -% -% @book{reference-name, -% author = {Donald E. Knuth}, -% year = {1986}, -% title = {The Book}, -% publisher = {Addison-Wesley Professional} -% edition = {2} -% } -% -% -------------------------------------------------------- -% Reference an article: -% -% @article{reference-name, -% title = {Literate Programming}, -% author = {Donald E. Knuth}, -% journal = {The Computer Journal}, -% volume = {27}, -% number = {2}, -% pages = {97--111}, -% year = {1984}, -% publisher = {Oxford University Press} -% } -% -% -------------------------------------------------------- -% For citing a certain reference within the document use: -% \cite{reference-name} - -@book{somebook, - author = {Donald E. Knuth}, - year = {1986}, - title = {The Book}, - publisher = {Addison-Wesley Professional} - edition = {2} -} \ No newline at end of file +% \ No newline at end of file