Add task for project structure

This commit is contained in:
Knoch 2021-03-22 12:26:58 +01:00
parent f553638622
commit 9879337563
11 changed files with 128 additions and 0 deletions

View File

@ -0,0 +1,16 @@
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{Übung zur Projektstruktur}
\begin{document}
\maketitle
\tableofcontents
\include{section1}
\include{section2}
\include{section3}
\end{document}

View File

@ -0,0 +1,11 @@
\input{preamble.done}
\begin{document}
\maketitle
\tableofcontents
\include{section1.done}
\include{section2.done}
\include{section3.done}
\end{document}

View File

@ -0,0 +1,40 @@
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{Übung zur Projektstruktur}
\begin{document}
\maketitle
\tableofcontents
\newpage
\section{Erster Abschnitt}
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.
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}
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.
Marzipan marzipan cupcake pastry tart sesame snaps sweet roll pie. Marshmallow pastry icing macaroon topping toffee powder gummi bears soufflé. Danish carrot cake sesame snaps cotton candy candy canes cotton candy. Cheesecake dragée sweet roll. Cheesecake muffin tiramisu marshmallow. Lollipop lollipop jujubes jelly-o cake sugar plum. Lemon drops donut topping wafer. Pastry gingerbread biscuit cheesecake muffin candy canes sweet pastry.
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}
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.
Brownie chocolate cake oat cake soufflé ice cream brownie soufflé pudding. Wafer toffee topping bonbon. Croissant cheesecake halvah ice cream pudding. Jelly pastry carrot cake dragée. Jelly-o cotton candy croissant.
Halvah pie donut sweet pudding sweet roll soufflé tart tiramisu. Fruitcake soufflé lemon drops croissant croissant sweet lemon drops icing. Jelly cheesecake cotton candy jujubes candy canes. Gummi bears gummies pie pudding sweet roll cake wafer. Icing powder ice cream carrot cake pudding sesame snaps. Caramels brownie lemon drops macaroon. Oat cake sesame snaps chocolate cake bear claw muffin chocolate fruitcake pie.
Bear claw wafer jelly-o jujubes donut powder jelly-o soufflé gummi bears. Carrot cake gummies gummi bears chocolate cake. Soufflé dessert jelly beans wafer. Sugar plum liquorice icing. Gummies marzipan lemon drops apple pie. Jelly-o icing lemon drops cake. Chupa chups chocolate sesame snaps gingerbread pastry bear claw carrot cake apple pie.
\end{document}

View File

@ -0,0 +1,6 @@
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{Übung zur Projektstruktur}

View File

@ -0,0 +1,6 @@
\section{Erster Abschnitt}
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.
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.

View File

@ -0,0 +1,7 @@
\section{Zweiter Abschnitt}
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.
Marzipan marzipan cupcake pastry tart sesame snaps sweet roll pie. Marshmallow pastry icing macaroon topping toffee powder gummi bears soufflé. Danish carrot cake sesame snaps cotton candy candy canes cotton candy. Cheesecake dragée sweet roll. Cheesecake muffin tiramisu marshmallow. Lollipop lollipop jujubes jelly-o cake sugar plum. Lemon drops donut topping wafer. Pastry gingerbread biscuit cheesecake muffin candy canes sweet pastry.
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.

View File

@ -0,0 +1,9 @@
\section{Dritter Abschnitt}
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.
Brownie chocolate cake oat cake soufflé ice cream brownie soufflé pudding. Wafer toffee topping bonbon. Croissant cheesecake halvah ice cream pudding. Jelly pastry carrot cake dragée. Jelly-o cotton candy croissant.
Halvah pie donut sweet pudding sweet roll soufflé tart tiramisu. Fruitcake soufflé lemon drops croissant croissant sweet lemon drops icing. Jelly cheesecake cotton candy jujubes candy canes. Gummi bears gummies pie pudding sweet roll cake wafer. Icing powder ice cream carrot cake pudding sesame snaps. Caramels brownie lemon drops macaroon. Oat cake sesame snaps chocolate cake bear claw muffin chocolate fruitcake pie.
Bear claw wafer jelly-o jujubes donut powder jelly-o soufflé gummi bears. Carrot cake gummies gummi bears chocolate cake. Soufflé dessert jelly beans wafer. Sugar plum liquorice icing. Gummies marzipan lemon drops apple pie. Jelly-o icing lemon drops cake. Chupa chups chocolate sesame snaps gingerbread pastry bear claw carrot cake apple pie.

View File

@ -0,0 +1,3 @@
Im Ordner \mintinline{text}{exercises/project-structure} findet ihr eine Datei namens \mintinline{text}{main.tex}.
\exercisematerial{exercises/project-structure/tasks}

View File

@ -0,0 +1,23 @@
\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.}
\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}
\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.
\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.
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}

View File

@ -0,0 +1,6 @@
\begin{enumerate}
\item 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.
\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?
\end{enumerate}

View File

@ -23,6 +23,7 @@
\input{content/basic-document-structure.tex}
\exercise{basic-document-structure}
\input{content/project-structure.tex}
\exercise{project-structure}
\input{content/special-characters.tex}
\input{content/text-markup.tex}
\exercise{text-markup}