Debian Codegraph @

texmf-dist/doc/latex/rub-kunstgeschichte/rub-kunstgeschichte-example.tex

raw
1 % File: rub-kunstgeschichte-example.tex
2 % Copyright (C) 2025 by Joran Schneyer <[email protected]>
3 %
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either version 1.3c
6 % of this license or (at your option) any later version.
7 % The latest version of this license is in
8 % https://www.latex-project.org/lppl.txt
9 % and version 1.3c or later is part of all distributions of LaTeX
10 % version 2008 or later.
11 %
12 % This work has the LPPL maintenance status `maintained'.
13 %
14 % The Current Maintainer of this work is Joran Schneyer <[email protected]>.
15 %
16 % This work consists of the files rub-kunstgeschichte.dtx
17 % rub-kunstgeschichte-example.tex
18 % rub-kunstgeschichte.ins
19 % and the derived file rub-kunstgeschichte.cls
20
21 %%%% Start of the example document %%%%%
22
23 % We start this example by using the rub-kunstgeschichte class
24 \documentclass{rub-kunstgeschichte}
25
26 % We add information for the title page
27 \title{Example usage of the \textsf{rub-kunstgeschichte} class}
28 \author{Joran Schneyer}
29 \configureTitlepage{
30 email = {[email protected]}
31 }
32
33 %%%%% Bibliography %%%%%
34
35 % We add bibliography entries.
36 % These are normally put in an extra bib file. The name is not important.
37 % You can call it something simple like "literature.bib".
38 % Here, we simulate having this extra file by using the filecontents environment.
39 \begin{filecontents}{rub-kunstgeschichte-example.bib}
40 @manual{guidelines,
41 author = {{Kunstgeschichtliches Institut}},
42 year = {2023},
43 title = {Anleitung zur Erstellung von Hausarbeiten im Fach Kunstgeschichte},
44 organization = {Ruhr University Bochum},
45 url = {https://kgi.ruhr-uni-bochum.de/wp-content/uploads/2023/04/Anleitung-zum-Erstellen-von-Hausarbeiten-im-Fach-Kunstgeschichte_Fassung-Juli-2023.pdf},
46 urldate = {2024-11-04}
47 }
48 @article{exampleArticle,
49 author = {Maxi Mustermann},
50 title = {A very interesting article},
51 year = {2001},
52 journal = {Important example journal}
53 }
54 @book{exampleBook,
55 author = {John Smith},
56 title = {A long example book marked as primary literature},
57 year = {2024},
58 keywords = {source}
59 }
60 @inbook{bible,
61 author = {{The Bible}},
62 title = {The Holy Bible: King James Version},
63 booktitle = {The New Testament},
64 publisher = {Oxford University Press},
65 year = {1769},
66 location = {Oxford},
67 keywords = {source}
68 }
69 @online{exampleWebsite,
70 author = {{Example consortium}},
71 title = {The truth about example documents},
72 year = {2020},
73 note = {Internet forum article},
74 url = {https://example.com},
75 urldate = {2100-04-01}
76 }
77 @manual{biblatexDocs,
78 author = {Philip Kime and Moritz Wemheuer and Philipp Lehman},
79 title = {The biblatex Package},
80 subtitle = {Programmable Bibliographies and Citations},
81 year = {2024},
82 url = {https://ctan.org/pkg/biblatex},
83 urldate = {2024-06-25}
84 }
85 @online{biblatexCheatsheet,
86 title = {Biblatex Cheat Sheet},
87 author = {Clea F. Rees},
88 year = {2017},
89 url = {https://ctan.org/pkg/biblatex-cheatsheet},
90 urldate = {2024-06-25}
91 }
92 \end{filecontents}
93
94 % After that, we need to load the bibliography we just created to use it with biblatex.
95 % You can have an arbitrary amount of literature bib files and load them each with \addbibresource, but often just having one bib file makes things easier.
96 \addbibresource{rub-kunstgeschichte-example.bib}
97
98 %%%%%% Load additional packages %%%%%
99
100 % To set our language to german (using the new spelling rules) we load "babel".
101 \usepackage[ngerman]{babel}
102 % We also need to set the language for the "hyperref" package, since it is loaded in the class before we load babel.
103 \hypersetup{ngerman=true}
104
105 % For including the graphics and placing them where we want them, we load the "graphicx" and "float" packages.
106 \usepackage{graphicx}
107 \usepackage{float}
108
109 %%%%% Main document %%%%%
110
111 % Having finished the preamble, we begin the document
112 \begin{document}
113 % The next command typesets the custom titlepage
114 \maketitle
115
116 % This command prints a table of contents
117 \tableofcontents
118
119 % We use \clearpage to continue on the next page
120 \clearpage
121
122 % Next we add different sections that explain common usage and some features of this class.
123 \section{Introduction}
124 The \textsf{rub-kunstgeschichte} class aims to implement the guidelines on scientific writing of the art history institute ``KGI'' (\textit{Kunstgeschichtliches Institut}) at Ruhr University Bochum.
125
126 This example document showcases a typical use of the \textsf{rub-kunstgeschichte} class.
127 Just by using the class, the page is already formatted so that the typeset text has 12pt font size, there is a 1.5 times line-spacing present and the page size is A4 with 2cm margins at top, left and bottom, as well as a 4cm margin on the right.\autocite[See:][11]{guidelines}
128
129 Also, paragraphs don't have an indentation in the first line by default, contrary to typical \LaTeX{} documents.
130 Furthermore the \textsf{hyperref} package is automatically loaded to enable clickable links and references.
131
132 Notably, the first page is a custom title page that aims to recreate the titlepage template of the guidelines in \LaTeX.
133 Note, how the fields have descriptive default values in CAPS, so that you can easily see which information is still missing for the title page.
134 As the documentation of this class states, you can either pass the corresponding key-value options into an optional argument of \verb|\maketitle|, or use the \verb|\configureTitlepage| macro in the preamble.\footnote{For a full list of titlepage options refer to the \textsf{rub-kunstgeschichte} class documentation.}
135
136 We use the \textsf{babel} package to set the language to german (even though this example document is actually written in english) to showcase how headings are automatically translated.
137
138 \section{How to cite sources}
139 This class automatically loads the \textsf{biblatex} package for sophisticated bibliography and citations.
140 The class also sets some options by default that make \textsf{biblatex} behave closer to the suggested citation style in the guidelines of the institute.
141
142 You can cite sources using the \verb|\autocite| command, which is configured by this class to use footnotes \autocite{exampleArticle}.
143 Page numbers can be added in the optional argument \autocite[394]{exampleBook} and citation signals in a second one that comes before the one for page numbers \autocite[see][]{exampleWebsite}.
144 You can even cite multiple sources at once using the \verb|\autocites| command \autocites[111]{exampleBook}[see also][13]{exampleArticle}.
145
146 For more information refer to the documentation of the \textsf{biblatex} package \autocite{biblatexDocs} or the biblatex cheatsheet \autocite{biblatexCheatsheet}.
147
148 \clearpage
149 % \appendix indicates that the main content ends here and what follows is part of the appendix e.g. bibliography, list of figure sources etc.
150 \appendix
151
152 \section{The appendix}
153 We finished the main content of the example document so we call \verb|\appendix| before this first appendix section.
154 It will automatically disable section numbering for any appendix sections.
155
156 Here, we can include a bibliography containing all cited sources, divided into primary and secondary literature, with \verb|\printbibliographies|.
157 Primary literature (also called a \textit{source}) is something like the bible\autocite{bible}, letters, treatises etc.
158 We put the bibliography on a new page by using \verb|\clearpage| before printing it.
159 Note, that since we used \verb|\usepackage[ngerman]{babel}| in the preamble, the headings of the bibliography are typed in german.
160
161 \clearpage
162 \printbibliographies% This is a special command of the rub-kunstgeschichte class that prints sources divided into primary and secondary literature in two subbibliographies.
163
164 \clearpage
165 \section{Figures}
166 The guidelines suggest putting all figures in a dedicated appendix section after the bibliography instead of in between the main content text.\autocite[10,25]{guidelines}
167
168 We can include figures with \verb|\includegraphics| inside a \texttt{figure} environment. We also add a caption with the meta information of the shown artwork,\autocite[25--26]{guidelines} as well as a short caption in square brackets and a label for back-referencing, so that we can use \verb|\ref| or the equivalent command \verb|\autoref| from the \textsf{hyperref} package.
169 E.g. we can reference the example figure as \autoref{fig:exampleArtwork}.
170 Additionally, we set the source of the figure using the custom \verb|\figuresource| command.
171
172 \begin{figure}[H]
173 \centering
174 \includegraphics[width=0.8\linewidth]{example-image-golden}
175 \caption{An Artist, The artwork title, Where was it made?, The year, Material, Measurements, Where is it kept?, Inventory number.}
176 \label{fig:exampleArtwork}
177 \figuresource{\textcopyright{} \textsf{graphicx} package.}
178 \end{figure}
179
180 We can then include a list of figure sources at the end of the document:
181 \printfiguresources% This is a custom command of the rub-kunstgeschichte class which prints all the figure sources in order of the figures.
182
183 % Finally we end the document environment
184 \end{document}