diff options
Diffstat (limited to 'exercisesheets.tex')
| -rw-r--r-- | exercisesheets.tex | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/exercisesheets.tex b/exercisesheets.tex index 688482d..ea02e92 100644 --- a/exercisesheets.tex +++ b/exercisesheets.tex @@ -39,7 +39,7 @@ breakatwhitespace, columns=flexible, escapeinside={(*}{*)}, - mathescape, + mathescape=false, } \usepackage[pdfusetitle,colorlinks]{hyperref} @@ -53,7 +53,7 @@ \usepackage[english,iso]{isodate} \title{The \exsh Package} \author{Sebastian Kuhnert\and Frank Fuhlbrück} -\date{Version 0.10, \printdateTeX{2022/01/12}} +\date{Version 0.11, \printdateTeX{2022/02/11}} \begin{document} \maketitle @@ -110,6 +110,7 @@ Frank Fuhlbrück \item \texttt{ifthen} \item \texttt{amsmath} (for \verb|\numberwithin|) \item \texttt{iflualatex} + \item \texttt{refcount} (for \verb|\getrefnumber|) \end{itemize} @@ -480,6 +481,35 @@ if sub-exercises are not simply \verb|\item|s in \end{exercise} \end{lstlisting} +\subsection{Labels and References within an Exercise} +While the global reference labels set via varioref (if loaded) +are nice for references to subexercises far away, always mentioning +the exercise number seems superfluous. Furthermore, for usage in indices etc. you might want to use the arabic representation instead. This is what the commands \verb|\subexnref| and +\verb|\subexlref| are designed for. However, both of them still +require an ordinary label, which is not allowed in +exercises loaded with \verb|\loadexercise*|. +For this purpose \verb|\locallabel| can be used which is just a +normal label that is not redefined to produce an error. +Furthermore, we define a counter \verb|subex| (which is +currently just an alias for enumi, but this might change). You can +use this counter (alias) with common commands like +\verb|\arabic| or \verb|\alph|. + +\begin{lstlisting} +\begin{exercise} + \begin{enumerate} + \item \locallabel{subex:xisseven} Let $x_{\thesubex}=7$. + \item Compute $x_{\subexnref{subex:xisseven}}+3$. + \begin{solution} + From \subexlref{subex:xisseven} %(a) + we know that $x_{\subexnref{subex:xisseven}}$ is $7$ and + thus the sum is $10$. + \end{solution} + \end{enumerate} +\end{exercise} +\end{lstlisting} + + \section{Advanced Usage} @@ -735,7 +765,7 @@ Since version 0.11 there is a Lua interface for the exercise environment. This interface will offer roughly the same features. Its main purpose will be allowing to reorder sub-exercises more easily and to offer more dynamic options for the display of -solutions (one combined solution or single after each sub- +solutions (one combined solution or single after each sub-% exercise). %TODO finish \begin{lstlisting} @@ -775,6 +805,24 @@ with solutions. This also works well in combination with a make file that generates \texttt{solutions.tex}. + + +\section{Changelog} +\label{sec:changelog} + +\begin{itemize} + \item[v. 0.11:] 2022-02-11 + \begin{itemize} + \item Local references and the subex counter + \item Lua interface (not documented yet, see example and example file) + \item Framed solutions can now be fragile, however this + also require Lua\LaTeX (but not using the Lua Interface). + \item beamer version is now included (no separate package) + \item some bug fixes + \end{itemize} +\end{itemize} + + \end{document} %%% Local Variables: |
