translate exercise on project structure

This commit is contained in:
Fradtschuk 2021-09-05 17:46:15 +02:00
parent a7e734a5e2
commit a017c5b8b4
22 changed files with 58 additions and 27 deletions

View File

@ -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.
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.

View File

@ -3,7 +3,7 @@
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{Übung zur Projektstruktur}
\title{Exercise on Project Structure}
\begin{document}
\maketitle

View File

@ -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.

View File

@ -3,4 +3,4 @@
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{Übung zur Projektstruktur}
\title{Exercise on Project Structure}

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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}

View File

@ -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}

View File

@ -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}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -12,7 +12,6 @@
% \maketitle
\thispagestyle{empty}
\newpage
\setcounter{page}{1} % Don't count title page.
\setcounter{tocdepth}{2}
\tableofcontents