diff --git a/content/project-structure.tex b/content/project-structure.tex index eefb56b..58166c0 100644 --- a/content/project-structure.tex +++ b/content/project-structure.tex @@ -21,4 +21,6 @@ Let us now turn to the differences between the two possible commands for includi If you use the command \mintinline{latex}{\input}, you can specify the file extension \texttt{.tex}, but it is not mandatory. It is also possible to nest the inclusion of files: A file included with \mintinline{latex}{\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 \mintinline{latex}{\include} behaves differently: Here the file extension \texttt{.tex} \emph{must} be omitted. Nesting of embeddings is not possible. A new page is also created for each included file. \ No newline at end of file +The command \mintinline{latex}{\include} behaves differently: Here, the file +extension \texttt{.tex} \emph{must} be omitted. Nesting of embeddings is not +possible. Also, a new page is created for each included file. \ 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 fc6c233..7978dc2 100644 --- a/exercises/project-structure/main-with-preamble.done.tex +++ b/exercises/project-structure/main-with-preamble.done.tex @@ -3,7 +3,7 @@ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} -\title{Übung zur Projektstruktur} +\title{Exercise on Project Structure} \begin{document} \maketitle diff --git a/exercises/project-structure/main.raw.tex b/exercises/project-structure/main.raw.tex index 00bbf91..5520040 100644 --- a/exercises/project-structure/main.raw.tex +++ b/exercises/project-structure/main.raw.tex @@ -3,14 +3,14 @@ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} -\title{Übung zur Projektstruktur} +\title{Exercise on Project Structure} \begin{document} \maketitle \tableofcontents \newpage -\section{Erster Abschnitt} +\section{First section} Jelly beans tiramisu chocolate bar chupa chups candy canes lollipop liquorice cheesecake tootsie roll. Marshmallow sugar plum cake tiramisu jelly cake bear claw. Croissant liquorice jelly lollipop carrot cake. Cheesecake danish chocolate halvah. Candy canes jujubes chupa chups jujubes candy canes tootsie roll toffee danish sesame snaps. Sugar plum gummi bears lollipop chocolate bar. Ice cream soufflé sweet lemon drops chocolate soufflé gingerbread cookie muffin. Sugar plum danish halvah jujubes pastry donut carrot cake dessert donut. Sweet gingerbread gingerbread wafer gummi bears pastry. Tootsie roll donut powder cake. Brownie halvah lollipop gummi bears. Liquorice pie caramels jelly beans. Halvah danish brownie danish toffee cotton candy lemon drops. @@ -18,7 +18,7 @@ Sugar plum danish halvah jujubes pastry donut carrot cake dessert donut. Sweet g Donut jelly beans candy canes muffin lemon drops carrot cake sugar plum. Sesame snaps pie bonbon cotton candy cookie caramels. Chupa chups dessert tootsie roll carrot cake candy cookie sweet roll jelly beans. Oat cake halvah gingerbread bonbon sweet sesame snaps dragée carrot cake. Bonbon pastry chupa chups. Chocolate cake macaroon jelly-o. Pastry pastry sugar plum jujubes lemon drops gummi bears sugar plum cheesecake fruitcake. Chocolate cake chocolate candy. Wafer carrot cake chocolate cake jujubes cupcake soufflé gingerbread chocolate cake donut. \newpage -\section{Zweiter Abschnitt} +\section{Second section} Sweet roll tart chocolate bar cotton candy jelly beans cheesecake. Ice cream pastry halvah tart dragée jelly beans chocolate toffee wafer. Pie tootsie roll wafer halvah jelly cake donut cheesecake. Caramels tiramisu candy canes tootsie roll danish apple pie topping topping. Gingerbread carrot cake chocolate cake liquorice jujubes caramels cupcake apple pie macaroon. @@ -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{Dritter Abschnitt} +\section{Third ection} 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/preamble.done.tex b/exercises/project-structure/preamble.done.tex index 855a2a3..c299ab4 100644 --- a/exercises/project-structure/preamble.done.tex +++ b/exercises/project-structure/preamble.done.tex @@ -3,4 +3,4 @@ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} -\title{Übung zur Projektstruktur} \ No newline at end of file +\title{Exercise on Project Structure} \ No newline at end of file diff --git a/exercises/project-structure/section1.done.tex b/exercises/project-structure/section1.done.tex index b2e8c9e..38ffde4 100644 --- a/exercises/project-structure/section1.done.tex +++ b/exercises/project-structure/section1.done.tex @@ -1,4 +1,4 @@ -\section{Erster Abschnitt} +\section{First section} Jelly beans tiramisu chocolate bar chupa chups candy canes lollipop liquorice cheesecake tootsie roll. Marshmallow sugar plum cake tiramisu jelly cake bear claw. Croissant liquorice jelly lollipop carrot cake. Cheesecake danish chocolate halvah. Candy canes jujubes chupa chups jujubes candy canes tootsie roll toffee danish sesame snaps. Sugar plum gummi bears lollipop chocolate bar. Ice cream soufflé sweet lemon drops chocolate soufflé gingerbread cookie muffin. Sugar plum danish halvah jujubes pastry donut carrot cake dessert donut. Sweet gingerbread gingerbread wafer gummi bears pastry. Tootsie roll donut powder cake. Brownie halvah lollipop gummi bears. Liquorice pie caramels jelly beans. Halvah danish brownie danish toffee cotton candy lemon drops. diff --git a/exercises/project-structure/section2.done.tex b/exercises/project-structure/section2.done.tex index c39f18c..3cb8080 100644 --- a/exercises/project-structure/section2.done.tex +++ b/exercises/project-structure/section2.done.tex @@ -1,4 +1,4 @@ -\section{Zweiter Abschnitt} +\section{Second section} Sweet roll tart chocolate bar cotton candy jelly beans cheesecake. Ice cream pastry halvah tart dragée jelly beans chocolate toffee wafer. Pie tootsie roll wafer halvah jelly cake donut cheesecake. Caramels tiramisu candy canes tootsie roll danish apple pie topping topping. Gingerbread carrot cake chocolate cake liquorice jujubes caramels cupcake apple pie macaroon. diff --git a/exercises/project-structure/section3.done.tex b/exercises/project-structure/section3.done.tex index de29364..cea1bcc 100644 --- a/exercises/project-structure/section3.done.tex +++ b/exercises/project-structure/section3.done.tex @@ -1,4 +1,4 @@ -\section{Dritter Abschnitt} +\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/task.tex b/exercises/project-structure/task.tex index c3d9cfa..f95fe81 100644 --- a/exercises/project-structure/task.tex +++ b/exercises/project-structure/task.tex @@ -1,3 +1,4 @@ -Im Ordner \mintinline{text}{exercises/project-structure} findet ihr die Datei \mintinline{text}{main.tex}. +Within the directory \texttt{exercises/project-structure} you can find the file +\texttt{main.tex}. \exercisematerial{exercises/project-structure/tasks} diff --git a/exercises/project-structure/tasks.done.tex b/exercises/project-structure/tasks.done.tex index 95acb48..770d078 100644 --- a/exercises/project-structure/tasks.done.tex +++ b/exercises/project-structure/tasks.done.tex @@ -1,23 +1,45 @@ \begin{enumerate} \item - \textbf{Lagert die einzelnen Abschnitte in eigene Dateien \mintinline{latex}{section1.tex}, \mintinline{latex}{section2.tex} und \mintinline{latex}{section3.tex} aus und bindet sie mittels \mintinline{latex}{\include} ein.} + \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 \mintinline{latex}{\include} command.} \begin{figure}[H] \inputminted[linenos=true]{latex}{exercises/project-structure/main-with-preamble.done.tex} \caption{\mintinline{latex}{main.tex}} \end{figure} \begin{figure}[H] \inputminted[linenos=true,breaklines=true]{latex}{exercises/project-structure/section1.done.tex} - \caption{\mintinline{latex}{section1.tex} (analog für die anderen Abschnitte)} - \end{figure} + \caption{\mintinline{latex}{section1.tex} (analogous for the other + sections)} + \end{figure} + \item \textbf{Which command becomes superfluous when you use + \mintinline{latex}{\include}?} \\ + \mintinline{latex}{\include} makes every included file appear on a new + page. Hence the command \mintinline{latex}{\newpage} becomes superfluous. \item - \textbf{Welcher Befehl wird durch \mintinline{latex}{\include} überflüssig?} \\ - \mintinline{latex}{\include} sorgt eigenständig dafür, dass der Inhalt jeder eingebundener Datei auf einer eigenen Seite erscheint. Der Befehl \mintinline{latex}{\newpage} ist somit überflüssig. + \textbf{Can the preamble also be excluded? If no, why? If yes, why 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 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 can + with the most-commonly used packages can be moved from one project to + another without needing to rewrite the preamble every time. \item - \textbf{Kann auch die Präambel ausgelagert werden? Wenn nicht, warum? Wenn doch, wofür ist diese Vorgehensweise eventuell nützlich?} \\ - Auch die Präambel kann ausgelagert werden. Das Vorgehen entspricht dem aus Aufgabe 1 bekannten. In realen \LaTeX-Projekten sind häufig sehr viele Pakete eingebunden, die oftmals mit zusätzlichen Befehlen in der Präambel konfiguriert werden müssen. Es ist daher gute Praxis, die Präambel auszulagern. Das hat zudem den Vorteil, dass wir eine Datei mit den am häufigsten verwendeten Paketen einfach von einem Projekt ins andere mitnehmen können, ohne unsere Präambel immer wieder neu zu schreiben. - \item - \textbf{Ergänzt in der Präambel den Befehl \mintinline{latex}{\includeonly{section2}}. Kompiliert das Dokument und prüft, was sich geändert hat. Welche Funktion hat dieser Befehl und wofür könnte er bei einem größeren Projekt hilfreich sein? } \\ - Der Befehl \mintinline{latex}{\includeonly{section2}} tut genau, was er sagt. Beim Kompilieren werden unter allen \mintinline{latex}{\include}-Statements nur noch diejenigen beachtet, deren Dateinamen auch in \mintinline{latex}{\includeonly{datei1,datei2,…}} vorkommen. + \textbf{Add the command \mintinline{latex}{\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? } \\ + The command \mintinline{latex}{\includeonly{section2}} doex exactly what + the name already says. During compilation, only the + \mintinline{latex}{\include} + statements that contain file names that appear in + \mintinline{latex}{includeonly{file1,file2, …}} are included. + + This can be useful for larger projects, when the compile time becomes + longer since by using the \mintinline{latex}{\includeonly} only the files + can be included which we are currently working in. Before the final + compilation we can delete the \mintinline{latex}{\includeonly} command and + end up with our complete \acro{PDF}. - Wenn in größeren Projekten die Kompilierzeit mit jeder Seite länger wird, ist \mintinline{latex}{\includeonly} sehr nützlich. Mit der richtigen Einstellung wird nur kompiliert, woran wir gerade arbeiten. Vor dem finalen Kompiliervorgang können wir dann das \mintinline{latex}{\includeonly}-Statement entfernen und erhalten unser vollständiges 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 4c175c9..7f7eff1 100644 --- a/exercises/project-structure/tasks.raw.tex +++ b/exercises/project-structure/tasks.raw.tex @@ -1,6 +1,13 @@ \begin{enumerate} - \item Lagert die einzelnen Abschnitte in eigene Dateien namens \mintinline{latex}{section1.tex}, \mintinline{latex}{section2.tex} und \mintinline{latex}{section3.tex} aus und bindet sie mittels \mintinline{latex}{\include} ein. - \item Welcher Befehl wird durch \mintinline{latex}{\include} überflüssig? - \item Kann auch die Präambel ausgelagert werden? Wenn nicht, warum? Wenn doch, wofür ist diese Vorgehensweise eventuell nützlich? - \item Ergänzt in der Präambel den Befehl \mintinline{latex}{\includeonly{section2}}. Kompiliert das Dokument und prüft, was sich geändert hat. Welche Funktion hat dieser Befehl und wofür könnte er bei einem größeren Projekt hilfreich sein? + \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 \mintinline{latex}{\include} command.} + \item \textbf{Which command becomes superfluous when you use + \mintinline{latex}{\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 \mintinline{latex}{\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? } \end{enumerate} diff --git a/graphics/document-structure.done.pdf b/graphics/document-structure.done.pdf new file mode 100644 index 0000000..19b39bf Binary files /dev/null and b/graphics/document-structure.done.pdf differ diff --git a/graphics/math-formulas.rend-crop.pdf b/graphics/math-formulas.rend-crop.pdf index 5d8b0f8..c11204a 100644 Binary files a/graphics/math-formulas.rend-crop.pdf and b/graphics/math-formulas.rend-crop.pdf differ diff --git a/graphics/math-formulas.rend.pdf b/graphics/math-formulas.rend.pdf index f8ff2a9..d62554a 100644 Binary files a/graphics/math-formulas.rend.pdf and b/graphics/math-formulas.rend.pdf differ diff --git a/listings/basic-document-structure/headlines_crop.pdf b/listings/basic-document-structure/headlines_crop.pdf index 279291f..6f85a19 100644 Binary files a/listings/basic-document-structure/headlines_crop.pdf and b/listings/basic-document-structure/headlines_crop.pdf differ diff --git a/listings/basic-document-structure/hello-world_crop.pdf b/listings/basic-document-structure/hello-world_crop.pdf index 818df47..787b4bf 100644 Binary files a/listings/basic-document-structure/hello-world_crop.pdf and b/listings/basic-document-structure/hello-world_crop.pdf differ diff --git a/listings/basic-document-structure/titles_crop.pdf b/listings/basic-document-structure/titles_crop.pdf index 192073a..89a7180 100644 Binary files a/listings/basic-document-structure/titles_crop.pdf and b/listings/basic-document-structure/titles_crop.pdf differ diff --git a/listings/lists/description-list_crop.pdf b/listings/lists/description-list_crop.pdf index 8e64336..172da5d 100644 Binary files a/listings/lists/description-list_crop.pdf and b/listings/lists/description-list_crop.pdf differ diff --git a/listings/literature/natdin-example_bib.pdf b/listings/literature/natdin-example_bib.pdf index 67c3d5c..2dc4198 100644 Binary files a/listings/literature/natdin-example_bib.pdf and b/listings/literature/natdin-example_bib.pdf differ diff --git a/listings/maths/align-example_crop.pdf b/listings/maths/align-example_crop.pdf index 0e0d153..eca43cb 100644 Binary files a/listings/maths/align-example_crop.pdf and b/listings/maths/align-example_crop.pdf differ diff --git a/listings/project-structure/main-file_crop.pdf b/listings/project-structure/main-file_crop.pdf index a44bff0..8aba5ef 100644 Binary files a/listings/project-structure/main-file_crop.pdf and b/listings/project-structure/main-file_crop.pdf differ diff --git a/listings/references/ref_crop.pdf b/listings/references/ref_crop.pdf index 1657719..c1f3f70 100644 Binary files a/listings/references/ref_crop.pdf and b/listings/references/ref_crop.pdf differ diff --git a/main.tex b/main.tex index c5f39e2..a7d591b 100644 --- a/main.tex +++ b/main.tex @@ -12,7 +12,6 @@ % \maketitle \thispagestyle{empty} \newpage - \setcounter{page}{1} % Don't count title page. \setcounter{tocdepth}{2} \tableofcontents