24 lines
1.3 KiB
TeX
24 lines
1.3 KiB
TeX
\begin{enumerate}
|
|
\item
|
|
Put the sections of the file into separate files, named
|
|
\file{section1.tex}, \file{section2.tex}, and \file{section3.tex} and insert them using the \code{latex}{\textbackslash input} 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.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 Can the preamble also live in its own file? Find out by moving it analogously to the sections. If no, why? If yes, why can outsourcing the preamble be useful?
|
|
|
|
The preamble can also be outsourced. 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.
|
|
\end{enumerate} |