diff --git a/.gitignore b/.gitignore index 23909ee..3eca5fa 100644 --- a/.gitignore +++ b/.gitignore @@ -79,7 +79,7 @@ _minted* *.swp *.swo -main_*.pdf +main-*.pdf listings-mode.tex exercise-mode.tex public diff --git a/commands.tex b/commands.tex index e09e161..e1c0ace 100644 --- a/commands.tex +++ b/commands.tex @@ -241,36 +241,3 @@ \end{figure} } -% Exercise Material -% ================= -% Takes a project-relative path, and inserts matching exercise material and/or solutions, depending on the exercise mode. -\newcommand\exercisematerial[1]{ - % Mode 'exercises': raw material only - \ifthenelse{\equal{\exercisemode}{exercises}}{ - \IfFileExists{#1.raw.tex}{ - \input{#1.raw.tex} - }{} - }{} - % Mode 'solutions': completed material only - \ifthenelse{\equal{\exercisemode}{solutions}}{ - \IfFileExists{#1.done.tex}{ - \input{#1.done.tex} - }{} - }{} - % Mode 'any': all existing material. If both raw and completed material exist, headings are added for each. - \ifthenelse{\equal{\exercisemode}{any}}{ - \IfFileExists{#1.raw.tex}{ - \IfFileExists{#1.done.tex}{ - \subsubsection*{Preview of the raw material} - }{} - \input{#1.raw.tex} - }{} - \IfFileExists{#1.done.tex}{ - \IfFileExists{#1.raw.tex}{ - \subsubsection*{Preview of the solution} - }{} - \input{#1.done.tex} - }{} - }{} -} - diff --git a/content/titlepage.tex b/content/titlepage.tex index becc9d4..406496c 100644 --- a/content/titlepage.tex +++ b/content/titlepage.tex @@ -2,16 +2,6 @@ \includepdf{graphics/cover.pdf} -\newpage -\thispagestyle{empty} +\todo{Adjust cover for different versions.} -\mbox{} -\vfill - -\begin{tabular}{@{}lp{9cm}} - & \subsubsection*{Imprint} \\ - & 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. -\end{tabular} +\input{imprint} diff --git a/exercises/basic-document-structure/task.tex b/exercises/basic-document-structure/task.tex index 4954b33..5f1ea0e 100644 --- a/exercises/basic-document-structure/task.tex +++ b/exercises/basic-document-structure/task.tex @@ -15,5 +15,3 @@ a table of contents for your document. \item Afterwards, comment out the preamble, the document environment, and the table of contents. \end{enumerate} - -\exercisematerial{exercises/basic-document-structure/document-structure} diff --git a/exercises/footnotes/task.tex b/exercises/footnotes/task.tex index d9f822c..aa43e33 100644 --- a/exercises/footnotes/task.tex +++ b/exercises/footnotes/task.tex @@ -7,19 +7,4 @@ Make the text \enquote{March 2021} of the file parentheses. Additionally, insert a clickable URL to the Java Development Kit as footnote. -\texttt{https://www.oracle.com/java/technologies/javase-downloads.html} - -\exercisematerial{exercises/footnotes/footnotes} - - -\subsection{Inserting references} - -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} \ No newline at end of file +\texttt{https://www.oracle.com/java/technologies/javase-downloads.html} \ No newline at end of file diff --git a/exercises/graphics/task.tex b/exercises/graphics/task.tex index 16647e9..88ff04a 100644 --- a/exercises/graphics/task.tex +++ b/exercises/graphics/task.tex @@ -6,6 +6,3 @@ In the \file{exercises/graphics} directory you can find an image file exactly where you have specified it. On top of that, the picture shall be centered, and a caption shall be added. Adapt the image width to the text width (\code{latex}{\textbackslash textwidth}). - - -\exercisematerial{exercises/graphics/graphics} diff --git a/exercises/lists/task.tex b/exercises/lists/task.tex index ad2770b..6712a02 100644 --- a/exercises/lists/task.tex +++ b/exercises/lists/task.tex @@ -5,5 +5,3 @@ unordered list (\code{latex}{itemize}) with sub-lists \emph{Ingredients} and \emph{Instructions}. Within these, there shall be an unordered list of ingredients and an ordered list of instructions, respectively. - -\exercisematerial{exercises/lists/lists} \ No newline at end of file diff --git a/exercises/literature/task.tex b/exercises/literature/task.tex index 176caa7..741df74 100644 --- a/exercises/literature/task.tex +++ b/exercises/literature/task.tex @@ -17,5 +17,3 @@ \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} - -\exercisematerial{exercises/literature/literature} diff --git a/exercises/maths/task.tex b/exercises/maths/task.tex index 628f74f..abbc7a2 100644 --- a/exercises/maths/task.tex +++ b/exercises/maths/task.tex @@ -3,4 +3,6 @@ Use \LaTeX{} math mode to typeset the following formulas. Pay attention to the size of brackets. -\exercisematerial{exercises/maths/math-formulas} +\todo{Strange indent} + +\vspace{1cm} \ No newline at end of file diff --git a/exercises/project-structure/task.tex b/exercises/project-structure/task.tex index c53a985..3488c5f 100644 --- a/exercises/project-structure/task.tex +++ b/exercises/project-structure/task.tex @@ -2,5 +2,3 @@ Within the directory \file{exercises/project-structure} you can find the file \file{main.tex}. - -\exercisematerial{exercises/project-structure/tasks} diff --git a/exercises/references/task.tex b/exercises/references/task.tex new file mode 100644 index 0000000..27f30ae --- /dev/null +++ b/exercises/references/task.tex @@ -0,0 +1,10 @@ +% same chapter as footnotes +\subsection{Inserting references} + +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. diff --git a/exercises/source-code-listings/task.tex b/exercises/source-code-listings/task.tex index 7c7174f..13017e6 100644 --- a/exercises/source-code-listings/task.tex +++ b/exercises/source-code-listings/task.tex @@ -29,8 +29,6 @@ If you have questions, consult the \pkg{minted} or \pkg{listings} package docume \item Don't show special characters for spaces in strings. \end{enumerate} -\exercisematerial{exercises/source-code-listings/source-code-listings} - % Reset experiments from exercise material if minted is used \ifthenelse{\equal{\listingsmode}{minted}}{% \usemintedstyle{default} diff --git a/exercises/special-characters/task.tex b/exercises/special-characters/task.tex index 48eb034..3121591 100644 --- a/exercises/special-characters/task.tex +++ b/exercises/special-characters/task.tex @@ -14,6 +14,3 @@ This applies for the subsequent tasks, as well. \item Add quotation marks around the words \emph{Studi-Ticket} and \emph{Studi-Karte} using the \code{latex}{\textbackslash enquote} command. \end{enumerate} - -\exercisematerial{exercises/special-characters/special-characters} - diff --git a/exercises/tables/task.tex b/exercises/tables/task.tex index be2b3b6..1d6bd75 100644 --- a/exercises/tables/task.tex +++ b/exercises/tables/task.tex @@ -6,7 +6,3 @@ To improve it, convert the list into a table with columns for \emph{name}, \emph Insert an additional \emph{centered column} that numbers the courses. Add a caption to the table. You find the table in \file{exercises/tables/tables.tex}. - -\exercisematerial{exercises/tables/tables} - - diff --git a/exercises/text-markup/task.tex b/exercises/text-markup/task.tex index 2af2fed..a66c4e8 100644 --- a/exercises/text-markup/task.tex +++ b/exercises/text-markup/task.tex @@ -7,5 +7,3 @@ \item Of course, you can also experiment with the other commands that you learned for text markup. However, you might want to remove them afterwards to keep your document nice and tidy. \end{enumerate} -\exercisematerial{exercises/text-markup/markup} - diff --git a/imprint.tex b/imprint.tex new file mode 100644 index 0000000..4367f16 --- /dev/null +++ b/imprint.tex @@ -0,0 +1,13 @@ +\newpage +\thispagestyle{empty} + +\mbox{} +\vfill + +\begin{tabular}{@{}lp{9cm}} + & \subsubsection*{Imprint} \\ + & 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. +\end{tabular} \ No newline at end of file diff --git a/main-exercises.tex b/main-exercises.tex new file mode 100644 index 0000000..01ed2b3 --- /dev/null +++ b/main-exercises.tex @@ -0,0 +1,77 @@ +\input{setup.tex} % Setup +\input{praeamble.tex} % Preamble +\input{commands.tex} % Custom commands + +\title{Script for the Fachschaft \acro{WIAI} \LaTeX{} Workshop} +\author{Evelyn Fradtschuk \and Florian Knoch \and Christian Kremitzl \and Bernhard Luedtke} + +\begin{document} +\selectlanguage{english} +\frenchspacing + +% Custom headline prefix +\renewcommand{\thesection}{E\arabic{section}} +\renewcommand{\thesubsection}{\arabic{subsection}} + +% Title page +\input{content/titlepage.tex} +% or simply +% \maketitle +\thispagestyle{empty} +\newpage +\setcounter{page}{1} % Don't count title page. +\setcounter{tocdepth}{2} +\tableofcontents +\newpage + +% Align exercise numbers with chapters +\setcounter{section}{3} + +\input{exercises/basic-document-structure/task} +\input{exercises/basic-document-structure/document-structure.raw} + +\newpage +\input{exercises/project-structure/task} +\input{exercises/project-structure/tasks.raw} + +\newpage +\input{exercises/special-characters/task} +\input{exercises/special-characters/special-characters.raw} + +\newpage +\input{exercises/text-markup/task} +\input{exercises/text-markup/markup.raw} + +\newpage +\input{exercises/lists/task} +\input{exercises/lists/lists.raw} + +\newpage +\input{exercises/maths/task} +\input{exercises/maths/math-formulas.raw} + +\newpage +\input{exercises/graphics/task} +\input{exercises/graphics/graphics.raw} + +\newpage +\input{exercises/tables/task} +\input{exercises/tables/tables.raw} + +\newpage +\input{exercises/source-code-listings/task} +\input{exercises/source-code-listings/source-code-listings.raw} + +\newpage +\input{exercises/footnotes/task} +\input{exercises/footnotes/footnotes.raw} + +\newpage +\input{exercises/references/task} +\input{exercises/references/references.raw} + +\newpage +\input{exercises/literature/task} +\input{exercises/literature/literature.raw} + +\end{document} diff --git a/main_script.tex b/main-script.tex similarity index 100% rename from main_script.tex rename to main-script.tex diff --git a/main-solutions.tex b/main-solutions.tex new file mode 100644 index 0000000..584f2d7 --- /dev/null +++ b/main-solutions.tex @@ -0,0 +1,77 @@ +\input{setup.tex} % Setup +\input{praeamble.tex} % Preamble +\input{commands.tex} % Custom commands + +\title{Script for the Fachschaft \acro{WIAI} \LaTeX{} Workshop} +\author{Evelyn Fradtschuk \and Florian Knoch \and Christian Kremitzl \and Bernhard Luedtke} + +\begin{document} +\selectlanguage{english} +\frenchspacing + +% Custom headline prefix +\renewcommand{\thesection}{E\arabic{section}} +\renewcommand{\thesubsection}{\arabic{subsection}} + +% Title page +\input{content/titlepage.tex} +% or simply +% \maketitle +\thispagestyle{empty} +\newpage +\setcounter{page}{1} % Don't count title page. +\setcounter{tocdepth}{2} +\tableofcontents +\newpage + +% Align exercise numbers with chapters +\setcounter{section}{3} + +\input{exercises/basic-document-structure/task} +\input{exercises/basic-document-structure/document-structure.done} + +\newpage +\input{exercises/project-structure/task} +\input{exercises/project-structure/tasks.done} + +\newpage +\input{exercises/special-characters/task} +\input{exercises/special-characters/special-characters.done} + +\newpage +\input{exercises/text-markup/task} +\input{exercises/text-markup/markup.done} + +\newpage +\input{exercises/lists/task} +\input{exercises/lists/lists.done} + +\newpage +\input{exercises/maths/task} +\input{exercises/maths/math-formulas.done} + +\newpage +\input{exercises/graphics/task} +\input{exercises/graphics/graphics.done} + +\newpage +\input{exercises/tables/task} +\input{exercises/tables/tables.done} + +\newpage +\input{exercises/source-code-listings/task} +\input{exercises/source-code-listings/source-code-listings.done} + +\newpage +\input{exercises/footnotes/task} +\input{exercises/footnotes/footnotes.done} + +\newpage +\input{exercises/references/task} +\input{exercises/references/references.done} + +\newpage +\input{exercises/literature/task} +\input{exercises/literature/literature.done} + +\end{document} diff --git a/main_exercises.tex b/main_exercises.tex deleted file mode 100644 index 885e7a1..0000000 --- a/main_exercises.tex +++ /dev/null @@ -1,57 +0,0 @@ -\input{setup.tex} % Setup -\input{praeamble.tex} % Preamble -\input{commands.tex} % Custom commands - -\title{Script for the Fachschaft \acro{WIAI} \LaTeX{} Workshop} -\author{Evelyn Fradtschuk \and Florian Knoch \and Christian Kremitzl \and Bernhard Luedtke} - -% Custom headline prefix -\renewcommand*\thesection{Exercise #1\@arabic\c@section} - -\begin{document} -\selectlanguage{english} -\frenchspacing - -% Title page -\input{content/titlepage.tex} -% or simply -% \maketitle -\thispagestyle{empty} -\newpage -\setcounter{page}{1} % Don't count title page. -\setcounter{tocdepth}{2} -\tableofcontents -\newpage - -\input{content/first-steps-with-latex.tex} -\input{content/why-use-latex.tex} -\input{content/basic-functionality.tex} - -% Align exercise numbers with chapters -\setcounter{section}{3} - -\input{content/basic-document-structure.tex} -\exercise{basic-document-structure} -\input{content/project-structure.tex} -\exercise{project-structure} -\input{content/special-characters.tex} -\exercise{special-characters} -\input{content/text-markup.tex} -\exercise{text-markup} -\input{content/lists.tex} -\exercise{lists} -\input{content/maths.tex} -\exercise{maths} -\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/literature.tex} -\exercise{literature} -\input{content/prospects.tex} - -\end{document}