diff --git a/commands.tex b/commands.tex index d493c12..163c2e8 100644 --- a/commands.tex +++ b/commands.tex @@ -86,12 +86,12 @@ % =========== % Code snippets with syntax highlighting. % TODO: Fix special character mess. +% Caution: Must not be used inside `\textbf{}' % % Arguments: % 1. Language. % 2. Source code. \newcommand\code[2]{% - % \mintinline{#1}{#2} \texttt{#2}% } @@ -128,7 +128,7 @@ \ifthenelse{\equal{#1}{latex}}{% \lstset{language=#1, - basicstyle=\footnotesize\ttfamily, + basicstyle=\small\ttfamily, breaklines=true, keywordstyle=\color{ForestGreen}\bfseries, emph={% diff --git a/content/project-structure.tex b/content/project-structure.tex index a34536b..daf7a2e 100644 --- a/content/project-structure.tex +++ b/content/project-structure.tex @@ -1,26 +1,25 @@ \chapter{Project structure} \label{sec:project-structure} -In the previous chapters, we have only seen very short \LaTeX{} examples. \LaTeX{} can of course also be used to create larger documents and projects, such as a thesis. -In order not to lose the overview in the source code and to avoid that source files become too long, a reasonable structuring of a larger \LaTeX{} project is advisable. For this purpose, the source code is divided into different files, which will be discussed in more detail in the following sections. +In the previous chapters, we have only seen very short \LaTeX{} examples. +\LaTeX{} can of course also be used to create larger documents and projects, such as a thesis. +In order not to lose the overview in the source code and to avoid that source files become too long, a reasonable structuring of a larger \LaTeX{} project is advisable. +For this purpose, the source code is divided into different files, which will be discussed in more detail in the following sections. \section{Main file} -In large projects, we typically use one main file, which is often called \file{main.tex}. It is, in a sense, the structural skeleton of the project, as it contains the basic structure including the preamble. The title, table of contents, as well as the individual chapters of a work are integrated in this main file (cf.\ \cref{lst:main-file}). The inclusion of the individual sections can be done either by \code{latex}{\textbackslash input\{...\}} or \code{latex}{\textbackslash include\{\textellipsis\}}. Both require the path to the file to be included as an argument. We will discuss the differences between the two commands later (see \cref{sec:input-vs-include}). +In large projects, we typically use one main file, which is often called \file{main.tex}. +It is, in a sense, the structural skeleton of the project, as it contains the basic structure including the preamble. +The title, table of contents, as well as the individual chapters of a work are integrated in this main file (cf.\ \cref{lst:main-file}). +The inclusion of the individual sections is typically done by the \code{latex}{\textbackslash input\{...\}} command +\footnote{There exists another command called \code{latex}{\textbackslash include\{\textellipsis\}} that works slightly differently. It requires you to specify the file to be included without a file extension. Besides this, a line break is added before the content of the partial file. Lastly, you cannot nest \code{latex}{\textbackslash include\{\textellipsis\}} statements. When you try to include a file that also includes a file, a compiler error will be thrown. \code{latex}{\textbackslash input\{\textellipsis\}} on the other hand is capable of such nested imports. In this script, we will present the \code{latex}{\textbackslash input\{\textellipsis\}} command only.} +with the file to be included as an argument. \example{lst:main-file}{project-structure/main-file}{Typical structure in a main file \LaTeX{}} -\section{Section files} -Section files are files that are included within the main file. In a thesis, for example, these can be individual chapters. You are free to decide how granular the division of the content into individual files should be. -The files that are included by the main file do not contain a preamble, since this is already present in the main file. Neither do the commands \code{latex}{\textbackslash begin\{document\}} and \code{latex}{\textbackslash end\{document\}} appear again. - -\section{Input or include?} -\label{sec:input-vs-include} - -Let us now turn to the differences between the two possible commands for including \LaTeX{} files. Briefly summarized, \code{latex}{\textbackslash include} and \code{latex}{\textbackslash input} have differences in the following three aspects: The way in which the path to the file to be included is specified, the possibility of nesting inclusions, and whether a new page is started for each section. - -If you use the command \code{latex}{\textbackslash input}, you can specify the file extension \mono{.tex}, but it is not mandatory. It is also possible to nest the inclusion of files: A file included with \code{latex}{\textbackslash input} can in turn include another file with the same command. The files that have been included are inserted in the finished document without starting a new page for the included section (cf. \cref{lst:main-file}). - -The command \code{latex}{\textbackslash include} behaves differently: Here, the file -extension \mono{.tex} \emph{must} be omitted. Nesting of embeddings is not -possible. Also, a new page is created for each included file. +\section{Partial files} +Partial files are files that are included within another file, most often the main file. +In a thesis, for example, these can represent individual chapters. +You are free to decide how granular the division of the content into individual files should be. +The files that are included by the main file do not contain a preamble, since this is already present in the main file. +Neither do the commands \code{latex}{\textbackslash begin\{document\}} and \code{latex}{\textbackslash end\{document\}} appear again. diff --git a/content/special-characters.tex b/content/special-characters.tex index 2a1e88f..8c3d4b4 100644 --- a/content/special-characters.tex +++ b/content/special-characters.tex @@ -133,8 +133,8 @@ Please note that some of them only work in maths environments (c.\,f. \cref{sec: \textless/\textgreater & \code{latex}{\textbackslash textless/\textbackslash textgreater} & \\ \textperthousand & \code{latex}{\textbackslash textperthousand} & \\ \textsection & \code{latex}{\textbackslash textsection} & \\ - $\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths environments \\ - \euro & \code{latex}{\textbackslash euro} & requires the \pkg{eurosym} package \\ + $\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths + environments \\ \textteshlig & \code{latex}{\textbackslash textteshlig} & requires the \pkg{tipa} package \\ \textmusicalnote & \code{latex}{\textbackslash textmusicalnote} & requires the \pkg{textcomp} package \\ \bottomrule diff --git a/content/titlepage.tex b/content/titlepage.tex index ffc97aa..b0ec253 100644 --- a/content/titlepage.tex +++ b/content/titlepage.tex @@ -1,18 +1,6 @@ \thispagestyle{empty} -\begin{center} - \fslogo \\ - \vspace{3em} - \rule{\textwidth}{1pt}\par - \vspace{0.8\baselineskip} - \Huge\bfseries Script for the Fachschaft \acro{WIAI} \LaTeX{} Workshop - \rule{\textwidth}{1pt}\par - %{\large \today} - \vfill - \vfill - {\Large{ Evelyn Fradtschuk, Florian Knoch,\\ - Christian Kremitzl, Bernhard Luedtke}}\\ - \vfill -\end{center} + +\includepdf{graphics/cover/latex-script-cover.pdf} \newpage \thispagestyle{empty} @@ -22,7 +10,7 @@ \begin{tabular}{@{}lp{9cm}} & \subsubsection*{Imprint} \\ - & The \LaTeX{} Script (version 1.1 from January 21st, 2022) has been assembled by the Student Council of the Information Systems and Applied Computer Sciences Faculty (Fachschaft \acro{WIAI}) at the University of Bamberg. \\ + & The \LaTeX{} Script (version 1.2 from June 18th, 2022) has been assembled by the Student Council of the Information Systems and Applied Computer Sciences Faculty (Fachschaft \acro{WIAI}) at the University of Bamberg. \\ & It is licensed under Creative Commons \enquote{Attribution-ShareAlike 4.0 International} (CC BY-SA 4.0): \\ \href{http://creativecommons.org/licenses/by-sa/4.0/}{\includegraphics[height=.5cm]{graphics/cc-by-sa}} & \url{http://creativecommons.org/licenses/by-sa/4.0/} \\ \\ & Upon request, allowances exceeding the limitations of this license may be granted. diff --git a/exercises/basic-document-structure/document-structure.code.tex b/exercises/basic-document-structure/document-structure.code.done.tex similarity index 100% rename from exercises/basic-document-structure/document-structure.code.tex rename to exercises/basic-document-structure/document-structure.code.done.tex diff --git a/exercises/basic-document-structure/document-structure.done.tex b/exercises/basic-document-structure/document-structure.done.tex index 918c8cc..161b325 100644 --- a/exercises/basic-document-structure/document-structure.done.tex +++ b/exercises/basic-document-structure/document-structure.done.tex @@ -1 +1 @@ -\codeblock{latex}{./exercises/basic-document-structure/document-structure.code.tex} +\codeblock{latex}{./exercises/basic-document-structure/document-structure.code.done.tex} diff --git a/exercises/footnotes/footnotes.code.tex b/exercises/footnotes/footnotes.code.done.tex similarity index 100% rename from exercises/footnotes/footnotes.code.tex rename to exercises/footnotes/footnotes.code.done.tex diff --git a/exercises/footnotes/footnotes.done.tex b/exercises/footnotes/footnotes.done.tex index a05417a..5b4f726 100644 --- a/exercises/footnotes/footnotes.done.tex +++ b/exercises/footnotes/footnotes.done.tex @@ -1 +1 @@ -\codeblock{latex}{./exercises/footnotes/footnotes.code.tex} +\codeblock{latex}{./exercises/footnotes/footnotes.code.done.tex} diff --git a/exercises/footnotes/task.tex b/exercises/footnotes/task.tex index f43f0cf..ff91fd7 100644 --- a/exercises/footnotes/task.tex +++ b/exercises/footnotes/task.tex @@ -3,8 +3,6 @@ Make the text \enquote{March 2021} of the file parentheses. Additionally, insert a clickable URL to the Java Development Kit as footnote. -\todo{Sollten wir dieses Beispiel aus Faulheitsgründen vielleicht ersetzen?} - \texttt{https://www.oracle.com/java/technologies/javase-downloads.html} \exercisematerial{exercises/footnotes/footnotes} diff --git a/exercises/graphics/graphics.code.tex b/exercises/graphics/graphics.code.done.tex similarity index 100% rename from exercises/graphics/graphics.code.tex rename to exercises/graphics/graphics.code.done.tex diff --git a/exercises/graphics/graphics.done.tex b/exercises/graphics/graphics.done.tex index 73ecbc5..1cce458 100644 --- a/exercises/graphics/graphics.done.tex +++ b/exercises/graphics/graphics.done.tex @@ -1 +1 @@ -\codeblock{latex}{./exercises/graphics/graphics.code.tex} +\codeblock{latex}{./exercises/graphics/graphics.code.done.tex} diff --git a/exercises/lists/lists.code.tex b/exercises/lists/lists.code.done.tex similarity index 100% rename from exercises/lists/lists.code.tex rename to exercises/lists/lists.code.done.tex diff --git a/exercises/lists/lists.done.tex b/exercises/lists/lists.done.tex index 204b9d3..88c855b 100644 --- a/exercises/lists/lists.done.tex +++ b/exercises/lists/lists.done.tex @@ -1 +1 @@ -\codeblock{latex}{./exercises/lists/lists.code.tex} +\codeblock{latex}{./exercises/lists/lists.code.done.tex} diff --git a/exercises/literature/exercise-solution.tex b/exercises/literature/exercise-solution.tex deleted file mode 100644 index d7a226d..0000000 --- a/exercises/literature/exercise-solution.tex +++ /dev/null @@ -1,4 +0,0 @@ -The first-mentioned book \citep{lamport1994} has been written by the creator of \LaTeX{}, Leslie Lamport himself. A more recent publication is \enquote{\LaTeX\ in 24 Hours} \citep{datta2017}. There is a plethora of further handbooks \citep*[e.\,g.,][]{goossensmittelbach2002}. - -\bibliographystyle{natdin} -\bibliography{exercises/literature/literature.done.bib} \ No newline at end of file diff --git a/exercises/literature/literature.code.done.tex b/exercises/literature/literature.code.done.tex new file mode 100644 index 0000000..3b79710 --- /dev/null +++ b/exercises/literature/literature.code.done.tex @@ -0,0 +1,5 @@ +An introductory \LaTeX{} course can be found in \enquote{\LaTeX{} in 24 Hours} \cite{datta2017}. +There is a plethora of further handbooks \cite*[e.\,g.,][]{goossensmittelbach2002}. + +\bibliographystyle{plain} +\bibliography{exercises/literature/literature.done.bib} \ No newline at end of file diff --git a/exercises/literature/literature.done.bib b/exercises/literature/literature.done.bib index a5d804a..9b207f1 100644 --- a/exercises/literature/literature.done.bib +++ b/exercises/literature/literature.done.bib @@ -1,15 +1,3 @@ -@book{lamport1994, - author = {Leslie Lamport}, - title = {LaTeX - {A} Document Preparation System: User's - Guide and Reference Manual, Second Edition}, - publisher = {Pearson / Prentice Hall}, - year = {1994}, - isbn = {978-0-201-52983-8}, - timestamp = {Fri, 08 Apr 2011 18:21:00 +0200}, - biburl = {https://dblp.org/rec/books/daglib/0023602.bib}, - bibsource = {dblp computer science bibliography, - https://dblp.org} -} @book{datta2017, author = {Dilip Datta}, title = {LaTeX in 24 Hours - {A} Practical Guide for diff --git a/exercises/literature/literature.done.tex b/exercises/literature/literature.done.tex index 3650ce6..3f939db 100644 --- a/exercises/literature/literature.done.tex +++ b/exercises/literature/literature.done.tex @@ -1,4 +1,3 @@ -%\inputminted[breaklines]{bibtex}{exercises/literature/literature.done.bib} \codeblock{bibtex}{./exercises/literature/literature.done.bib} -\codeblock{latex}{./exercises/literature/exercise-solution.tex} +\codeblock{latex}{./exercises/literature/literature.code.done.tex} diff --git a/exercises/literature/literature.raw.tex b/exercises/literature/literature.raw.tex index d03df6f..6b6b912 100644 --- a/exercises/literature/literature.raw.tex +++ b/exercises/literature/literature.raw.tex @@ -1,5 +1,4 @@ -The first-mentioned book (Lamport, 1994) has been written by the creator of \LaTeX{}, Leslie Lamport himself. -A more recent publication is \enquote{\LaTeX\ in 24 Hours} (Datta, 2017). +An introductory \LaTeX{} course can be found in \enquote{\LaTeX{} in 24 Hours} (Datta, 2017). There is a plethora of further handbooks (e.\,g., Goossens, Mittelbach and Samarin, 2002). ~\\ @@ -9,5 +8,3 @@ There is a plethora of further handbooks (e.\,g., Goossens, Mittelbach and Samar \noindent [Datta 2017] Datta, Dilip: LaTeX in 24 Hours - A Practical Guide for Scientific Writing. Springer, 2017. \url{http://dx.doi.org/10.1007/978-3-319-47831-9}. – ISBN 978–3–319–47830–2 \noindent [Goossens u. a. 2002] Goossens, Michel ; Mittelbach, Frank ; Samarin, Alexander: Der LaTeX Begleiter. Addison-Wesley, 2002. – ISBN 978–3–8273–7044–0 - -\noindent [Lamport 1994] Lamport, Leslie: LaTeX - A Document Preparation System: User’s Guide and Reference Manual, Second Edition. Pearson / Prentice Hall, 1994. – ISBN 978–0–201–52983–8 diff --git a/exercises/literature/task.tex b/exercises/literature/task.tex index ed265d5..3f972d1 100644 --- a/exercises/literature/task.tex +++ b/exercises/literature/task.tex @@ -2,19 +2,17 @@ \item Use Google Scholar to retrieve Bib\TeX{} entries for the following \LaTeX{} handbooks: \begin{itemize} - \item Leslie Lamport (1994): \LaTeX. A Document Preparation System. \item Dilip Datta (2017): \LaTeX\ in 24 Hours. A Practical Guide for Scientific Writing. \item Frank Mittelbach / Michel Goossens (2002): Der \LaTeX-Begleiter. \end{itemize} \item Compare the entries with the results that \url{dblp.org} finds for the same titles. - \item Create a new Bib\TeX{} file called \file{literature.bib} in the - \file{exercises/literature} folder. + \item Create a new Bib\TeX{} file called \file{literature.bib} in the \file{exercises/literature} folder. \item Add the Bib\TeX{} entries to the newly created Bib\TeX{} files. For this, select your preferred source among Google Scholar and dblp. \item Assign unique and meaningful Bib\TeX{} keys. \item Include the Bib\TeX{} file in a suitable location, where later on the references should be listed. - \item Cite the three handbooks in the + \item Cite the two handbooks in the file\\\file{exercises/literature/literature.tex}. - \item Make use of the \mono{natdin} biliography style. + \item Make use of the \mono{plain} biliography style. \item \textbf{Note}: If compiling fails, it may help to remove all auxiliary files \\(\mono{main.aux/bbl/blg/loc/out/pdf/soc/toc}) before compiling again. \end{enumerate} diff --git a/exercises/maths/math-formulas.code.tex b/exercises/maths/math-formulas.code.done.tex similarity index 100% rename from exercises/maths/math-formulas.code.tex rename to exercises/maths/math-formulas.code.done.tex diff --git a/exercises/maths/math-formulas.done.tex b/exercises/maths/math-formulas.done.tex index 838b6f6..afa1f1f 100644 --- a/exercises/maths/math-formulas.done.tex +++ b/exercises/maths/math-formulas.done.tex @@ -1 +1 @@ -\codeblock{latex}{./exercises/maths/math-formulas.code.tex} \ No newline at end of file +\codeblock{latex}{./exercises/maths/math-formulas.code.done.tex} \ No newline at end of file diff --git a/exercises/project-structure/main-with-preamble.done.tex b/exercises/project-structure/main-with-preamble.done.tex index 7978dc2..460ade1 100644 --- a/exercises/project-structure/main-with-preamble.done.tex +++ b/exercises/project-structure/main-with-preamble.done.tex @@ -9,8 +9,11 @@ \maketitle \tableofcontents -\include{section1} -\include{section2} -\include{section3} +\newpage +\input{section1} +\newpage +\input{section2} +\newpage +\input{section3} \end{document} \ No newline at end of file diff --git a/exercises/project-structure/main.done.tex b/exercises/project-structure/main.done.tex index 03310b9..5aea718 100644 --- a/exercises/project-structure/main.done.tex +++ b/exercises/project-structure/main.done.tex @@ -4,8 +4,11 @@ \maketitle \tableofcontents -\include{section1.done} -\include{section2.done} -\include{section3.done} +\newpage +\input{section1.done} +\newpage +\input{section2.done} +\newpage +\input{section3.done} \end{document} \ No newline at end of file diff --git a/exercises/project-structure/main.raw.tex b/exercises/project-structure/main.raw.tex index e6fe69c..e2b0746 100644 --- a/exercises/project-structure/main.raw.tex +++ b/exercises/project-structure/main.raw.tex @@ -27,7 +27,7 @@ Marzipan marzipan cupcake pastry tart sesame snaps sweet roll pie. Marshmallow p Carrot cake cotton candy toffee jelly-o chocolate toffee cookie sweet roll. Pastry tootsie roll marzipan apple pie lollipop gingerbread sweet. Fruitcake gummies bear claw croissant. Pie cotton candy cheesecake powder bonbon candy canes lemon drops sweet. \newpage -\section{Third ection} +\section{Third section} Tart dragée bear claw icing fruitcake. Caramels marzipan jujubes bonbon. Fruitcake danish cookie halvah cake. Cheesecake sesame snaps jelly beans. Macaroon powder pie biscuit biscuit croissant cotton candy. Chocolate bar chupa chups tart cheesecake gingerbread tart. Ice cream muffin chupa chups sugar plum dragée topping marshmallow dragée. diff --git a/exercises/project-structure/tasks.done.tex b/exercises/project-structure/tasks.done.tex index 0d51689..acff4d5 100644 --- a/exercises/project-structure/tasks.done.tex +++ b/exercises/project-structure/tasks.done.tex @@ -1,49 +1,24 @@ \begin{enumerate} \item \textbf{Put the sections of the file into separate files, named - \file{section1.tex}, \file{section2.tex}, and \file{section3.tex}. Include - them using the \code{latex}{\textbackslash include} command.} + \file{section1.tex}, \file{section2.tex}, and \file{section3.tex} and insert them using the} \code{latex}{\textbackslash input} \textbf{command. (In TeXstudio, make sure that you select the main file as the file to be compiled by right-clicking on it and selecting \enquote{Select as explicit root document.})} \begin{figure}[H] \codeblock{latex}{exercises/project-structure/main-with-preamble.done.tex} \caption{\file{main.tex}} \end{figure} + \begin{figure}[H] \codeblock{latex}{exercises/project-structure/section1.done.tex} \caption{\file{section1.tex} (analogous for the other sections)} \end{figure} - \item \textbf{Which command becomes superfluous when you use - \code{latex}{\textbackslash include}?} \\ - \code{latex}{\textbackslash include} makes every included file appear on a - new page. Hence the command \code{latex}{\textbackslash newpage} becomes - superfluous. - \item \textbf{Can the preamble also be excluded? If no, why? If yes, when - can outsourcing the preamble be useful?} + \item \textbf{Can the preamble also be excluded? If no, why? If yes, when can outsourcing the preamble be useful?} - The preamble can also be outsourced, like in task 1. In real-world - \LaTeX{} projects we often make use of numerous packages that need to be + The preamble can also be outsourced, like in task 1. In real-world \LaTeX{} projects, we often make use of numerous packages that need to be configured by additional commands within the preamble. Therefore, it is advisable to outsource the preamble. On top of that, this is useful because the file with the most-commonly used packages can be moved from one project to another without needing to rewrite the preamble every time. - - \item - \textbf{Add the command \code{latex}{\textbackslash - includeonly\{section2\}} to the preamble. Compile the document again, and - check what has changed. What does the command do and how can it be helpful - in a larger project? } - - The command \code{latex}{\textbackslash includeonly\{section2\}} does - exactly what the name already says. During compilation, only the - \code{latex}{\textbackslash include} statements that contain file names - that appear in \code{latex}{\textbackslash includeonly\{file1,file2, …\}} - are included. - - This can be useful for larger projects, when the compile time becomes - longer since by using the \code{latex}{\textbackslash includeonly} only the - files can be included which we are currently working in. Before the final - compilation we can delete the \code{latex}{\textbackslash includeonly} - command and end up with our complete \acro{PDF}. \end{enumerate} \ No newline at end of file diff --git a/exercises/project-structure/tasks.raw.tex b/exercises/project-structure/tasks.raw.tex index 9c3dd8c..5b4f819 100644 --- a/exercises/project-structure/tasks.raw.tex +++ b/exercises/project-structure/tasks.raw.tex @@ -1,13 +1,6 @@ \begin{enumerate} - \item \textbf{Put the sections of the file into separate files, named - \texttt{section1.tex}, \texttt{section2.tex}, and \texttt{section3.tex}. - Include them using the \code{\textbackslash include} command.} - \item \textbf{Which command becomes superfluous when you use - \code{\textbackslash include}} - \item \textbf{Can the preamble also be excluded? If no, why? If yes, why can - outsourcing the preamble be useful?} - \item \textbf{Add the command \code{\textbackslash includeonly\{section2\}} to - the - preamble. Compile the document again, and check what has changed. What does - the command do and why can it be helpful in a larger project? } + \item \textbf{Put the sections of the file into separate files, named} + \file{section1.tex}, \file{section2.tex}\textbf{, and} \file{section3.tex}. + \textbf{Include them using the} \code{latex}{\textbackslash input} \textbf{command. (In TeXstudio, make sure that you select the main file as the file to be compiled by right-clicking on it and selecting \enquote{Select as explicit root document.})} + \item \textbf{Can the preamble also live in its own file? If no, why? If yes, why can outsourcing the preamble be useful?} \end{enumerate} diff --git a/exercises/references/references.code.tex b/exercises/references/references.code.done.tex similarity index 86% rename from exercises/references/references.code.tex rename to exercises/references/references.code.done.tex index 1190be1..fac75bb 100644 --- a/exercises/references/references.code.tex +++ b/exercises/references/references.code.done.tex @@ -12,6 +12,6 @@ C\# is an object-oriented programming language that was developed by Microsoft i \begin{listing}[H] \caption{A simple C\# program} \label{lst:csharphelloworld} - \inputminted[breaklines, - linenos=true]{csharp}{exercises/references/HelloLateXFriends.cs} + \lstset{language=csharp} + \lstinputlisting{exercises/references/HelloLateXFriends.cs} \end{listing} \ No newline at end of file diff --git a/exercises/references/references.done.tex b/exercises/references/references.done.tex index f5d8acf..bffd43f 100644 --- a/exercises/references/references.done.tex +++ b/exercises/references/references.done.tex @@ -1 +1 @@ -\codeblock{latex}{./exercises/references/references.code.tex} \ No newline at end of file +\codeblock{latex}{./exercises/references/references.code.done.tex} \ No newline at end of file diff --git a/exercises/references/references.raw.tex b/exercises/references/references.raw.tex index 6e25f6f..bf5452f 100644 --- a/exercises/references/references.raw.tex +++ b/exercises/references/references.raw.tex @@ -8,8 +8,5 @@ C\# is an object-oriented programming language that was developed by Microsoft i The following source code listing shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications. -\codeblock{csharp}{exercises/references/HelloLateXFriends.cs} - - - - +\lstset{language=csharp} +\lstinputlisting{exercises/references/HelloLateXFriends.cs} diff --git a/exercises/references/task.tex b/exercises/references/task.tex index 376e4fd..4e9c3b6 100644 --- a/exercises/references/task.tex +++ b/exercises/references/task.tex @@ -1,10 +1,6 @@ -In file \file{exercises/references/references.tex}, replace \enquote{in the -figure} and \enquote{the following source code listing} with suited references. -Use the command \code{latex}{\textbackslash cref}. Do not forget to first -introduce -labels for the elements that you want to reference. To do so, first of all, -wrap the source code listing in a \code{latex}{listing} environment. Also -insert a caption for the source code listing. +In file \file{exercises/references/references.tex}, replace \enquote{in the figure} and \enquote{the following source code listing} with suited references. +Use the command \code{latex}{\textbackslash cref}. Do not forget to first introduce labels for the elements that you want to reference. To do so, first of all, wrap the source code listing in a \code{latex}{listing} environment. +Also, insert a caption for the source code listing. Make sure to use suitable prefixes before the labels. \exercisematerial{exercises/references/references} diff --git a/exercises/source-code-listings/minted.done.tex b/exercises/source-code-listings/minted.done.tex index d5df579..035e48e 100644 --- a/exercises/source-code-listings/minted.done.tex +++ b/exercises/source-code-listings/minted.done.tex @@ -7,7 +7,7 @@ bgcolor=ourBackgroundColor, % background color firstline=5, % first line to be included lastline=7, % last line to be included - gobble=4 % remove leading spaces + autogobble=true % remove leading spaces ]{java}{exercises/source-code-listings/Source.java} \usemintedstyle{default} \ No newline at end of file diff --git a/exercises/source-code-listings/task.tex b/exercises/source-code-listings/task.tex index 6ee9b8c..af513ad 100644 --- a/exercises/source-code-listings/task.tex +++ b/exercises/source-code-listings/task.tex @@ -12,8 +12,7 @@ If you have questions, consult the \pkg{minted} or \pkg{listings} package docume \item Use the theme \code{latex}{native}. \item This theme is optimized for a dark background. Change the background color to dark blue. \item Include only lines 5 to 7. - \item Delete the spaces at the beginning of the lines by using a suitable - option. (Hint: The documentation speaks of \code{latex}{gobble}.) + \item Delete the spaces at the beginning of the lines. (Hint: The documentation speaks of \code{latex}{autogobble}.) \end{enumerate} \section*{Listings tasks} diff --git a/exercises/special-characters/special-characters.code.tex b/exercises/special-characters/special-characters.code.done.tex similarity index 100% rename from exercises/special-characters/special-characters.code.tex rename to exercises/special-characters/special-characters.code.done.tex diff --git a/exercises/special-characters/special-characters.done.tex b/exercises/special-characters/special-characters.done.tex index 7e04e37..68b0c57 100644 --- a/exercises/special-characters/special-characters.done.tex +++ b/exercises/special-characters/special-characters.done.tex @@ -1 +1 @@ -\codeblock{latex}{./exercises/special-characters/special-characters.code.tex} +\codeblock{latex}{./exercises/special-characters/special-characters.code.done.tex} diff --git a/exercises/special-characters/special-characters.raw.tex b/exercises/special-characters/special-characters.raw.tex index 0bf87b4..9419ced 100644 --- a/exercises/special-characters/special-characters.raw.tex +++ b/exercises/special-characters/special-characters.raw.tex @@ -1,8 +1,7 @@ What is a semester ticket? -It is also known as Studi-Ticket or Studi-Karte in German and allows you to use the local public transport around Bamberg for free. -In Bamberg, the semester ticked is embodied in your student card (Studierendenausweis). -To be able to use it, you have to validate the student card in one of the university buildings. -This is possible after you have paid the semester fees. -Validation printers are located in multiple university buildings, e. g., in the foyer of the Erba building, in front of the library. -This building is opened Monday-Friday, 7am-10pm. - +It is also known as Studi-Ticket or Studi-Karte and allows you to use the local public transport around Bamberg for free. +In Bamberg, your student card (Studierendenausweis) is used, i. a., as a semester ticket. +To be able to use it, you should validate the student card in one of the university buildings. +This is possible after you have paid the semester fees (101,50 €). +A validation printers are located in multiple university buildings, e. g., in the foyer of the Erba building, in front of the library. +This building is opened Monday - Friday, 7am - 10pm. diff --git a/exercises/special-characters/task.tex b/exercises/special-characters/task.tex index 91652da..32806b2 100644 --- a/exercises/special-characters/task.tex +++ b/exercises/special-characters/task.tex @@ -5,9 +5,13 @@ compile the \file{main.tex} file. This applies for the subsequent tasks, as well. \begin{enumerate} - \item Replace the spaces in exercises/special-characters.tex within the abbreviations (\enquote{e. g.}) by thin spaces. - \item Replace the hyphens separating the opening hours by en dashes (--), optionally surrounded by thin spaces. + \item In the text, you find a bunch of abbreviations. Replace the spaces + within the abbreviations by thin spaces. Put a thin space in front of the + word Euro sign (€). + \item Replace the hyphens within the Erba opening hours by en dashes. \item Restrict the hyphenation of word \emph{Studierendenausweis} to one position: \\\emph{Studierenden-ausweis}. + \item Add quotation marks around the words \emph{Studi-Ticket} and + \emph{Studi-Karte} using the \code{latex}{\textbackslash enquote} command. \end{enumerate} \exercisematerial[.63]{exercises/special-characters/special-characters} diff --git a/exercises/tables/tables.code.tex b/exercises/tables/tables.code.done.tex similarity index 100% rename from exercises/tables/tables.code.tex rename to exercises/tables/tables.code.done.tex diff --git a/exercises/tables/tables.done.tex b/exercises/tables/tables.done.tex index a537154..1770478 100644 --- a/exercises/tables/tables.done.tex +++ b/exercises/tables/tables.done.tex @@ -1,4 +1,4 @@ -\codeblock{latex}{./exercises/tables/tables.code.tex} +\codeblock{latex}{./exercises/tables/tables.code.done.tex} \begin{table}[h] \centering diff --git a/exercises/text-markup/markup.code.tex b/exercises/text-markup/markup.code.done.tex similarity index 100% rename from exercises/text-markup/markup.code.tex rename to exercises/text-markup/markup.code.done.tex diff --git a/exercises/text-markup/markup.done.tex b/exercises/text-markup/markup.done.tex index 9449347..1c99587 100644 --- a/exercises/text-markup/markup.done.tex +++ b/exercises/text-markup/markup.done.tex @@ -1 +1 @@ -\codeblock{latex}{./exercises/text-markup/markup.code.tex} +\codeblock{latex}{./exercises/text-markup/markup.code.done.tex} diff --git a/graphics/cover/latex-script-cover.afdesign b/graphics/cover/latex-script-cover.afdesign new file mode 100755 index 0000000..4968053 Binary files /dev/null and b/graphics/cover/latex-script-cover.afdesign differ diff --git a/graphics/cover/latex-script-cover.pdf b/graphics/cover/latex-script-cover.pdf new file mode 100755 index 0000000..3eeade2 Binary files /dev/null and b/graphics/cover/latex-script-cover.pdf differ diff --git a/listings/lists/nested-list.tex b/listings/lists/nested-list.tex index b39626d..e80e617 100644 --- a/listings/lists/nested-list.tex +++ b/listings/lists/nested-list.tex @@ -1,5 +1,5 @@ \begin{itemize} - \item lasagne noodles + \item lasagna noodles \item crushed tomatoes \item herbs \begin{enumerate} \item oregano diff --git a/listings/source-code-listings/listings-import-styled.tex b/listings/source-code-listings/listings-import-styled.tex index 365e94e..a3ff2ab 100644 --- a/listings/source-code-listings/listings-import-styled.tex +++ b/listings/source-code-listings/listings-import-styled.tex @@ -11,7 +11,7 @@ keywordstyle=\color{codeblue}, identifierstyle=\color{codegreen}, stringstyle=\color{codeyellow}, - basicstyle=\footnotesize + basicstyle=\small \ttfamily\color{white}, commentstyle=\color{codegray}, numberstyle=\tiny\color{codegray}, diff --git a/main.tex b/main.tex index 0d472ed..c57ea34 100644 --- a/main.tex +++ b/main.tex @@ -36,12 +36,12 @@ \exercise{lists} \input{content/maths.tex} \exercise{maths} -\input{content/source-code-listings.tex} -\exercise{source-code-listings} \input{content/graphics.tex} \exercise{graphics} \input{content/tables.tex} \exercise{tables} +\input{content/source-code-listings.tex} +\exercise{source-code-listings} \input{content/footnotes.tex} \exercise{footnotes} \input{content/references.tex} diff --git a/praeamble.tex b/praeamble.tex index a62c53f..2ab1413 100644 --- a/praeamble.tex +++ b/praeamble.tex @@ -32,6 +32,9 @@ % Tables \usepackage{longtable, array, tabularx, booktabs, colortbl} +% PDF imports +\usepackage{pdfpages} + % ToDos \usepackage{todonotes} \usepackage{changes}