From 68b43dcc5a895cb883ef05f7512c7063bf190d1f Mon Sep 17 00:00:00 2001 From: Christian Kremitzl Date: Thu, 16 Jun 2022 15:48:05 +0200 Subject: [PATCH] revise special characters exercise. --- commands.tex | 28 +++++++++++-------- .../special-characters.code.tex | 12 ++++---- .../special-characters.raw.tex | 13 +++++---- exercises/special-characters/task.tex | 9 ++---- 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/commands.tex b/commands.tex index 66f255b..d493c12 100644 --- a/commands.tex +++ b/commands.tex @@ -276,33 +276,37 @@ % Exercise Material % ================= -% Takes a project-relative path, and inserts matching exercise material and/or solutions, depending on the exercise mode. -\newcommand\exercisematerial[1]{ +% Takes a project-relative path, and inserts matching exercise material and/or solutions, depending on the exercise mode. The column width can be configured by an optional second argument +\newcommand{\exercisematerial}[2][]{ % Mode 'exercises': raw material only \ifthenelse{\equal{\exercisemode}{exercises}}{ - \IfFileExists{#1.raw.tex}{ - \input{#1.raw.tex} + \IfFileExists{#2.raw.tex}{ + \begin{minipage}{#1\linewidth} + \input{#2.raw.tex} + \end{minipage} }{} }{} % Mode 'solutions': completed material only \ifthenelse{\equal{\exercisemode}{solutions}}{ - \IfFileExists{#1.done.tex}{ - \input{#1.done.tex} + \IfFileExists{#2.done.tex}{ + \input{#2.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}{ + \IfFileExists{#2.raw.tex}{ + \IfFileExists{#2.done.tex}{ \subsubsection*{Preview of the raw material} }{} - \input{#1.raw.tex} + \begin{minipage}{#1\linewidth} + \input{#2.raw.tex} + \end{minipage} }{} - \IfFileExists{#1.done.tex}{ - \IfFileExists{#1.raw.tex}{ + \IfFileExists{#2.done.tex}{ + \IfFileExists{#2.raw.tex}{ \subsubsection*{Preview of the solution} }{} - \input{#1.done.tex} + \input{#2.done.tex} }{} }{} } diff --git a/exercises/special-characters/special-characters.code.tex b/exercises/special-characters/special-characters.code.tex index 4367c49..775f35b 100644 --- a/exercises/special-characters/special-characters.code.tex +++ b/exercises/special-characters/special-characters.code.tex @@ -1,7 +1,7 @@ What is a semester ticket? -It is also known as \enquote{Studi-Ticket} or \enquote{Studi-Karte} and allows you to use the local public transport around Bamberg for free. -In Bamberg, your student card (Studierenden\-ausweis) is used, i.\,a., as a semester ticket. -To be able to use it, you should validate the student card in one of the university buildings. -This is possible after you have paid the semester fees (101,50\,\euro). -A validation printers are located in multiple university buildings, e.\,g., in the foyer of the Erba building, in front of the library. -This building is opened Monday\,--\,Friday, 7am\,--\,10pm. \ No newline at end of file +It is also known as Studi-Ticket or Studi-Karte in German and allows you to use the local public transport around Bamberg for free. +In Bamberg, the semester ticked is embodied in your student card (Studierenden\-ausweis). +To be able to use it, you have to validate the student card in one of the university buildings. +This is possible after you have paid the semester fees. +Validation printers are located in multiple university buildings, e.\,g., in the foyer of the Erba building, in front of the library. +This building is opened Monday\,--\,Friday, 7am\,--\,10pm. diff --git a/exercises/special-characters/special-characters.raw.tex b/exercises/special-characters/special-characters.raw.tex index cb59ce6..0bf87b4 100644 --- a/exercises/special-characters/special-characters.raw.tex +++ b/exercises/special-characters/special-characters.raw.tex @@ -1,7 +1,8 @@ What is a semester ticket? -It is also known as Studi-Ticket or Studi-Karte and allows you to use the local public transport around Bamberg for free. -In Bamberg, your student card (Studierendenausweis) is used, i. a., as a semester ticket. -To be able to use it, you should validate the student card in one of the university buildings. -This is possible after you have paid the semester fees (101,50 EUR). -A validation printers are located in multiple university buildings, e. g., in the foyer of the Erba building, in front of the library. -This building is opened Monday - Friday, 7am - 10pm. +It is also known as Studi-Ticket or Studi-Karte in German and allows you to use the local public transport around Bamberg for free. +In Bamberg, the semester ticked is embodied in your student card (Studierendenausweis). +To be able to use it, you have to validate the student card in one of the university buildings. +This is possible after you have paid the semester fees. +Validation printers are located in multiple university buildings, e. g., in the foyer of the Erba building, in front of the library. +This building is opened Monday-Friday, 7am-10pm. + diff --git a/exercises/special-characters/task.tex b/exercises/special-characters/task.tex index 9506e6f..91652da 100644 --- a/exercises/special-characters/task.tex +++ b/exercises/special-characters/task.tex @@ -5,13 +5,10 @@ compile the \file{main.tex} file. This applies for the subsequent tasks, as well. \begin{enumerate} - \item In the text, you find a bunch of abbreviations. Replace the spaces within the abbreviations by thin spaces. Put a thin space in front of the word \emph{EUR}. - \item Replace the hyphens within the Erba opening hours by en dashes. + \item Replace the spaces in exercises/special-characters.tex within the abbreviations (\enquote{e. g.}) by thin spaces. + \item Replace the hyphens separating the opening hours by en dashes (--), optionally surrounded by thin spaces. \item Restrict the hyphenation of word \emph{Studierendenausweis} to one position: \\\emph{Studierenden-ausweis}. - \item Add quotation marks around the words \emph{Studi-Ticket} and - \emph{Studi-Karte} using the \code{latex}{\textbackslash enquote} command. - \item Replace the word \emph{EUR} by a Euro symbol (hence the thin space). \end{enumerate} -\exercisematerial{exercises/special-characters/special-characters} +\exercisematerial[.63]{exercises/special-characters/special-characters}