Remove exercise command

This commit is contained in:
Knoch 2023-01-13 16:35:09 +01:00
parent e4e731f044
commit 3c699d5dd0
15 changed files with 37 additions and 49 deletions

2
.gitignore vendored
View File

@ -79,7 +79,7 @@ _minted*
*.swp
*.swo
main.pdf
main_*.pdf
listings-mode.tex
exercise-mode.tex
public

View File

@ -241,39 +241,6 @@
\end{figure}
}
% Exercise mode
% =============
% The exercise mode can be chosen by writing one of the following to the exercise-mode.tex file before compilation:
% \newcommand\exercisemode{none} % for a blank script without exercises
% \newcommand\exercisemode{exercises} % for a script with exercises only
% \newcommand\exercisemode{solutions} % for a script with solutions only
% \newcommand\exercisemode{any} % for a script containing all available material
% The following lines include that file or make \exercisemode default to 'any' so that any derivatives of this project will work even without the file.
\IfFileExists{exercise-mode.tex}{
\input{exercise-mode.tex}
}{
\newcommand\exercisemode{any}
}
% Exercises
% =========
% Includes the task.tex file within the given subfolder of exercises and adds a heading.
\newcommand\exercise[1]{
\ifthenelse{\equal{\exercisemode}{none}}{
% Exercises disabled.
}{
\newpage
\definecolor{latexblue}{rgb}{0.9,0.925,0.95}
\pagecolor{latexblue}
%\definecolor{latexblue}{rgb}{0.73,0.84,0.92}
\section*{Exercise \thechapter}
\addcontentsline{toc}{section}{Exercise}%
\input{exercises/#1/task.tex}
\newpage
\nopagecolor
}
}
% Exercise Material
% =================
% Takes a project-relative path, and inserts matching exercise material and/or solutions, depending on the exercise mode.

View File

@ -1,3 +1,5 @@
\section{Structure your document and text}
\begin{enumerate}
\item In the directory \file{exercises/basic-document-structure}, you can find a file named \file{document-structure.tex}. Wrap the text of the file in a \code{latex}{document} environment and add the following preamble. Afterwards, compile the document.
\codeblock{latex}{./exercises/basic-document-structure/preamble.code.tex}

View File

@ -1,4 +1,7 @@
\section*{Exercise \thechapter .1}
\section{Footnotes and references}
\subsection{Inserting footnotes}
Make the text \enquote{March 2021} of the file
\file{exercises/footnotes/footnotes.tex} appear as a footnote instead of in
parentheses. Additionally, insert a clickable URL to the Java Development Kit
@ -8,7 +11,9 @@ as footnote.
\exercisematerial{exercises/footnotes/footnotes}
\section*{Exercise \thechapter .2}
\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
@ -17,4 +22,4 @@ 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}
\exercisematerial{exercises/references/references}

View File

@ -1,3 +1,5 @@
\section{Inserting graphics}
In the \file{exercises/graphics} directory you can find an image file
\file{latex-logo.png}. Insert the image into the
\file{exercises/graphics/graphics.tex} file. Make sure that the image is placed

View File

@ -1,3 +1,5 @@
\section{Adding enumerations}
Format the recipe you can find in \file{exercises/lists/lists.tex} as an
unordered list (\code{latex}{itemize}) with sub-lists \emph{Ingredients}
and \emph{Instructions}.

View File

@ -1,3 +1,5 @@
\section{Creating and inserting references}
\begin{enumerate}
\item Create a new Bib\TeX{} file called \file{literature.bib} in the \file{exercises/literature} folder.
\item Use Google Scholar or \url{dblp.org} to retrieve Bib\TeX{} entries for the following \LaTeX{}

View File

@ -1,3 +1,5 @@
\section{Typesetting mathematics}
Use \LaTeX{} math mode to typeset the following formulas.
Pay attention to the size of brackets.

View File

@ -1,3 +1,5 @@
\section{A structured project}
Within the directory \file{exercises/project-structure} you can find the file
\file{main.tex}.

View File

@ -1,3 +1,5 @@
\section{Listings}
In the folder \file{exercises/source-code-listings}, you will find a file called \file{Source.java}.
We will now include it into our document and adjust its display to fit our needs.
If you have questions, consult the \pkg{minted} or \pkg{listings} package documentation.

View File

@ -1,4 +1,6 @@
% breakanywhere doesn't seem to work.
\section{Insert special characters}
\todo{Adjust to new page layout.}
For this task, we are using the file \file{exercises/special-characters.tex}.
To be able to see your results here within the script,
compile the \file{main.tex} file.

View File

@ -1,3 +1,5 @@
\section{Typesetting tables}
The following list shows some key data about a few courses of the \acro{WIAI} faculty.
However, the overview is not as clear as it could be.
To improve it, convert the list into a table with columns for \emph{name}, \emph{abbreviation} and \emph{term}.

View File

@ -1,3 +1,5 @@
\section{Emphasising text}
\begin{enumerate}
\item In \file{exercies/text-markup/markup.tex}, emphasize the words
``recursion'' and ``recursive.''

View File

@ -5,6 +5,9 @@
\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
@ -23,6 +26,10 @@
\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}

View File

@ -24,27 +24,16 @@
\input{content/why-use-latex.tex}
\input{content/basic-functionality.tex}
\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}