| 1 |
%% |
| 2 |
%% This is file `exframe.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% exframe.dtx (with options: `manual') |
| 8 |
%% |
| 9 |
%% Copyright (C) 2011-2026 Niklas Beisert |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% https://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 17 |
%% version 2008 or later. |
| 18 |
%% |
| 19 |
\ProvidesFile{exframe.tex}[2026-03-23 v3.5.3 exframe reference manual] |
| 20 |
\def\thepkg/{exframe}\def\thedate/{2026-03-23}\def\theversion/{v3.5.3} |
| 21 |
\def\thecopyright/{2011\texorpdfstring{--}{-}2026 Niklas Beisert} |
| 22 |
\PassOptionsToClass{10pt,a4paper}{article} |
| 23 |
\documentclass{ltxdoc} |
| 24 |
|
| 25 |
\usepackage[margin=35mm]{geometry} |
| 26 |
\usepackage[hyperindex=false]{hyperref} |
| 27 |
\usepackage{hyperxmp} |
| 28 |
\usepackage[usenames]{color} |
| 29 |
\usepackage{longtable} |
| 30 |
|
| 31 |
\title{The \markpkg{\thepkg/} Package\\Reference Manual} |
| 32 |
\hypersetup{pdftitle={The \thepkg/ Package -- Reference Manual}} |
| 33 |
\hypersetup{pdfsubject={Reference Manual for the LaTeX2e Package \thepkg/}} |
| 34 |
\author{Niklas Beisert\\[2ex] |
| 35 |
Institut f\"ur Theoretische Physik\\ |
| 36 |
Eidgen\"ossische Technische Hochschule Z\"urich\\ |
| 37 |
Wolfgang-Pauli-Strasse 27, 8093 Z\"urich, Switzerland\\[1ex] |
| 38 |
\href{mailto:[email protected]} |
| 39 |
{\texttt{[email protected]}}} |
| 40 |
\hypersetup{pdfauthor={Niklas Beisert}} |
| 41 |
\date{\theversion/: \markdate{\thedate/}\\[1ex] |
| 42 |
\url{https://ctan.org/pkg/\thepkg/}\\[0.5ex] |
| 43 |
\url{https://github.com/nbeisert/latex-pkg-nb}} |
| 44 |
|
| 45 |
\hypersetup{pdflang={en-UK}} |
| 46 |
\hypersetup{pdfurl={https://ctan.org/pkg/\thepkg/}} |
| 47 |
\hypersetup{pdfcopyright={Copyright \thecopyright/. |
| 48 |
This work may be distributed and/or modified under the |
| 49 |
conditions of the LaTeX Project Public License, either version 1.3 |
| 50 |
of this license or (at your option) any later version.}} |
| 51 |
\hypersetup{pdflicenseurl={https://www.latex-project.org/lppl.txt}} |
| 52 |
\hypersetup{pdfcontactaddress={ETH Zurich, ITP, HIT K, |
| 53 |
Wolfgang-Pauli-Strasse 27}} |
| 54 |
\hypersetup{pdfcontactpostcode={8093}} |
| 55 |
\hypersetup{pdfcontactcity={Zurich}} |
| 56 |
\hypersetup{pdfcontactcountry={Switzerland}} |
| 57 |
\hypersetup{pdfcontactemail={[email protected]}} |
| 58 |
\hypersetup{pdfcontacturl={https://people.phys.ethz.ch/\xmptilde nbeisert/}} |
| 59 |
|
| 60 |
\hypersetup{keeppdfinfo=true} |
| 61 |
\hypersetup{pdfsource={}} |
| 62 |
\AddToHook{begindocument/before}{\hypersetup{colorlinks=false}} |
| 63 |
\hypersetup{urlbordercolor={.5 1 1}} |
| 64 |
\hypersetup{linkbordercolor={1 .7 .7}} |
| 65 |
\AddToHook{begindocument/before}{\hypersetup{pdfstartview=FitH}} |
| 66 |
|
| 67 |
\parskip1ex |
| 68 |
\parindent0pt |
| 69 |
\edef\itemize{\unexpanded\expandafter{\itemize}\parskip0pt} |
| 70 |
|
| 71 |
\newcommand{\markpkg}[1]{\textsf{#1}} |
| 72 |
\newcommand{\markdate}[1]{\textsf{#1}} |
| 73 |
\newcommand{\secref}[1]{\hyperref[#1]{section \ref*{#1}}} |
| 74 |
\newcommand{\ctanref}[2]{\href{https://ctan.org/#1}{#2}} |
| 75 |
\newcommand{\ctanpkg}[1]{\ctanref{pkg/#1}{\markpkg{#1}}} |
| 76 |
|
| 77 |
\def\verbbar{\texttt{\char"7C}} |
| 78 |
\def\verbpkg{\texttt{\thepkg/}} |
| 79 |
\def\thepkgctan/{\ctanpkg{\thepkg/}} |
| 80 |
|
| 81 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 82 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 83 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 84 |
\begin{document} |
| 85 |
|
| 86 |
\maketitle |
| 87 |
|
| 88 |
\begin{abstract}\noindent |
| 89 |
\markpkg{exframe} is a \LaTeXe{} package |
| 90 |
which provides a general purpose framework to describe and typeset |
| 91 |
exercises and exam questions along with their solutions. |
| 92 |
The package features mechanisms |
| 93 |
to hide or postpone solutions, |
| 94 |
to assign and handle points, |
| 95 |
to collect problems on exercise sheets, |
| 96 |
to store and use metadata |
| 97 |
and to implement a consistent numbering. |
| 98 |
It also provides a very flexible interface for configuring and customising |
| 99 |
the formatting, layout and representation of the exercise content. |
| 100 |
\end{abstract} |
| 101 |
|
| 102 |
\begingroup |
| 103 |
\parskip0ex |
| 104 |
\tableofcontents |
| 105 |
\endgroup |
| 106 |
|
| 107 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 108 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 109 |
\section{Introduction} |
| 110 |
|
| 111 |
This package provides a framework to describe and typeset |
| 112 |
exercises (homework problems, classroom exercises, quizzes, exam questions, |
| 113 |
exercise questions in books and lecture notes, \ldots) |
| 114 |
and their solutions or answers. |
| 115 |
The aim of this package is to set up a few \LaTeX{} environments |
| 116 |
into which questions and corresponding answers can be filled conveniently. |
| 117 |
The main task of the package is to manage the text and data |
| 118 |
that are provided in the source document, |
| 119 |
perform some common operations on them, |
| 120 |
and then output the content appropriately. |
| 121 |
The package has the following goals, tasks and features: |
| 122 |
\begin{itemize} |
| 123 |
\item |
| 124 |
The package is designed with generality in mind. |
| 125 |
It is meant to be usable in many different situations. |
| 126 |
The primary target is science and education, but it may well |
| 127 |
be useful in other areas. |
| 128 |
|
| 129 |
\item |
| 130 |
The package defines a basic functional layout for the output |
| 131 |
and provides many options to reshape the layout and formatting |
| 132 |
according to the author's needs and wishes. |
| 133 |
|
| 134 |
\item |
| 135 |
The package can handle two layers of exercises: |
| 136 |
main problems and subproblems. |
| 137 |
The use of subproblems is optional. |
| 138 |
|
| 139 |
\item |
| 140 |
The display of solutions can be configured: |
| 141 |
Solutions can be hidden for a hand-out version of exercise sheets. |
| 142 |
When displayed, they may appear immediately, |
| 143 |
collectively after the problem, |
| 144 |
at the end of each sheet or at some manually defined location. |
| 145 |
|
| 146 |
\item |
| 147 |
The package can handle exercise sheets which combine several exercise problems: |
| 148 |
A \LaTeX{} document can consist of an individual sheet |
| 149 |
or of a collection of sheets (e.g.\ spanning a lecture course). |
| 150 |
In the latter case, the document files can be set up |
| 151 |
such that single sheets as well as a collection of all sheets can be compiled; |
| 152 |
the package \ctanpkg{childdoc} may be of assistance. |
| 153 |
|
| 154 |
\item |
| 155 |
The package can handle points to be credited: |
| 156 |
Points will be displayed according to the layout. |
| 157 |
Overall points for a problem or a sheet can be added automatically. |
| 158 |
Points can also be stored and used elsewhere. |
| 159 |
|
| 160 |
\item |
| 161 |
The package provides an interface to specify exercise metadata |
| 162 |
(author, source, \ldots): |
| 163 |
Some basic types of metadata are predefined and more specific metadata |
| 164 |
categories can be added. |
| 165 |
|
| 166 |
\item |
| 167 |
The package can use alternative counters for equations |
| 168 |
within solutions (and problems). This is to ensure a consistent |
| 169 |
numbering independently of whether solutions are output or not. |
| 170 |
|
| 171 |
\end{itemize} |
| 172 |
|
| 173 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 174 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 175 |
\section{Usage} |
| 176 |
\label{sec:usage} |
| 177 |
|
| 178 |
To use the package \ctanpkg{exframe} add the command |
| 179 |
\begin{center} |
| 180 |
|\usepackage{exframe}| |
| 181 |
\end{center} |
| 182 |
to the preamble of the \LaTeX{} document. |
| 183 |
|
| 184 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 185 |
\subsection{Exercise Environments} |
| 186 |
\label{sec:environments} |
| 187 |
|
| 188 |
The package provides four environments |
| 189 |
to describe the main entities of exercise problems. |
| 190 |
Additional information on the exercises can be provided |
| 191 |
in the optional arguments to these environments |
| 192 |
which will be discussed in the following sections. |
| 193 |
Furthermore, a limited set of commands |
| 194 |
is provided for control and extra features, |
| 195 |
see the sections below for details. |
| 196 |
|
| 197 |
\DescribeEnv{problem} |
| 198 |
The |problem| environment describes |
| 199 |
an exercise problem: |
| 200 |
\begin{center} |
| 201 |
\begin{tabular}{l} |
| 202 |
|\begin{problem}[|\textit{opts}|]|\\ |
| 203 |
| |\textit{problem text and subproblems}\\ |
| 204 |
|\end{problem}| |
| 205 |
\end{tabular} |
| 206 |
\end{center} |
| 207 |
As one of the many available options \textit{opts}, |
| 208 |
one can provide a title for the exercise by |
| 209 |
specifying |title={|\textit{title}|}|. |
| 210 |
If no title is given, the problem number will be displayed instead. |
| 211 |
See \secref{sec:metadata} and \secref{sec:points} |
| 212 |
for a description of the available options. |
| 213 |
|
| 214 |
\DescribeEnv{subproblem} |
| 215 |
The |subproblem| environment describes |
| 216 |
a subproblem, part or an individual question of an exercise problem: |
| 217 |
\begin{center} |
| 218 |
\begin{tabular}{l} |
| 219 |
|\begin{subproblem}[|\textit{opts}|]|\\ |
| 220 |
| |\textit{subproblem text}\\ |
| 221 |
|\end{subproblem}| |
| 222 |
\end{tabular} |
| 223 |
\end{center} |
| 224 |
A |subproblem| environment must be contained within a |problem| environment |
| 225 |
(however, a |problem| block need not contain |subproblem| blocks). |
| 226 |
|
| 227 |
\DescribeEnv{solution} |
| 228 |
The |solution| environment describes |
| 229 |
the solution to a problem or a subproblem: |
| 230 |
\begin{center} |
| 231 |
\begin{tabular}{l} |
| 232 |
|\begin{solution}[|\textit{opts}|]|\\ |
| 233 |
| |\textit{solution text}\\ |
| 234 |
|\end{solution}| |
| 235 |
\end{tabular} |
| 236 |
\end{center} |
| 237 |
A |solution| environment should be |
| 238 |
at the end of a |subproblem| or |problem| environment |
| 239 |
(it is not mandatory to provide a |solution|). |
| 240 |
It can be contained within the corresponding environment or it can follow it |
| 241 |
(where needed, the option |forproblem| associates a |solution| |
| 242 |
following a |subproblem| to the encompassing |problem| |
| 243 |
rather than the preceding |subproblem|). |
| 244 |
Depending on the choice of solution display, see \secref{sec:solutions}, |
| 245 |
the output may have a slightly different layout. |
| 246 |
In terms of logic, it is preferred |
| 247 |
to define a solution \emph{within} the corresponding environment; |
| 248 |
this may also have some technical advantages and produce |
| 249 |
a slightly better result in terms of layout. |
| 250 |
|
| 251 |
\DescribeEnv{sheet} |
| 252 |
The |sheet| environment describes an exercise sheet: |
| 253 |
\begin{center} |
| 254 |
\begin{tabular}{l} |
| 255 |
|\begin{sheet}[|\textit{opts}|]|\\ |
| 256 |
| |\textit{sheet text and problems}\\ |
| 257 |
|\end{sheet}| |
| 258 |
\end{tabular} |
| 259 |
\end{center} |
| 260 |
A sheet typically contains one or several problems |
| 261 |
(it is not mandatory to group problems into a |sheet|). |
| 262 |
There may or may not be additional auxiliary text introducing the problems. |
| 263 |
A header will be added to the sheet according to the specified layout. |
| 264 |
|
| 265 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 266 |
\subsection{Solution and Problem Display} |
| 267 |
\label{sec:solutions} |
| 268 |
|
| 269 |
There are several options to control the output of solutions |
| 270 |
and of problems. |
| 271 |
|
| 272 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 273 |
\DescribeMacro{solutions} |
| 274 |
Most importantly, the display of solutions |
| 275 |
can be disabled or enabled altogether: |
| 276 |
\begin{center} |
| 277 |
|\exercisesetup{solutions|[|=true|\textbar|false|]|}| |
| 278 |
\end{center} |
| 279 |
Solutions are hidden by default, |
| 280 |
and their display needs to be activated explicitly |
| 281 |
(it suffices to specify the option |solutions| without the value |true|). |
| 282 |
It is also possible to control the display |
| 283 |
by an analogous package option |solutions|, |
| 284 |
see \secref{sec:options} for further information. |
| 285 |
|
| 286 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 287 |
\DescribeMacro{\ifsolutions} |
| 288 |
\DescribeMacro{onlysolutions} |
| 289 |
The display of solutions is reflected by the conditional |\ifsolutions|. |
| 290 |
As the hiding of solutions is performed automatically, |
| 291 |
the conditional would typically be used to change some details, |
| 292 |
e.g.\ for adjusting titles: |
| 293 |
\begin{center} |
| 294 |
|\ifsolutions Solutions\||else Exercises\||fi| |
| 295 |
\end{center} |
| 296 |
Alternatively, content to be processed only in solutions mode |
| 297 |
can be enclosed in an |onlysolutions| block: |
| 298 |
\begin{center} |
| 299 |
\begin{tabular}{l} |
| 300 |
|\begin{onlysolutions}|\\ |
| 301 |
|...|\\ |
| 302 |
|\end{onlysolutions}| |
| 303 |
\end{tabular} |
| 304 |
\end{center} |
| 305 |
This structure can be useful to hide auxiliary text or material |
| 306 |
if all solution content is to be stripped from a source file, |
| 307 |
e.g.\ by an automated \textsf{sed} filter rule |
| 308 |
(doubling of backslashes required for \textsf{sed} |
| 309 |
as well as for shell script strings): |
| 310 |
\begin{center} |
| 311 |
\begin{tabular}{l} |
| 312 |
|sed "/\\\\begin{solution}/,/\\\\end{solution}/d;"\|\\ |
| 313 |
|"/\\\\begin{onlysolutions}/,/\\\\end{onlysolutions}/d"| |
| 314 |
\end{tabular} |
| 315 |
\end{center} |
| 316 |
|
| 317 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 318 |
\DescribeMacro{solutionequation} |
| 319 |
As solutions can contain numbered equations |
| 320 |
while the display of solutions can be switched on and off, |
| 321 |
it is important to assign a different counter for equations within solutions |
| 322 |
in order for the equation numbers to be stable. |
| 323 |
A separate counter for equations within solutions is enabled by default. |
| 324 |
It can be disabled by: |
| 325 |
\begin{center} |
| 326 |
|\exercisestyle{solutionequation=false}| |
| 327 |
\end{center} |
| 328 |
This option prepends the letter `S' to equation |
| 329 |
numbers within solutions which are counted separately; |
| 330 |
the display can be configured differently, see \secref{sec:layout}. |
| 331 |
|
| 332 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 333 |
\DescribeMacro{solutionbelow} |
| 334 |
\DescribeMacro{\insertsolutions} |
| 335 |
The package allows to collect solutions |
| 336 |
and defer their display to particular locations: |
| 337 |
\begin{center} |
| 338 |
|\exercisestyle{solutionbelow=|\textit{pos}|}| |
| 339 |
\end{center} |
| 340 |
The available choices for \textit{pos} are |
| 341 |
to display solutions where they are defined (|here|), |
| 342 |
defer them to the end of the current subproblem (|subproblem|), |
| 343 |
problem (|problem|) or sheet (|sheet|) |
| 344 |
or display them at a manually chosen location (|manual|). |
| 345 |
Note that typically solutions are defined at the end of a (sub)problem |
| 346 |
and therefore the choice |here| is similar to (|sub|)|problem|. |
| 347 |
The latter form, however, makes sure that a solution |
| 348 |
does not inherit the margin of the parent environment. |
| 349 |
The alternate modes |problem*| and |subproblem*| |
| 350 |
positions the solution \emph{after} the (sub)problem environment |
| 351 |
such that it does not inherit any layout, |
| 352 |
but also no definitions made in the parent environment. |
| 353 |
In |manual| mode, all solutions are collected (with appropriate headers) |
| 354 |
until they are output by the directive |\insertsolutions|. |
| 355 |
If no solutions are stored in the buffer |
| 356 |
(or if the mode is not |manual|), |\insertsolutions| has no effect. |
| 357 |
|
| 358 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 359 |
\DescribeMacro{\writesolutions} |
| 360 |
Another option to handle solutions is to write them to a file |
| 361 |
for later use. |
| 362 |
Writing to a file is initiated by: |
| 363 |
\begin{center} |
| 364 |
|\writesolutions[|\textit{filename}|]| |
| 365 |
\end{center} |
| 366 |
The optional argument describes the filename as \textit{filename}|.sol|; |
| 367 |
no argument defaults to the main tex filename as |\jobname.sol|; |
| 368 |
the extension |.sol| can be customised by the configuration |extsolutions|. |
| 369 |
This mode overrides the |solutionbelow| behaviour described above; |
| 370 |
all subsequent solutions are written to the file. |
| 371 |
The file is closed by |\closesolutions| and the display of solutions |
| 372 |
returns to manual mode. |
| 373 |
It is not necessary to close a file as it will be closed |
| 374 |
automatically by reading from a file, writing to another file |
| 375 |
or by the end of the document. |
| 376 |
|
| 377 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 378 |
\DescribeMacro{\readsolutions} |
| 379 |
Solutions are read from a file by: |
| 380 |
\begin{center} |
| 381 |
|\readsolutions[|\textit{filename}|]| |
| 382 |
\end{center} |
| 383 |
This command outputs a sectional title |
| 384 |
and reads the file via |\input{|\textit{filename}|.sol}|. |
| 385 |
|
| 386 |
\medskip |
| 387 |
|
| 388 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 389 |
\DescribeMacro{solutionbuf} |
| 390 |
\DescribeMacro{problembuf} |
| 391 |
\DescribeMacro{subproblembuf} |
| 392 |
The package offers similar functionality to control the display of problems. |
| 393 |
In order to have any control over the content of |problem| and |subproblem| |
| 394 |
environments, the latter need to be read into an internal buffer. |
| 395 |
Reading of solutions and problems to internal buffers is activated |
| 396 |
or deactivated by: |
| 397 |
\begin{center} |
| 398 |
\begin{tabular}{l} |
| 399 |
|\exercisesetup{solutionbuf|[|=true|\textbar|false|]|}|\\ |
| 400 |
|\exercisesetup{problembuf|[|=true|\textbar|false|]|}|\\ |
| 401 |
|\exercisesetup{subproblembuf|[|=true|\textbar|false|]|}| |
| 402 |
\end{tabular} |
| 403 |
\end{center} |
| 404 |
By default, |solution| environments are read to an internal buffer, |
| 405 |
while the content of [|sub|]|problem| environments is processed directly |
| 406 |
by the \TeX\ engine. |
| 407 |
Therefore, the below options to control the display |
| 408 |
of [|sub|]|problem| environments |
| 409 |
require the statement |\exercisesetup{|[|sub|]|problembuf}|. |
| 410 |
|
| 411 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 412 |
\DescribeMacro{problemmanual} |
| 413 |
\DescribeMacro{\insertproblems} |
| 414 |
The immediate display of |problem| environments is controlled by: |
| 415 |
\begin{center} |
| 416 |
|\exercisestyle{problemmanual|[|=true|\textbar|false|]|}| |
| 417 |
\end{center} |
| 418 |
In the default automatic mode, problems are displayed directly |
| 419 |
where they are declared. |
| 420 |
In manual mode, problems are collected to an internal buffer, |
| 421 |
and only displayed by issuing |\insertproblems|. |
| 422 |
|
| 423 |
Note that |solution| environments should be |
| 424 |
declared within the corresponding |problem| environment in order to |
| 425 |
preserve their appropriate association. |
| 426 |
The |solution| environment is then processed at the place |
| 427 |
where the |problem| environment is displayed, |
| 428 |
and it may (or may not) be deferred further. |
| 429 |
|
| 430 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 431 |
\DescribeMacro{\writeproblems} |
| 432 |
\DescribeMacro{\readproblems} |
| 433 |
Problems can be written out to an external file for later usage. |
| 434 |
The functionality is analogous to solutions |
| 435 |
and uses the macros: |
| 436 |
\begin{center} |
| 437 |
\begin{tabular}{l} |
| 438 |
|\writeproblems[|\textit{filename}|]|\\ |
| 439 |
|\readproblems[|\textit{filename}|]| |
| 440 |
\end{tabular} |
| 441 |
\end{center} |
| 442 |
The optional argument describes the filename as \textit{filename}|.prb|; |
| 443 |
no argument defaults to the main tex filename as |\jobname.prb|; |
| 444 |
the extension |.prb| can be customised by the configuration |extproblems|. |
| 445 |
|
| 446 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 447 |
\DescribeMacro{disable} |
| 448 |
\DescribeMacro{insertproblemselect} |
| 449 |
\DescribeMacro{insertsubproblemselect} |
| 450 |
The display of a particular [|sub|]|problem| |
| 451 |
can be suppressed altogether by an optional argument: |
| 452 |
\begin{center} |
| 453 |
|\begin{|[|sub|]|problem}[disable]| |
| 454 |
\end{center} |
| 455 |
|
| 456 |
This option can be exploited to automatically |
| 457 |
suppress certain classes of problems as follows: |
| 458 |
A hook function |insert|[|sub|]|problemselect| declared by: |
| 459 |
\begin{center} |
| 460 |
|\exerciseconfig{insert|[|sub|]|problemselect}[1]{|\textit{code}|}| |
| 461 |
\end{center} |
| 462 |
can call |
| 463 |
|\set|[|sub|]|problemdata{disable}| whenever a problem is to be suppressed. |
| 464 |
In order to decide, the optional argument of the [|sub|]|problem| environment |
| 465 |
is passed on to the hook function as the single argument. |
| 466 |
Note that the argument needs to be processed manually. |
| 467 |
|
| 468 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 469 |
\subsection{Metadata} |
| 470 |
\label{sec:metadata} |
| 471 |
|
| 472 |
In a collection of exercise problems |
| 473 |
it makes sense to keep track of metadata |
| 474 |
for the overall collection as well as for individual problems |
| 475 |
and potentially display some of them. |
| 476 |
The framework defines a standard set of metadata fields |
| 477 |
and offers functionality to add more specialised metadata fields. |
| 478 |
|
| 479 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 480 |
\DescribeMacro{\exercisedata} |
| 481 |
Global metadata is specified by the command: |
| 482 |
\begin{center} |
| 483 |
|\exercisedata{|\textit{data}|}| |
| 484 |
\end{center} |
| 485 |
The argument \textit{data} |
| 486 |
is a comma-separated list of metadata specifications |
| 487 |
in the form \textit{key}|={|\textit{value}|}|. |
| 488 |
The standard set of global metadata keys consists of: |
| 489 |
\begin{itemize} |
| 490 |
\item |author|: |
| 491 |
principal author(s) of the exercise collection; |
| 492 |
also invokes the \LaTeX{} command |\author|; |
| 493 |
will be written to pdf documents. |
| 494 |
\item |title|: |
| 495 |
title of the exercise collection; |
| 496 |
also invokes the \LaTeX{} command |\title|; |
| 497 |
will be written to pdf documents. |
| 498 |
\item |date|: |
| 499 |
date of the exercise collection; |
| 500 |
also invokes the \LaTeX{} command |\date|; |
| 501 |
will be written to pdf documents. |
| 502 |
\item |subject|: |
| 503 |
subject area of the exercise collection; |
| 504 |
will be written to pdf documents. |
| 505 |
\item |keyword|: |
| 506 |
keyword(s) for the exercise collection; |
| 507 |
will be written to pdf documents. |
| 508 |
\item |course|: |
| 509 |
title of the course (class, lecture, module, \ldots) |
| 510 |
for the exercise collection. |
| 511 |
\item |institution|: |
| 512 |
institution (school, department, institute, university, \ldots) |
| 513 |
offering the course or exercise collection. |
| 514 |
\item |instructor|: |
| 515 |
instructor(s) for the course or exercise; |
| 516 |
this field refers to person(s) who organise |
| 517 |
the corresponding course or exercises |
| 518 |
whereas |author| refers to the principal creator of the material. |
| 519 |
\item |period|: |
| 520 |
period (year, season, date, term identifier, \ldots) |
| 521 |
of the corresponding course. |
| 522 |
\item |material|: |
| 523 |
type of material |
| 524 |
(exercises, homework assignments, exam, quizzes, solutions, \ldots). |
| 525 |
\end{itemize} |
| 526 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 527 |
\DescribeMacro{\defexercisedata} |
| 528 |
Additional custom fields for global metadata can be created with: |
| 529 |
\begin{center} |
| 530 |
|\defexercisedata{|\textit{key}|}| |
| 531 |
\end{center} |
| 532 |
|
| 533 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 534 |
\DescribeMacro{\getexercisedata} |
| 535 |
\DescribeMacro{\exercisedataempty} |
| 536 |
Global metadata should typically be specified |
| 537 |
somewhere at the top of the main document, |
| 538 |
and it can be inserted wherever needed. |
| 539 |
There are two commands to read and process metadata. |
| 540 |
To insert the value of metadata field \textit{key} use: |
| 541 |
\begin{center} |
| 542 |
|\getexercisedata{|\textit{key}|}| |
| 543 |
\end{center} |
| 544 |
In some situations the output should depend on whether |
| 545 |
a metadata has been filled |
| 546 |
(e.g.\ to fill a default value or to display something else instead). |
| 547 |
This can be checked with the conditional: |
| 548 |
\begin{center} |
| 549 |
|\exercisedataempty{|\textit{key}|}|% |
| 550 |
|{|\textit{empty code}|}{|\textit{filled code}|}| |
| 551 |
\end{center} |
| 552 |
The \textit{empty code} is executed if no value |
| 553 |
or an empty value has been specified; |
| 554 |
otherwise the \textit{filled code} is executed. |
| 555 |
|
| 556 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 557 |
\DescribeMacro{sheet} |
| 558 |
\DescribeMacro{problem} |
| 559 |
The package offers a similar mechanism to describe and use metadata |
| 560 |
for sheets and problems: |
| 561 |
\begin{center} |
| 562 |
\begin{tabular}{l} |
| 563 |
|\begin{sheet}[|\textit{opts}|]|\\ |
| 564 |
|\begin{problem}[|\textit{opts}|]| |
| 565 |
\end{tabular} |
| 566 |
\end{center} |
| 567 |
The argument \textit{opt} |
| 568 |
is a comma-separated list which can contain metadata specifications |
| 569 |
in the form \textit{key}|={|\textit{value}|}|. |
| 570 |
The standard set of metadata keys for sheets consists of: |
| 571 |
\begin{itemize} |
| 572 |
\item |due|: |
| 573 |
indication of the due date for the exercise sheet. |
| 574 |
\item |handout|: |
| 575 |
indication of the handout date for the exercise sheet. |
| 576 |
\item |title|: |
| 577 |
specifies a title for the sheet; |
| 578 |
when reading value (see below), returns composed title; |
| 579 |
untitled sheets will be displayed by their number; |
| 580 |
title will be written to pdf documents. |
| 581 |
\item |rawtitle| (for reading only): |
| 582 |
contains the raw title as specified by |title|. |
| 583 |
\item |author|: |
| 584 |
author(s) of the sheet; |
| 585 |
will be written to pdf documents. |
| 586 |
\item |editor|: |
| 587 |
editor(s) of the sheet; this field refers to a person |
| 588 |
who makes adjustments to the sheet |
| 589 |
whereas |author| refers to the creator of the sheet. |
| 590 |
\item |editdate|: |
| 591 |
indication of the date when the sheet was last edited. |
| 592 |
\end{itemize} |
| 593 |
The standard set of metadata keys for problems consists of: |
| 594 |
\begin{itemize} |
| 595 |
\item |title|: |
| 596 |
specifies a title for the problem; |
| 597 |
when reading value (see below), returns composed title; |
| 598 |
untitled problems will be displayed by their number. |
| 599 |
\item |rawtitle| (for reading only): |
| 600 |
contains the raw title as specified by |title|. |
| 601 |
\end{itemize} |
| 602 |
|
| 603 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 604 |
\DescribeMacro{\defsheetdata} |
| 605 |
\DescribeMacro{\setsheetdata} |
| 606 |
\DescribeMacro{\getsheetdata} |
| 607 |
\DescribeMacro{\sheetdataempty} |
| 608 |
\DescribeMacro{\defproblemdata} |
| 609 |
\DescribeMacro{\setproblemdata} |
| 610 |
\DescribeMacro{\getproblemdata} |
| 611 |
\DescribeMacro{\problemdataempty} |
| 612 |
Metadata for sheets can be used in the same way as the global metadata. |
| 613 |
The following directives are analogous to |\defexercisedata|, |
| 614 |
|\exercisedata|, |\getexercisedata| and |\exercisedataempty|: |
| 615 |
\begin{center} |
| 616 |
\begin{tabular}{l} |
| 617 |
|\defsheetdata{|\textit{key}|}|\\ |
| 618 |
|\setsheetdata{|\textit{data}|}|\\ |
| 619 |
|\getsheetdata{|\textit{key}|}|\\ |
| 620 |
|\sheetdataempty{|\textit{key}|}|% |
| 621 |
|{|\textit{empty code}|}{|\textit{filled code}|}|\\[1ex] |
| 622 |
|\defproblemdata{|\textit{key}|}|\\ |
| 623 |
|\setproblemdata{|\textit{data}|}|\\ |
| 624 |
|\getproblemdata{|\textit{key}|}|\\ |
| 625 |
|\problemdataempty{|\textit{key}|}|% |
| 626 |
|{|\textit{empty code}|}{|\textit{filled code}|}| |
| 627 |
\end{tabular} |
| 628 |
\end{center} |
| 629 |
|
| 630 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 631 |
\DescribeMacro{pdfdata} |
| 632 |
\DescribeMacro{\writeexercisedata} |
| 633 |
The most relevant metadata can be written to |
| 634 |
the metadata section of pdf files |
| 635 |
(using pdf\LaTeX{} and the package \ctanpkg{hyperref} |
| 636 |
whenever loaded). |
| 637 |
This feature is configured by: |
| 638 |
\begin{center} |
| 639 |
|\exercisesetup{pdfdata|[|=auto|\textbar|manual|% |
| 640 |
\textbar|sheet|\textbar|off|]|}| |
| 641 |
\end{center} |
| 642 |
The option |auto| writes the global metadata |
| 643 |
|title|, |author|, |subject| and |keyword| |
| 644 |
to the corresponding fields in the pdf file. |
| 645 |
To make this work, these must be defined before the |
| 646 |
|\begin{document}| directive. |
| 647 |
The option |manual| allows to manually write these metadata |
| 648 |
by the command |\writeexercisedata|. |
| 649 |
It should be issued after the metadata have been set, |
| 650 |
but before any content is written to the pdf file. |
| 651 |
In other words, it can be anywhere in the document preamble |
| 652 |
directly after |\begin{document}|, |
| 653 |
or following a couple of content-free definitions at the beginning |
| 654 |
of the document body (in case the metadata should be set |
| 655 |
within the document body for some reason). |
| 656 |
The option |sheet| writes out the metadata |
| 657 |
at the beginning of the first |sheet| environment |
| 658 |
(which should follow |\begin{document}| without any content in between). |
| 659 |
This option is primarily for filling the |
| 660 |
|author| and |title| fields with metadata |
| 661 |
of a sheet rather than a collection of exercises. |
| 662 |
Note that if no |author| is defined for the sheet, |
| 663 |
the global metadata |author| is used. |
| 664 |
The option |off| disables all writing of metadata. |
| 665 |
|
| 666 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 667 |
\DescribeMacro{problem} |
| 668 |
\DescribeMacro{subproblem} |
| 669 |
\DescribeMacro{solution} |
| 670 |
There is an additional mechanism to keep track of metadata |
| 671 |
for problems, subproblems and solutions |
| 672 |
which can be displayed in the opening line of these entities. |
| 673 |
Displayed metadata serve two purposes: |
| 674 |
they are used to describe the quality of a problem |
| 675 |
or they are intended for internal documentation purposes. |
| 676 |
Their output can be controlled individually, |
| 677 |
e.g.\ only in development versions of a document. |
| 678 |
Note that specifying a key more than once |
| 679 |
will display the content multiple times |
| 680 |
in the order in which they are encountered. |
| 681 |
Displayed metadata are specified |
| 682 |
at the top of the corresponding environment: |
| 683 |
\begin{center} |
| 684 |
\begin{tabular}{l} |
| 685 |
|\begin{problem}[|\textit{opts}|]|\\ |
| 686 |
|\begin{subproblem}[|\textit{opts}|]|\\ |
| 687 |
|\begin{solution}[|\textit{opts}|]| |
| 688 |
\end{tabular} |
| 689 |
\end{center} |
| 690 |
|
| 691 |
The standard set of displayed metadata keys consists of: |
| 692 |
\begin{itemize} |
| 693 |
\item |author|: |
| 694 |
author(s) of the problem (or subproblem, solution). |
| 695 |
\item |editor|: |
| 696 |
editor(s) of the problem; this field refers to a person |
| 697 |
who has made adjustments to the problem |
| 698 |
whereas |author| refers to the creator of the problem. |
| 699 |
\item |source|: |
| 700 |
source of the problem; |
| 701 |
in case the problem has been taken from elsewhere |
| 702 |
(conceptually or literally). |
| 703 |
\item |difficulty|: |
| 704 |
indication of the level of difficulty of the problem. |
| 705 |
\item |keyword|: |
| 706 |
keyword(s) for the problem; |
| 707 |
\item |comment|: |
| 708 |
some comment on the problem. |
| 709 |
\item |optional| |
| 710 |
(display enabled by default): |
| 711 |
whether addressing the problem is mandatory or optional; |
| 712 |
by default the text will be displayed after the title |
| 713 |
in italic shape. |
| 714 |
\end{itemize} |
| 715 |
By default, only the |optional| items are displayed, |
| 716 |
all other types of items are hidden; |
| 717 |
controlling the display for each type of item is described below. |
| 718 |
|
| 719 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 720 |
\DescribeMacro{extdata} |
| 721 |
Further displayed metadata keys |
| 722 |
are defined by the package option |extdata|, see \secref{sec:options}: |
| 723 |
\begin{itemize} |
| 724 |
\item |review|: |
| 725 |
field to review the aspects of the problem |
| 726 |
(quality, length, appropriateness, difficulty, \ldots). |
| 727 |
\item |recycle|: |
| 728 |
indication of previous instances where this problem was used. |
| 729 |
\item |timesolve|: |
| 730 |
indication of the time needed to solve this problem (or subproblem). |
| 731 |
\item |timepresent|: |
| 732 |
indication of the time needed to present this problem |
| 733 |
(or subproblem, solution). |
| 734 |
\end{itemize} |
| 735 |
|
| 736 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 737 |
\DescribeMacro{\showprobleminfo} |
| 738 |
The display of the above metadata fields for a problem |
| 739 |
(or subproblem, solution) is controlled by: |
| 740 |
\begin{center} |
| 741 |
|\showprobleminfo{|\textit{keys}|}| |
| 742 |
\end{center} |
| 743 |
Here \textit{keys} is a comma-separated list of keys to |
| 744 |
be activated (\textit{key} or \textit{key}|=true|) |
| 745 |
or deactivated (\textit{key}|=false|). |
| 746 |
|
| 747 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 748 |
\DescribeMacro{\defprobleminfo} |
| 749 |
Displayable metadata can be defined or adjusted by: |
| 750 |
\begin{center} |
| 751 |
|\defprobleminfo{|\textit{key}|}{|\textit{code}|}| |
| 752 |
\end{center} |
| 753 |
Here \textit{key} specifies the metadata field and |
| 754 |
\textit{code} the code to display this type of metadata |
| 755 |
where the argument |#1| represents the data to be displayed. |
| 756 |
|
| 757 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 758 |
\DescribeMacro{insertprobleminfo} |
| 759 |
\DescribeMacro{insertsubprobleminfo} |
| 760 |
\DescribeMacro{insertsolutioninfo} |
| 761 |
\DescribeMacro{\addprobleminfo} |
| 762 |
\DescribeMacro{\addprobleminfo*} |
| 763 |
Additional information can be injected into the opening line |
| 764 |
of problems and solutions by the definitions: |
| 765 |
\begin{center} |
| 766 |
\begin{tabular}{l} |
| 767 |
|\exerciseconfig{insertprobleminfo}{|\textit{code}|}|\\ |
| 768 |
|\exerciseconfig{insertsubprobleminfo}{|\textit{code}|}|\\ |
| 769 |
|\exerciseconfig{insertsolutioninfo}{|\textit{code}|}| |
| 770 |
\end{tabular} |
| 771 |
\end{center} |
| 772 |
The hook code \textit{code} will be called after processing |
| 773 |
the environment arguments. Information can be added to the opening line by: |
| 774 |
\begin{center} |
| 775 |
\begin{tabular}{l} |
| 776 |
|\addprobleminfo{|\textit{info}|}|\\ |
| 777 |
|\addprobleminfo*{|\textit{info}|}| |
| 778 |
\end{tabular} |
| 779 |
\end{center} |
| 780 |
The unstarred command adds information at the end of the opening line, |
| 781 |
the starred version at the beginning (but after the title or identifier). |
| 782 |
|
| 783 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 784 |
\subsection{Points} |
| 785 |
\label{sec:points} |
| 786 |
|
| 787 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 788 |
\DescribeMacro{points} |
| 789 |
Exercise problems or certain parts of them |
| 790 |
can be credited with points (credits, awards, \ldots). |
| 791 |
The package provides an interface to specify and manage such points. |
| 792 |
Points are declared by the option |points=|\textit{points} |
| 793 |
for the environments |sheet|, |problem| and |subproblem|. |
| 794 |
These numbers will be printed to the opening line of |
| 795 |
problems and subproblems. |
| 796 |
|
| 797 |
Note that the points should normally be integer numbers. |
| 798 |
Fractional points are permissible as well, |
| 799 |
but the internal storage by the \TeX{} engine is somewhat limited, |
| 800 |
so that only fractions with powers of two as denominators |
| 801 |
(.5, multiples of .25, .125, .0625, \ldots) are reliable. |
| 802 |
More general fractional decimal numbers such as multiples of 0.2 |
| 803 |
will be subject to rounding errors and will not display nicely. |
| 804 |
|
| 805 |
Bonus points can be specified in the format |
| 806 |
|points=|[\textit{regular}][|+|\textit{bonus}]. |
| 807 |
By default, such points will be printed as |
| 808 |
[\textit{regular}][|+|\textit{bonus}] where 0 components are omitted. |
| 809 |
|
| 810 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 811 |
\DescribeMacro{problempointsat} |
| 812 |
\DescribeMacro{subproblempointsat} |
| 813 |
\DescribeMacro{solutionpointsat} |
| 814 |
The location where points of problems and subproblems |
| 815 |
shall be displayed can be adjusted individually by: |
| 816 |
\begin{center} |
| 817 |
\begin{tabular}{l} |
| 818 |
|\exercisestyle{problempointsat=start|\textbar|start*|\textbar|margin|% |
| 819 |
\textbar|end|\textbar|manual|\textbar|off}|\\ |
| 820 |
|\exercisestyle{subproblempointsat=start|\textbar|start*|\textbar|margin|% |
| 821 |
\textbar|end|\textbar|manual|\textbar|off}|\\ |
| 822 |
|\exercisestyle{solutionpointsat=start|\textbar|start*|\textbar|margin|% |
| 823 |
\textbar|end|\textbar|manual|\textbar|off}| |
| 824 |
\end{tabular} |
| 825 |
\end{center} |
| 826 |
The default values are |start| and |end| for problems and subproblems, |
| 827 |
respectively. |
| 828 |
The option |start| displays points at |
| 829 |
the very end of the opening line; |
| 830 |
the option |start*| displays them at the start of it. |
| 831 |
The option |end| displays points at the end of the |
| 832 |
problem or subproblem text. |
| 833 |
The option |margin| displays points in the margin. |
| 834 |
The option |manual| displays points at a manually chosen location |
| 835 |
specified by the directive |\showpoints|. |
| 836 |
Note that |\showpoints| can also be used for the option |end| |
| 837 |
to display the points prematurely |
| 838 |
(e.g.\ if the text ends with a displayed equation, |
| 839 |
it may make sense to display the points just before the equation). |
| 840 |
The option |off| disables the display of points. |
| 841 |
|
| 842 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 843 |
\DescribeMacro{\getsheetdata} |
| 844 |
Points for sheets are only stored by the package; |
| 845 |
they must displayed manually. |
| 846 |
Within the corresponding |sheet| environment |
| 847 |
the points can be accessed by: |
| 848 |
\begin{center} |
| 849 |
|\getsheetdata{points}| |
| 850 |
\end{center} |
| 851 |
|
| 852 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 853 |
\DescribeMacro{\getsheetpoints} |
| 854 |
\DescribeMacro{\getproblempoints} |
| 855 |
\DescribeMacro{\getsubproblempoints} |
| 856 |
\DescribeMacro{\getsolutionpoints} |
| 857 |
\DescribeMacro{\extractpoints} |
| 858 |
\DescribeMacro{\switchpoints} |
| 859 |
The package allows to read the point totals |
| 860 |
for other sheets and problems: |
| 861 |
\begin{center} |
| 862 |
\begin{tabular}{l} |
| 863 |
|\getsheetpoints{|[\textit{tag}]|}|\\ |
| 864 |
|\getproblempoints{|[\textit{tag}]|}|\\ |
| 865 |
|\getsubproblempoints{|[\textit{tag}]|}|\\ |
| 866 |
|\getsolutionpoints{}| |
| 867 |
\end{tabular} |
| 868 |
\end{center} |
| 869 |
Here \textit{tag} is the tag assigned to the corresponding sheet or problem, |
| 870 |
see \secref{sec:labels}. |
| 871 |
An empty argument \textit{tag} refers to the current |
| 872 |
sheet, (sub)problem or solution. |
| 873 |
If bonus points are used, the points will be returned |
| 874 |
in the format [\textit{regular}][|+|\textit{bonus}]; |
| 875 |
the components \textit{regular} and \textit{bonus} |
| 876 |
can be extracted from the returned expression |
| 877 |
by |\extractpoints| and |\extractpoints*|, respectively. |
| 878 |
A convenient case switch of the returned value can be performed by: |
| 879 |
\begin{center} |
| 880 |
|\switchpoints{|\textit{reg}|}{|\textit{bonus}|}{|\textit{both}|}{|% |
| 881 |
\textit{none}|}{|\textit{val}|}| |
| 882 |
\end{center} |
| 883 |
Here \textit{val} is the value returned from the points register, |
| 884 |
\textit{reg} is displayed for purely regular points, |
| 885 |
\textit{bonus} is displayed for purely bonus points, |
| 886 |
\textit{both} is displayed for mixed points, |
| 887 |
\textit{none} is displayed for no points. |
| 888 |
In each of the four expressions, |
| 889 |
|#1| will be replaced by the regular points |
| 890 |
and |#2| by the bonus points. |
| 891 |
|
| 892 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 893 |
\DescribeMacro{\awardpoints} |
| 894 |
Grading instructions with points to be awarded |
| 895 |
can be specified in the solution text by: |
| 896 |
\begin{center} |
| 897 |
\begin{tabular}{l} |
| 898 |
|\awardpoints[|\textit{details}|]{|\textit{points}|}|\\ |
| 899 |
|\awardpoints*[|\textit{details}|]{|\textit{points}|}| |
| 900 |
\end{tabular} |
| 901 |
\end{center} |
| 902 |
Here \textit{details} is an optional text with further details, |
| 903 |
e.g.\ to explain under which conditions |
| 904 |
these points are to be awarded. |
| 905 |
The starred form is used to specify optional points or alternative paths |
| 906 |
with alternative grading instructions. |
| 907 |
These points will be marked and not be used for the computation of a total. |
| 908 |
|
| 909 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 910 |
\DescribeMacro{warntext} |
| 911 |
The package attempts to add up |
| 912 |
the points of subproblems to the problem total |
| 913 |
and likewise the points of problems to the sheet total. |
| 914 |
The package also performs some sanity checks on the provided numbers: |
| 915 |
If points are specified for both subproblems and problems |
| 916 |
or for both problems and sheets, they will be compared. |
| 917 |
Also the points within solutions (excluding optional or alternative points) |
| 918 |
are added up and compared to the corresponding problem or subproblem. |
| 919 |
Furthermore the package checks whether points |
| 920 |
are defined for all subproblems within a problem |
| 921 |
or all problems within a sheet. |
| 922 |
Mismatches are reported as package warnings. |
| 923 |
As point mismatches can be rather severe, |
| 924 |
there is an option to write such warnings directly into |
| 925 |
the output document (to be removed before distribution): |
| 926 |
\begin{center} |
| 927 |
|\exercisesetup{warntext|[|=true|\textbar|false|]|}| |
| 928 |
\end{center} |
| 929 |
|
| 930 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 931 |
\DescribeMacro{fracpoints} |
| 932 |
The package offers pretty display of fractional points |
| 933 |
with denominators 2, 4 and 8 by writing the decimal part |
| 934 |
as a fraction, e.g.\ 1.75 $\to$ 1$^3\mskip-4mu/\mskip-2mu_4$. |
| 935 |
This feature is enabled by: |
| 936 |
\begin{center} |
| 937 |
|\exercisestyle{fracpoints}| |
| 938 |
\end{center} |
| 939 |
|
| 940 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 941 |
\subsection{Labels and Tags} |
| 942 |
\label{sec:labels} |
| 943 |
|
| 944 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 945 |
\DescribeMacro{label} |
| 946 |
\LaTeX{} provides labels to make references to remote parts of the text. |
| 947 |
Labels can be set as usual by |\label{|\textit{label}|}| within the |
| 948 |
|problem|, |subproblems| and |sheet| environments. |
| 949 |
Alternatively, they can be specified |
| 950 |
as the environment option: |
| 951 |
\begin{center} |
| 952 |
|label={|\textit{label}|}| |
| 953 |
\end{center} |
| 954 |
|
| 955 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 956 |
\DescribeMacro{tag} |
| 957 |
\DescribeMacro{\sheettag} |
| 958 |
\DescribeMacro{\problemtag} |
| 959 |
\DescribeMacro{\subproblemtag} |
| 960 |
The package provides an additional mechanism to tag sheets and problems. |
| 961 |
Each |sheet|, |problem| and |subproblem| |
| 962 |
can be assigned a unique tag \textit{tag} by |
| 963 |
the environment option: |
| 964 |
\begin{center} |
| 965 |
|tag={|\textit{tag}|}| |
| 966 |
\end{center} |
| 967 |
This tag is used for reading point totals |
| 968 |
as described in \secref{sec:points}. |
| 969 |
Furthermore, the macro |\sheettag|, |\problemtag| or |\subproblemtag| |
| 970 |
is set to the tag \textit{tag} within the current environment. |
| 971 |
If no tag is specified it defaults to the number |
| 972 |
of the current sheet or (sub)problem; |
| 973 |
note that this number can change by reordering sheets and problems |
| 974 |
and therefore it should not be used to identify the entity from |
| 975 |
other parts of the document. |
| 976 |
|
| 977 |
A useful application for tags is to encapsulate labels |
| 978 |
within individual sheets and problems |
| 979 |
which are part of a collection of exercises. |
| 980 |
Labels which are composed as |
| 981 |
|\sheettag-|\textit{label} or |
| 982 |
|\problemtag-|\textit{label} |
| 983 |
can be considered local and will not clash with labels |
| 984 |
defined within a different environment. |
| 985 |
Within the same sheet or problem, local labels can be accessed |
| 986 |
by the same construction. |
| 987 |
They can also be accessed from remote parts of the document by fully |
| 988 |
expanding |\sheettag| or |\problemtag| for the desired target environment. |
| 989 |
|
| 990 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 991 |
\DescribeMacro{autolabelsheet} |
| 992 |
\DescribeMacro{autolabelproblem} |
| 993 |
If unique tags are specified, the package can automatically create labels |
| 994 |
for sheets (|sheet:|\textit{tag}) and problems (|prob:|\textit{tag}) by: |
| 995 |
\begin{center} |
| 996 |
\begin{tabular}{l} |
| 997 |
|\exercisesetup{autolabelsheet|[|=true|\textbar|false|]|}|\\ |
| 998 |
|\exercisesetup{autolabelproblem|[|=true|\textbar|false|]|}| |
| 999 |
\end{tabular} |
| 1000 |
\end{center} |
| 1001 |
|
| 1002 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1003 |
\DescribeMacro{\getsheetlist} |
| 1004 |
\DescribeMacro{\getproblemlist} |
| 1005 |
\DescribeMacro{\getsubproblemlist} |
| 1006 |
Tags can also be used to process a list of sheets, problems and subproblems: |
| 1007 |
\begin{center} |
| 1008 |
\begin{tabular}{l} |
| 1009 |
|\getsheetlist{}|\\ |
| 1010 |
|\getproblemlist{|[\textit{sheet-tag}]\textbar|*}|\\ |
| 1011 |
|\getsubproblemlist{|[\textit{problem-tag}]|}|\\ |
| 1012 |
\end{tabular} |
| 1013 |
\end{center} |
| 1014 |
These commands return a list of sheets, problems and subproblems tags, |
| 1015 |
where each item is encapsulated in braces. |
| 1016 |
The commands |\get|[|sub|]|problemlist| return the (sub)problems |
| 1017 |
within the specified sheet or problem. If no argument is given, |
| 1018 |
the current sheet or problem is assumed. |
| 1019 |
|\getproblemlist*| returns the list of all problems. |
| 1020 |
|
| 1021 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1022 |
\DescribeMacro{\exerciseloop} |
| 1023 |
\DescribeMacro{\exerciseloopstr} |
| 1024 |
\DescribeMacro{\exerciseloopret} |
| 1025 |
\DescribeMacro{exerciseloop} |
| 1026 |
The package defines two commands to walk through such a list: |
| 1027 |
\begin{center} |
| 1028 |
\begin{tabular}{l} |
| 1029 |
|\exerciseloop{|\textit{items}|}{|\textit{cmd}|}|\\ |
| 1030 |
|\exerciseloopstr[|\textit{ret}|]{|\textit{items}|}{|\textit{str}|}| |
| 1031 |
\end{tabular} |
| 1032 |
\end{center} |
| 1033 |
Here, \textit{items} is a list of items in braces, |
| 1034 |
and |\exerciseloop| evaluates \textit{cmd} |
| 1035 |
for each item of the list where `|#1|' is replaced by the item. |
| 1036 |
The command |\exerciseloopstr| concatenates |
| 1037 |
the evaluations of \textit{str} |
| 1038 |
and returns the resulting string in the macro \textit{ret} |
| 1039 |
(which defaults to |\exerciseloopret|). |
| 1040 |
Both commands maintain a counter of items |exerciseloop| |
| 1041 |
which can be accessed within \textit{cmd}/\textit{str} or |
| 1042 |
after |\exerciseloop|[|str|] to obtain the total number of items |
| 1043 |
in the list. |
| 1044 |
|
| 1045 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1046 |
\subsection{Layout} |
| 1047 |
\label{sec:layout} |
| 1048 |
|
| 1049 |
The package provides a large number of parameters to adjust the |
| 1050 |
display of exercises to a desired layout. |
| 1051 |
|
| 1052 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1053 |
\DescribeMacro{\exerciseconfig} |
| 1054 |
Configuration settings are declared and modified by the command: |
| 1055 |
\begin{center} |
| 1056 |
|\exerciseconfig{|\textit{key}|}[|\textit{narg}|]{|\textit{value}|}| |
| 1057 |
\end{center} |
| 1058 |
Here \textit{key} is a key and \textit{value} is its assigned value. |
| 1059 |
Configuration options can also be macros with arguments in which case |
| 1060 |
\textit{narg} is the number of arguments and \textit{value} |
| 1061 |
is the macro definition using arguments |#|\textit{n}. |
| 1062 |
The command |\exerciseconfig| therefore is analogous to |
| 1063 |
|\|(|re|)|newcommand| except that the definitions are |
| 1064 |
encapsulated by the package and any previous definition |
| 1065 |
is overwritten without checking. |
| 1066 |
|
| 1067 |
\DescribeMacro{\exerciseconfigappend} |
| 1068 |
\DescribeMacro{\exerciseconfigprepend} |
| 1069 |
In some cases it may be useful to be able to |
| 1070 |
append or prepend to a (parameterless) definition by: |
| 1071 |
\begin{center} |
| 1072 |
\begin{tabular}{l} |
| 1073 |
|\exerciseconfigappend{|\textit{key}|}{|\textit{value}|}|\\ |
| 1074 |
|\exerciseconfigprepend{|\textit{key}|}{|\textit{value}|}| |
| 1075 |
\end{tabular} |
| 1076 |
\end{center} |
| 1077 |
|
| 1078 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1079 |
\DescribeMacro{\getexerciseconfig} |
| 1080 |
\DescribeMacro{\exerciseconfigempty} |
| 1081 |
Configuration definitions can be read by: |
| 1082 |
\begin{center} |
| 1083 |
|\getexerciseconfig{|\textit{key}|}|[\textit{arguments}] |
| 1084 |
\end{center} |
| 1085 |
The number of arguments after |{|\textit{key}|}| |
| 1086 |
must match the optional argument \textit{nargs} of the definition. |
| 1087 |
Furthermore, it can be checked whether a configuration definition |
| 1088 |
is empty: |
| 1089 |
\begin{center} |
| 1090 |
|\exerciseconfigempty{|\textit{key}|}|% |
| 1091 |
|{|\textit{empty code}|}{|\textit{filled code}|}| |
| 1092 |
\end{center} |
| 1093 |
The \textit{empty code} is executed if no value |
| 1094 |
or an empty value has been specified. |
| 1095 |
Otherwise the \textit{filled code} is executed. |
| 1096 |
|
| 1097 |
The package defines numerous layout configuration options. |
| 1098 |
They are listed along with their original definition |
| 1099 |
and a brief description |
| 1100 |
in the configuration section of the source code documentation. |
| 1101 |
Some particular aspects are described in more detail |
| 1102 |
in \secref{sec:guides}. |
| 1103 |
The configuration includes options to: |
| 1104 |
\begin{itemize} |
| 1105 |
\item |
| 1106 |
adjust the language for the principal entities of this package |
| 1107 |
like ``sheet(s)'', ``problem(s)'', ``solution(s)'', ``points(s)''; |
| 1108 |
\item |
| 1109 |
adjust the fonts styles of various parts of the text; |
| 1110 |
\item |
| 1111 |
adjust the spacing above, below, between various elements; |
| 1112 |
\item |
| 1113 |
define code to process data and insert text at various locations; |
| 1114 |
\item |
| 1115 |
compose text to be used in various situations; |
| 1116 |
\item |
| 1117 |
adjust the appearance of counters; |
| 1118 |
\item |
| 1119 |
adjust some other behaviour of the package. |
| 1120 |
\end{itemize} |
| 1121 |
We will highlight a few examples in \secref{sec:examples}. |
| 1122 |
|
| 1123 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1124 |
\subsection{Exercise Styles} |
| 1125 |
\label{sec:styles} |
| 1126 |
|
| 1127 |
The package provides a mechanism to define exercise styles |
| 1128 |
which customise the display of exercises in some coordinated fashion. |
| 1129 |
|
| 1130 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1131 |
\DescribeMacro{\exercisestyle} |
| 1132 |
Style(s) are activated by the command: |
| 1133 |
\begin{center} |
| 1134 |
|\exercisestyle{|\textit{styles}|}| |
| 1135 |
\end{center} |
| 1136 |
Here \textit{styles} is a comma-separated list of styles, |
| 1137 |
where each style is given by a pair \textit{style}[|={|\textit{argument}|}|]. |
| 1138 |
The package defines a couple of standard styles: |
| 1139 |
\begin{itemize} |
| 1140 |
\item |solutionbelow=|\textit{pos} |
| 1141 |
(can take values |here|, |subproblem|, |subproblem*|, |
| 1142 |
|problem|, |problem*|, |sheet| and |manual|; |
| 1143 |
initially set to |subproblem|) -- |
| 1144 |
positions the solutions below the indicated environments; |
| 1145 |
see \secref{sec:solutions} for details. |
| 1146 |
|
| 1147 |
\item |problempointsat=|\textit{pos} |
| 1148 |
(can take values |start|, |start*|, |margin|, |end| and |manual|; |
| 1149 |
initially set to |start|) -- |
| 1150 |
displays points in problems at the indicated location; |
| 1151 |
see \secref{sec:points} for details. |
| 1152 |
|
| 1153 |
\item |subproblempointsat=|\textit{pos} |
| 1154 |
(can take values |start|, |start*|, |margin|, |end| and |manual|; |
| 1155 |
initially set to |end|) -- |
| 1156 |
displays points in subproblems at the indicated location; |
| 1157 |
see \secref{sec:points} for details. |
| 1158 |
|
| 1159 |
\item |solutionpointsat=|\textit{pos} |
| 1160 |
(can take values |start|, |start*|, |margin|, |end| and |manual|; |
| 1161 |
initially set to |end|) -- |
| 1162 |
displays points in solutions at the indicated location; |
| 1163 |
see \secref{sec:points} for details. |
| 1164 |
|
| 1165 |
\item |problemby={|\textit{counter}|}| -- |
| 1166 |
number problems with the prefix \textit{counter}, |
| 1167 |
i.e.\ reset the problem counter whenever \textit{counter} increases |
| 1168 |
and use a composite label \textit{counter}|.|\textit{problem} |
| 1169 |
to identify problems. |
| 1170 |
|
| 1171 |
\item |equationby={|\textit{counter}|}| -- |
| 1172 |
number the dedicated equation counters for sheets, problems and solutions |
| 1173 |
with the prefix \textit{counter}. |
| 1174 |
|
| 1175 |
\item |problembysheet| -- |
| 1176 |
number problems by sheet. |
| 1177 |
|
| 1178 |
\item |equationbysheet| -- |
| 1179 |
number dedicated equations for sheets, problems and solutions by sheet; |
| 1180 |
note that the main equation counter is unaffected by this setting, |
| 1181 |
it therefore makes sense to also activate the style |sheetequation| |
| 1182 |
or use |\counterwithin{equation}{sheet}|. |
| 1183 |
|
| 1184 |
\item |pagebysheet| -- |
| 1185 |
number pages by sheet and denote pages by \textit{sheet}|.|\textit{page}; |
| 1186 |
this style is useful to generate stable page numbers for |
| 1187 |
a collection of sheets. |
| 1188 |
|
| 1189 |
\item |sheetequation|[|=true|\textbar|false|] |
| 1190 |
(no value implies |true|, initially set to |false|) -- |
| 1191 |
use a dedicated equation counter within sheets. |
| 1192 |
|
| 1193 |
\item |problemequation|[|=true|\textbar|false|] |
| 1194 |
(no value implies |true|, initially set to |false|) -- |
| 1195 |
use a dedicated equation counter within problems. |
| 1196 |
|
| 1197 |
\item |solutionequation|[|=true|\textbar|false|] |
| 1198 |
(no value implies |true|, initially set to |true|) -- |
| 1199 |
use a dedicated equation counter within solutions. |
| 1200 |
|
| 1201 |
\item |fracpoints|[|=true|\textbar|false|] |
| 1202 |
(no value implies |true|, initially set to |false|) -- |
| 1203 |
display fractional points for denominators 2, 4, 8; |
| 1204 |
see \secref{sec:points} for details. |
| 1205 |
|
| 1206 |
\item |twoside|[|=true|\textbar|false|] |
| 1207 |
(no value implies |true|, initially set to |false|) -- |
| 1208 |
enable/disable two-sided layout; |
| 1209 |
in two-sided layout, sheets will start on odd pages |
| 1210 |
and empty pages are added at the end of sheets |
| 1211 |
to produce an even number of pages. |
| 1212 |
|
| 1213 |
\item |subproblemdelimitem| -- |
| 1214 |
shift subproblem number delimiter `)' from subproblem label |
| 1215 |
to subproblem item composition; |
| 1216 |
needed if |\ref| to a subproblem |\label| should produce a bare identifier |
| 1217 |
without a trailing `)'; |
| 1218 |
assumes (and restores) numbering |\alph| and delimiter `)'. |
| 1219 |
|
| 1220 |
\end{itemize} |
| 1221 |
|
| 1222 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1223 |
\DescribeMacro{extstyle} |
| 1224 |
Further exercise styles |
| 1225 |
are defined by the package option |extstyle|, see \secref{sec:options}: |
| 1226 |
\begin{itemize} |
| 1227 |
\item |plainheader| -- |
| 1228 |
define a plain sheet header to display |
| 1229 |
some essential exercise and sheet data: |
| 1230 |
|course|, |institution|, |instructor|, |period| (optional), sheet |title|, |
| 1231 |
see \secref{sec:metadata}; |
| 1232 |
the line below the header, font styles and spaces can be adjusted, |
| 1233 |
see the definition |
| 1234 |
in the styles section of the source code documentation. |
| 1235 |
|
| 1236 |
\item |contents| -- |
| 1237 |
display sheets and problems in the table of contents |
| 1238 |
(as sections and subsections). |
| 1239 |
|
| 1240 |
\item |solutionsf| -- |
| 1241 |
display solutions in sans serif font family. |
| 1242 |
|
| 1243 |
\item |solutiondimproblem| -- |
| 1244 |
dim the problem text whenever solutions are displayed. |
| 1245 |
|
| 1246 |
\item |solutionsep| -- |
| 1247 |
separate the solutions from the remaining text by horizontal lines. |
| 1248 |
|
| 1249 |
\end{itemize} |
| 1250 |
|
| 1251 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1252 |
\DescribeMacro{\defexercisestyle} |
| 1253 |
Custom styles can be defined by: |
| 1254 |
\begin{center} |
| 1255 |
\begin{tabular}{l} |
| 1256 |
|\defexercisestyle{|\textit{style}|}{|\textit{init}|}|\\ |
| 1257 |
|\defexercisestylearg[|\textit{default}|]{|\textit{style}|}{|\textit{init}|}| |
| 1258 |
\end{tabular} |
| 1259 |
\end{center} |
| 1260 |
This feature can be used to predefine certain aspects of |
| 1261 |
the exercises layout. |
| 1262 |
For example, different default page layouts could be declared in this way. |
| 1263 |
The first version declares a style which is |
| 1264 |
initialised by the code \textit{item} upon activation by |
| 1265 |
|\exercisestyle{|\textit{style}[|=true|]|}|. |
| 1266 |
Note that |\exercisestyle{|\textit{style}|=false}| does nothing. |
| 1267 |
The second version declares a style which is activated by |
| 1268 |
|\exercisestyle{|\textit{style}[|={|\textit{arg}|}|]|}| |
| 1269 |
and which calls \textit{item} with the argument |#1| referring to \textit{arg} |
| 1270 |
(or \textit{default} if no argument is given). |
| 1271 |
|
| 1272 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1273 |
\subsection{Package Options} |
| 1274 |
\label{sec:options} |
| 1275 |
|
| 1276 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1277 |
\DescribeMacro{\exercisesetup} |
| 1278 |
Features and options of general nature can be selected by the commands: |
| 1279 |
\begin{center} |
| 1280 |
\begin{tabular}{rl} |
| 1281 |
&|\usepackage[|\textit{opts}|]{exframe}| |
| 1282 |
\\ |
| 1283 |
or&|\PassOptionsToPackage{|\textit{opts}|}{exframe}| |
| 1284 |
\\ |
| 1285 |
or&|\exercisesetup{|\textit{opts}|}| |
| 1286 |
\end{tabular} |
| 1287 |
\end{center} |
| 1288 |
|\PassOptionsToPackage| must be used before |\usepackage|; |
| 1289 |
|\exercisesetup| must be used afterwards. |
| 1290 |
\textit{opts} is a comma-separated list of options. |
| 1291 |
|
| 1292 |
The following options are available only when |
| 1293 |
loading the package, i.e.\ they will not work |
| 1294 |
within |\exercisesetup|: |
| 1295 |
\begin{itemize} |
| 1296 |
\item |extdata|[|=true|\textbar|false|] |
| 1297 |
(no value implies |true|, initially set to |false|) -- |
| 1298 |
define some more advanced metadata entries. |
| 1299 |
|
| 1300 |
\item |extstyle|[|=true|\textbar|false|] |
| 1301 |
(no value implies |true|, initially set to |false|) -- |
| 1302 |
define some more advanced styles. |
| 1303 |
|
| 1304 |
\item |metastr|[|=true|\textbar|false|] |
| 1305 |
(no value implies |true|, initially set to |false|) -- |
| 1306 |
load \ctanpkg{metastr} package and use to handle pdf metadata |
| 1307 |
and basic internationalisation, |
| 1308 |
see the metastr interaction section of the source code documentation |
| 1309 |
for details. |
| 1310 |
|
| 1311 |
\item |problemenv=|\textit{name} -- |
| 1312 |
redefine environment name |problem|. |
| 1313 |
This and the following alike options may be useful in |
| 1314 |
quickly adjusting existing sources to |
| 1315 |
the \ctanpkg{exframe} framework |
| 1316 |
if the original framework works similarly |
| 1317 |
and no special features are used. |
| 1318 |
Otherwise, it is highly advisable to leave the |
| 1319 |
names of environments and counters |
| 1320 |
defined by the package untouched. |
| 1321 |
|
| 1322 |
\item |subproblemenv=|\textit{name} -- |
| 1323 |
redefine environment name |subproblem|. |
| 1324 |
|
| 1325 |
\item |solutionenv=|\textit{name} -- |
| 1326 |
redefine environment name |solution|. |
| 1327 |
|
| 1328 |
\item |sheetenv=|\textit{name} -- |
| 1329 |
redefine environment name |sheet|. |
| 1330 |
|
| 1331 |
\item |problemcounter=|\textit{name} -- |
| 1332 |
redefine counter name |problem|. |
| 1333 |
|
| 1334 |
\item |subproblemcounter=|\textit{name} -- |
| 1335 |
redefine counter name |subproblem|. |
| 1336 |
|
| 1337 |
\item |solutioncounter=|\textit{name} -- |
| 1338 |
redefine counter name |solution|. |
| 1339 |
|
| 1340 |
\item |sheetcounter=|\textit{name} -- |
| 1341 |
redefine counter name |sheet|. |
| 1342 |
|
| 1343 |
\end{itemize} |
| 1344 |
|
| 1345 |
The following options can be specified by all three methods described above: |
| 1346 |
\begin{itemize} |
| 1347 |
\item |solutions|[|=true|\textbar|false|] |
| 1348 |
(no value implies |true|, initially set to |false|) -- |
| 1349 |
Enable/disable display of solutions. |
| 1350 |
Sets the conditional |\ifsolutions| accordingly. |
| 1351 |
|
| 1352 |
\item |pdfdata|[|=auto|\textbar|manual|\textbar|sheet|\textbar|off|] |
| 1353 |
(no value implies |auto|, initially set to |auto|) -- |
| 1354 |
control writing most relevant metadata to pdf files; |
| 1355 |
has no effect without package \ctanpkg{hyperref}. |
| 1356 |
|
| 1357 |
\item |lineno|[|=true|\textbar|false|] |
| 1358 |
(no value implies |true|, initially set to |false|) -- |
| 1359 |
enable/disable writing of line numbers as comments |
| 1360 |
into solution files. |
| 1361 |
|
| 1362 |
\item |twoside|[|=true|\textbar|false|] |
| 1363 |
(no value implies |true|, initially set to |false|) -- |
| 1364 |
enable/disable two-sided layout; |
| 1365 |
see \secref{sec:styles} for details. |
| 1366 |
|
| 1367 |
\item |solutionhref|[|=true|\textbar|true|] |
| 1368 |
(no value implies |true|, initially set to |false|) -- |
| 1369 |
enable/disable use of hyper-references from solutions |
| 1370 |
to the corresponding problems; |
| 1371 |
has no effect without package \ctanpkg{hyperref}. |
| 1372 |
|
| 1373 |
\item |warntext|[|=true|\textbar|false|] |
| 1374 |
(no value implies |true|, initially set to |false|) -- |
| 1375 |
enable/disable writing of relevant warning messages |
| 1376 |
(points mismatch, point sums require update) |
| 1377 |
into the document output for easier detection. |
| 1378 |
|
| 1379 |
\item |autolabelsheet|[|=true|\textbar|false|] |
| 1380 |
(no value implies |true|, initially set to |false|) -- |
| 1381 |
enable/disable automatically assigning labels |
| 1382 |
(|sheet:\sheettag|; can be adjusted) |
| 1383 |
to sheets according to their tag |\sheettag|. |
| 1384 |
|
| 1385 |
\item |autolabelproblem|[|=true|\textbar|false|] |
| 1386 |
(no value implies |true|, initially set to |false|) -- |
| 1387 |
enable/disable automatically assigning labels |
| 1388 |
(|prob:\problemtag|; can be adjusted) |
| 1389 |
to problems according to their tag |\problemtag|. |
| 1390 |
|
| 1391 |
\item |solutionbuf|[|=true|\textbar|false|] |
| 1392 |
(no value implies |true|, initially set to |true|) -- |
| 1393 |
enable/disable buffering for |solution| environments |
| 1394 |
in order to control their display; |
| 1395 |
disabling buffering can be helpful |
| 1396 |
in debugging faulty |solution| environments; |
| 1397 |
it might also resolve some tokenisation issues in special circumstances; |
| 1398 |
note that the display of solutions cannot be suppressed |
| 1399 |
with |\exercisesetup{solutions=false}| when buffering if disabled. |
| 1400 |
|
| 1401 |
\item |problembuf|[|=true|\textbar|false|] |
| 1402 |
(no value implies |true|, initially set to |false|) -- |
| 1403 |
enable/disable buffering for |problem| environments |
| 1404 |
in order to control their display. |
| 1405 |
|
| 1406 |
\item |subproblembuf|[|=true|\textbar|false|] |
| 1407 |
(no value implies |true|, initially set to |false|) -- |
| 1408 |
enable/disable buffering for |subproblem| environments |
| 1409 |
in order to control their display. |
| 1410 |
|
| 1411 |
\item |emptytestchar=|\textit{char} |
| 1412 |
(initially set to `|&|') -- |
| 1413 |
character to use for testing whether an argument |#1| |
| 1414 |
is empty via |\if&...\fi|; |
| 1415 |
if `|&|' causes trouble within tables, could try `|@|' instead. |
| 1416 |
|
| 1417 |
\end{itemize} |
| 1418 |
|
| 1419 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1420 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1421 |
\section{Customisations} |
| 1422 |
\label{sec:customisation} |
| 1423 |
|
| 1424 |
This section attempts to shed some light on the rich array of options |
| 1425 |
for layout customisations. |
| 1426 |
It is not at all complete, but it provides an overview and |
| 1427 |
illustrates selected aspects by means of guidance and examples. |
| 1428 |
|
| 1429 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1430 |
\subsection{Guidance} |
| 1431 |
\label{sec:guides} |
| 1432 |
|
| 1433 |
The following provides some guidance on customisation options |
| 1434 |
which might otherwise be hard to follow. |
| 1435 |
Suggestions for topics to be expanded are welcome. |
| 1436 |
|
| 1437 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1438 |
\paragraph{Package Philosophy.} |
| 1439 |
|
| 1440 |
The philosophy of the present package is to |
| 1441 |
define a low-level framework to describe exercises with solutions |
| 1442 |
to be used in various situations. |
| 1443 |
The aim is to provide the means to describe the content |
| 1444 |
(problems, solutions, sheets) in a simple fashion |
| 1445 |
and separate it from the various layout definitions and choices |
| 1446 |
which will define the appearance of the content. |
| 1447 |
The package itself provides a functional basic layout |
| 1448 |
rather than an elaborate or particularly appealing one. |
| 1449 |
However, it provides means to adjust the basic layout in many ways and |
| 1450 |
to predefine custom layout schemes. |
| 1451 |
The package is meant to collaborate with other packages |
| 1452 |
which provide solutions for particular applications |
| 1453 |
in order to produce an appealing layout for the given content. |
| 1454 |
|
| 1455 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1456 |
\paragraph{Framework for Layout Customisation.} |
| 1457 |
|
| 1458 |
The framework for defining the layout |
| 1459 |
consists of an internal and a public component |
| 1460 |
which allow for minor adjustments and major changes |
| 1461 |
both with reasonable efforts. |
| 1462 |
|
| 1463 |
The internal component implements some very coarse |
| 1464 |
choices for the presentation of the content. |
| 1465 |
It is hard-coded in the package |
| 1466 |
(using internal macros starting with |exf@|) |
| 1467 |
and its operation can be adjusted mainly through the available package options, |
| 1468 |
see \secref{sec:options}, and through configuration switches |
| 1469 |
for individual blocks. |
| 1470 |
|
| 1471 |
The public framework uses a hierarchy of configuration macros |
| 1472 |
defined by |\exerciseconfig|, see \secref{sec:layout}. |
| 1473 |
The internal component interfaces with the public framework |
| 1474 |
through a set of higher-level interface macros. |
| 1475 |
These include macros which produce the desired text in a |
| 1476 |
well-prescribed situation |
| 1477 |
as well as macros which perform some \LaTeX\ operations |
| 1478 |
such as adjusting presentation styles or modifying some variables. |
| 1479 |
In many cases the structural higher-level macros have been set up to |
| 1480 |
branch out to further lower-level macros prescribing presentation details. |
| 1481 |
|
| 1482 |
The hierarchy has the following structure: |
| 1483 |
High-level macros compose certain abstract elements |
| 1484 |
into readable text, e.g.\ an intro/outro for some block of text |
| 1485 |
made from space, decorations and abstract text elements. |
| 1486 |
Medium-level macros compose elementary objects into abstract text elements, |
| 1487 |
e.g.\ a header for some block of text |
| 1488 |
composed from a label and a title with some space and delimiters in between. |
| 1489 |
Low-level macros define elementary objects, |
| 1490 |
such as delimiter characters, spaces, widths and words (translations). |
| 1491 |
|
| 1492 |
The public framework has been set up such that |
| 1493 |
elements at high, medium and low levels can be adjusted independently |
| 1494 |
to arrive at a specific effect. |
| 1495 |
For example, the composition of problem titles can be adjusted abstractly, |
| 1496 |
but also the representation of a specific delimiter |
| 1497 |
can be tweaked from `.' to `:'; |
| 1498 |
either change can be obtained by adjusting a single definition. |
| 1499 |
This flexibility comes along with an unfortunate complexity |
| 1500 |
to allow for adjustments to be implemented individually but also universally. |
| 1501 |
Nevertheless, the implementation of the public configuration macros |
| 1502 |
for a particular setup can be rather simple because the particular setup |
| 1503 |
will neither use all of the available coarse layout choices |
| 1504 |
nor all of the customisation options. |
| 1505 |
For example, a higher-level macro for a problem title |
| 1506 |
may directly produce the desired text without branching into |
| 1507 |
further lower-level definitions. |
| 1508 |
Also, only those higher-level macros which actually come to use |
| 1509 |
in a particular setup will need to be implemented. |
| 1510 |
|
| 1511 |
The following paragraphs provide guidance on aspects of the |
| 1512 |
public framework. There is no complete manual for the framework, |
| 1513 |
but a skilled \LaTeX\ tinkerer can find further information |
| 1514 |
and pieces of code ready for tweaking in the implementation notes |
| 1515 |
the configuration and styles sections of the source code documentation. |
| 1516 |
|
| 1517 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1518 |
\paragraph{Labels for Problems and Sheets.} |
| 1519 |
|
| 1520 |
The package provides many methods with various names |
| 1521 |
to customise labels for problem and solution blocks. |
| 1522 |
These names follow certain patterns |
| 1523 |
(but are sometimes stuck with odd assignments due to backward compatibility). |
| 1524 |
The following guide describes which methods come to use |
| 1525 |
in which situations. |
| 1526 |
|
| 1527 |
The labels can be grouped into two categories, |
| 1528 |
items and titles, and the corresponding methods are |
| 1529 |
typically called |...item...| and |...title...|. |
| 1530 |
Items are enumerative identifiers for the [sub]problems |
| 1531 |
such as `1.', `b)' or `3iv)'. |
| 1532 |
Titles serve as headers for [sub]problem or solution blocks |
| 1533 |
which usually take the form ``Problem 1'', ``2.\ Fermat's Last'' |
| 1534 |
or simply ``c)'' for a subproblem. |
| 1535 |
Titles may use the corresponding item, and display it together with |
| 1536 |
the type, name or using a different punctuation |
| 1537 |
depending on the situation. |
| 1538 |
|
| 1539 |
\DescribeMacro{composetitleproblem} |
| 1540 |
\DescribeMacro{composenamedproblem} |
| 1541 |
\DescribeMacro{composebareproblem} |
| 1542 |
The composition of problem titles through |composetitleproblem| |
| 1543 |
depends mainly on whether an individual name is provided |
| 1544 |
(|title| option to |problem| environment). |
| 1545 |
The method passes on to |composenamedproblem| if a name is provided |
| 1546 |
(second argument non-empty), otherwise to |composebareproblem|. |
| 1547 |
It might also produce a plain name if no item is provided |
| 1548 |
(first argument empty). |
| 1549 |
|
| 1550 |
\DescribeMacro{composenamedproblemdelim} |
| 1551 |
\DescribeMacro{composenamedproblemsep} |
| 1552 |
\DescribeMacro{composebareproblemdelim} |
| 1553 |
\DescribeMacro{composebareproblemsep} |
| 1554 |
\DescribeMacro{composeitemproblemdelim} |
| 1555 |
\DescribeMacro{composeitemproblemsep} |
| 1556 |
Titles and items are separated by some space (|...sep|) |
| 1557 |
and/or delimiting characters (|...delim|). |
| 1558 |
The item within a named title is separated from the following name by |
| 1559 |
|composenamedproblemdelim| and |composenamedproblemsep|. |
| 1560 |
In an unnamed title, the type is separated from the following item by |
| 1561 |
|composebareproblemsep|, and the item is followed by |composebareproblemdelim|. |
| 1562 |
A plain item not used within a title is delimited by |composeitemproblemdelim|. |
| 1563 |
The presentation of all titles and items |
| 1564 |
is followed by |composeitemproblemsep|. |
| 1565 |
|
| 1566 |
\DescribeMacro{composetocproblem} |
| 1567 |
Problem titles can also be made to appear in the table of contents, |
| 1568 |
their display is governed by |composetocproblem| |
| 1569 |
which distinguishes between named and unnamed problems. |
| 1570 |
The method uses the above delimiter |composenamedproblemdelim| |
| 1571 |
but no other customisations because detailed layout |
| 1572 |
will be less welcome in the table of contents. |
| 1573 |
|
| 1574 |
\DescribeMacro{composetitlesheet} |
| 1575 |
\DescribeMacro{composetocsheet} |
| 1576 |
\DescribeMacro{composemetasheet} |
| 1577 |
Sheet titles generated by |composetitlesheet| are similar |
| 1578 |
to problem titles but simpler. |
| 1579 |
They may or may not have a name, but there are no pre-defined delimiters. |
| 1580 |
The two similar methods |composetocsheet| and |composemetasheet| |
| 1581 |
govern the display of sheet titles in the table of contents |
| 1582 |
and in pdf metadata, respectively. |
| 1583 |
|
| 1584 |
\DescribeMacro{composeitemsubproblem} |
| 1585 |
\DescribeMacro{composetitlesubproblem} |
| 1586 |
\DescribeMacro{composeitemsubproblemdelim} |
| 1587 |
\DescribeMacro{composeitemsubproblemsep} |
| 1588 |
\DescribeMacro{countersubproblem} |
| 1589 |
\DescribeMacro{subproblemdelimitem} |
| 1590 |
Subproblem items and titles are simple as well because |
| 1591 |
subproblems have no names. |
| 1592 |
They are generated by |composeitemsubproblem| and |composetitlesubproblem|, |
| 1593 |
respectively. The subproblem delimiter and separator |
| 1594 |
are determined by |composeitemsubproblemdelim| |
| 1595 |
and |composeitemsubproblemsep|, respectively. |
| 1596 |
Note that the delimiter `)' within `b)' may be declared as either |
| 1597 |
|composeitemsubproblemdelim| or as part of the subproblem counter |
| 1598 |
defined in |countersubproblem|. |
| 1599 |
This behaviour is governed by the style |subproblemdelimitem|. |
| 1600 |
|
| 1601 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1602 |
\paragraph{Labels for Solutions.} |
| 1603 |
|
| 1604 |
The display of appropriate solution items and titles is very complex |
| 1605 |
as it depends on four factors: |
| 1606 |
(i) The first factor is whether solutions are displayed as an itemised list |
| 1607 |
or as a plain list. |
| 1608 |
(ii) The second factor is whether solutions are |
| 1609 |
displayed individually, grouped by problem |
| 1610 |
or assembled as a list for multiple problems. |
| 1611 |
(iii) The third factor is whether the solution corresponds |
| 1612 |
to a problem or subproblem. |
| 1613 |
(iv) A fourth factor is whether a solution is the first one within a problem. |
| 1614 |
In addition, the list of solutions may have a title (v) and sections (vi). |
| 1615 |
Let us discuss the relevant combinations. |
| 1616 |
|
| 1617 |
\DescribeMacro{composetitlesolutions} |
| 1618 |
\DescribeMacro{...solutionsproblemsingle} |
| 1619 |
\DescribeMacro{...solutionsproblemmulti} |
| 1620 |
The solution list title (``Solutions'') (v) |
| 1621 |
generated by |composetitlesolutions| only applies to |
| 1622 |
lists of (potentially) multiple problems (ii). |
| 1623 |
The solution section title (vi) generated by |composetitlesolutionsproblem...| |
| 1624 |
indicates the corresponding problem. |
| 1625 |
It comes in two variants |...single| and |...multi| |
| 1626 |
which distinguish a single problem (``Solution'') |
| 1627 |
from a list of (potentially) multiple problems (``Problem 2'') (ii). |
| 1628 |
|
| 1629 |
\DescribeMacro{skipsolutionitem} |
| 1630 |
\DescribeMacro{skipsolutionitemsub} |
| 1631 |
\DescribeMacro{composeitemsolution} |
| 1632 |
\DescribeMacro{composeitemsolutionsub} |
| 1633 |
\DescribeMacro{composeitemsolutionfirst} |
| 1634 |
\DescribeMacro{...itemsolutionfirstsub} |
| 1635 |
An itemised list of solutions (i) is invoked by a non-zero |
| 1636 |
width |skipsolutionitem|[|sub|] (iii) for horizontal alignment |
| 1637 |
of the solution text. In this case, solution items are displayed |
| 1638 |
to the left of the line of horizontal alignment. |
| 1639 |
These are generated by the configuration |composeitemsolution|[|sub|] (iii) |
| 1640 |
irrespectively of the display mode (ii). |
| 1641 |
By default, the current problem item is displayed as a section title (vi), |
| 1642 |
therefore the solution items will only display |
| 1643 |
the corresponding subproblem item |
| 1644 |
leaving blank the solution items for problems. |
| 1645 |
However, in an adjusted scheme without section titles (vi), |
| 1646 |
the very first solution within a problem (iv) |
| 1647 |
might additionally indicate the corresponding problem item |
| 1648 |
|composeitemsolutionfirst|[|sub|] (iii). |
| 1649 |
|
| 1650 |
\DescribeMacro{composetitlesolutionsingle} |
| 1651 |
\DescribeMacro{composeitemsolutiondelim} |
| 1652 |
An individual solution (ii) formally part of a plain list (i) |
| 1653 |
starts with the title ``Solution:'' |
| 1654 |
which is generated by the method |composetitlesolutionsingle|. |
| 1655 |
The delimiter `:' is defined by |composeitemsolutiondelim|. |
| 1656 |
|
| 1657 |
\DescribeMacro{composetitlesolutionmulti} |
| 1658 |
\DescribeMacro{...titlesolutionproblem} |
| 1659 |
\DescribeMacro{...titlesolutionsubproblem} |
| 1660 |
The title for a grouped solution (ii) within a plain list (i) |
| 1661 |
is generated by the method |composetitlesolutionmulti| |
| 1662 |
which forwards to |composetitlesolution|[|sub|]|problem| (iii). |
| 1663 |
Again, by default, these methods only display the subproblem item |
| 1664 |
because the problem item is provided as a section title (vi) instead. |
| 1665 |
|
| 1666 |
\DescribeMacro{composetocsolution} |
| 1667 |
\DescribeMacro{composetocsolutions} |
| 1668 |
Items for the table of contents corresponding to |
| 1669 |
solution lists and problem solutions |
| 1670 |
are generated by |composetocsolution|[|s|]. |
| 1671 |
|
| 1672 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1673 |
\subsection{Examples} |
| 1674 |
\label{sec:examples} |
| 1675 |
|
| 1676 |
This section contains some sample customisations of the default (plain) layout |
| 1677 |
which can be realised with moderate effort |
| 1678 |
using the various tools provided by the package. |
| 1679 |
Additional applications are shown in the sample files |
| 1680 |
\verbpkg|-samp.tex| and \verbpkg|-ser.tex|. |
| 1681 |
Suggestions for further applications are welcome. |
| 1682 |
|
| 1683 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1684 |
\paragraph{Sheet Title.} |
| 1685 |
|
| 1686 |
\DescribeMacro{insertsheettitle} |
| 1687 |
An important setting is: |
| 1688 |
\begin{center} |
| 1689 |
|\exerciseconfig{insertsheettitle}{|\textit{code}|}| |
| 1690 |
\end{center} |
| 1691 |
The code \textit{code} is meant to print the title |
| 1692 |
or header of an exercise sheet. |
| 1693 |
The minimalistic default code |\centerline{\getsheetdata{title}}| |
| 1694 |
merely prints the sheet title ``Sheet \#'' at the centre of a line. |
| 1695 |
Commonly, one would replace this by a more elaborate header |
| 1696 |
(potentially with some more information, |
| 1697 |
appealing layout, logos, \ldots). |
| 1698 |
In order to design a header template, |
| 1699 |
it makes sense to retrieve data |
| 1700 |
via |\getexercisedata| and |\getsheetdata| |
| 1701 |
described in \secref{sec:metadata}. |
| 1702 |
Likewise |\exercisedataempty| and |\sheetdataempty| |
| 1703 |
can be used to display default values or alternative data |
| 1704 |
if some particular data is not provided. |
| 1705 |
An example is given by the |plainheader| extended style option defined |
| 1706 |
in the styles section of the source code documentation. |
| 1707 |
|
| 1708 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1709 |
\paragraph{Problem Title.} |
| 1710 |
|
| 1711 |
\DescribeMacro{composetitleproblem} |
| 1712 |
\DescribeMacro{composenamedproblem} |
| 1713 |
\DescribeMacro{composebareproblem} |
| 1714 |
Another noteworthy example is |composetitleproblem| |
| 1715 |
to compose the title for a problem. It takes two parameters, |
| 1716 |
the number and the title. |
| 1717 |
The (somewhat simplified) default declarations are: |
| 1718 |
\begin{center} |
| 1719 |
\begin{tabular}{l} |
| 1720 |
|\exerciseconfig{composetitleproblem}[2]{\exerciseifempty{#2}|\\ |
| 1721 |
| {\getexerciseconfig{composebareproblem}{#1}}|\\ |
| 1722 |
| {\getexerciseconfig{composenamedproblem}{#1}{#2}}}|\\ |
| 1723 |
|\exerciseconfig{composebareproblem}[1]{\getexerciseconfig{termproblem}|\\ |
| 1724 |
| #1\getexerciseconfig{composebareproblemdelim}}|\\ |
| 1725 |
|\exerciseconfig{composenamedproblem}[2]|\\ |
| 1726 |
| {#1\getexerciseconfig{composenamedproblemdelim} #2}| |
| 1727 |
\end{tabular} |
| 1728 |
\end{center} |
| 1729 |
This checks whether the title is empty. |
| 1730 |
If no title is given use the configuration |composebareproblem| |
| 1731 |
to compose ``Problem \#'', |
| 1732 |
where the term ``Problem'' is made abstract |
| 1733 |
by the configuration |termproblem| |
| 1734 |
(e.g.\ to support internationalisation). |
| 1735 |
If a title is given use the configuration |composenamedproblem| |
| 1736 |
to compose ``\#. \textit{title}''. |
| 1737 |
|
| 1738 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1739 |
\paragraph{Conditionals.} |
| 1740 |
|
| 1741 |
\DescribeMacro{\exerciseifempty} |
| 1742 |
\DescribeMacro{\exerciseifnotempty} |
| 1743 |
Handy conditional commands to check |
| 1744 |
whether an expression \textit{expr} is empty are: |
| 1745 |
\begin{center} |
| 1746 |
\begin{tabular}{l} |
| 1747 |
|\exerciseifempty{|\textit{expr}|}|% |
| 1748 |
|{|\textit{empty code}|}{|\textit{filled code}|}|\\ |
| 1749 |
|\exerciseifnotempty{|\textit{expr}|}|% |
| 1750 |
|{|\textit{filled code}|}| |
| 1751 |
\end{tabular} |
| 1752 |
\end{center} |
| 1753 |
Their main purpose is to test |
| 1754 |
whether some provided expression \textit{expt} is empty. |
| 1755 |
They expand to the common \TeX{} constructs |
| 1756 |
|\if\else#3\fi| and |\if&\else#2\fi| |
| 1757 |
which work assuming that \textit{expr} is not too exotic |
| 1758 |
(e.g.\ it should not start with the character `|&|' |
| 1759 |
and other special \TeX{} characters or macros are potentially dangerous; |
| 1760 |
also using this within tables can be troublesome; |
| 1761 |
the character `|&|' can be reconfigured by the package option |emptytestchar|). |
| 1762 |
|
| 1763 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1764 |
\paragraph{Decorate Solutions with Boxes.} |
| 1765 |
|
| 1766 |
\DescribeMacro{insertsolutionsbefore} |
| 1767 |
\DescribeMacro{insertsolutionsafter} |
| 1768 |
\DescribeMacro{composetitlesolution...} |
| 1769 |
The following adjustment changes the |
| 1770 |
presentation of solutions to be surrounded by boxes with background colour |
| 1771 |
(thanks to Till Bargheer for the example). |
| 1772 |
This yields an alternative presentation |
| 1773 |
that visually distinguishes problem from solution content. |
| 1774 |
|
| 1775 |
The adjustment uses the package \ctanpkg{tcolorbox} |
| 1776 |
to supply such boxes. The coloured box environment |tcolorbox| is invoked |
| 1777 |
by the customisations |insertsolutionsbefore| and |...after| |
| 1778 |
which are called just before and after a block of solutions is: |
| 1779 |
\begin{center} |
| 1780 |
\begin{tabular}{l} |
| 1781 |
|\RequirePackage{tcolorbox}|\\ |
| 1782 |
|\tcbuselibrary{breakable}|\\ |
| 1783 |
|\exerciseconfig{insertsolutionsbefore}{%|\\ |
| 1784 |
| \begin{tcolorbox}[breakable,boxrule=0.25pt]}|\\ |
| 1785 |
|\exerciseconfig{insertsolutionsafter}{\end{tcolorbox}}|\\ |
| 1786 |
|\exerciseconfig{composetitlesolutionsingle}[2]{}| |
| 1787 |
\end{tabular} |
| 1788 |
\end{center} |
| 1789 |
With the highlighting of solutions by boxes, |
| 1790 |
the default introductory statement ``Solution:'' |
| 1791 |
(when |solutionbelow| is |here| or |subproblem|) |
| 1792 |
of a solution block becomes obsolete. |
| 1793 |
This is achieved by removing the content of |composetitlesolutionsingle| |
| 1794 |
(or similar composition definitions if |solutionbelow| is set otherwise). |
| 1795 |
|
| 1796 |
\DescribeMacro{solutionpointsat} |
| 1797 |
\DescribeMacro{insertpointsmargin} |
| 1798 |
Note that displaying points in the margin would have to be adjusted |
| 1799 |
because the plain \LaTeX\ command |\marginpar| does not work |
| 1800 |
inside a |tcolorbox| (due to nested floats). |
| 1801 |
If this combination is desired, |
| 1802 |
one should adjust the placement of margin paragraphs |
| 1803 |
to the package \ctanpkg{marginnote}: |
| 1804 |
\begin{center} |
| 1805 |
\begin{tabular}{l} |
| 1806 |
|\exercisestyle{solutionpointsat=margin}|\\ |
| 1807 |
|\RequirePackage{marginnote}|\\ |
| 1808 |
|\exerciseconfig{insertpointsmargin}[1]{\marginnote{\footnotesize#1}}| |
| 1809 |
\end{tabular} |
| 1810 |
\end{center} |
| 1811 |
|
| 1812 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1813 |
\iffalse |
| 1814 |
\paragraph{Further Ideas.} |
| 1815 |
|
| 1816 |
\begin{itemize} |
| 1817 |
\item Optional Starred |
| 1818 |
\item Collections |
| 1819 |
\item Keep list of tags per sheet. Code to loop through list. Manuel Benz |
| 1820 |
\end{itemize} |
| 1821 |
|
| 1822 |
\fi |
| 1823 |
|
| 1824 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1825 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1826 |
\section{Information} |
| 1827 |
|
| 1828 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1829 |
\subsection{Copyright} |
| 1830 |
|
| 1831 |
Copyright \copyright{} \thecopyright/ |
| 1832 |
|
| 1833 |
This work may be distributed and/or modified under the |
| 1834 |
conditions of the \LaTeX{} Project Public License, either version 1.3 |
| 1835 |
of this license or (at your option) any later version. |
| 1836 |
The latest version of this license is in |
| 1837 |
\url{https://www.latex-project.org/lppl.txt} |
| 1838 |
and version 1.3c or later is part of all distributions of \LaTeX{} |
| 1839 |
version 2008 or later. |
| 1840 |
|
| 1841 |
This work has the LPPL maintenance status `maintained'. |
| 1842 |
|
| 1843 |
The Current Maintainer of this work is Niklas Beisert. |
| 1844 |
|
| 1845 |
This work consists of the files |
| 1846 |
|README.txt|, \verbpkg|.ins| and \verbpkg|.dtx| |
| 1847 |
as well as the derived files listed below. |
| 1848 |
|
| 1849 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1850 |
\subsection{Files and Installation} |
| 1851 |
|
| 1852 |
The package consists of the files: |
| 1853 |
\begin{longtable}{ll} |
| 1854 |
|README.txt| & readme file \\ |
| 1855 |
\verbpkg|.ins| & installation file \\ |
| 1856 |
\verbpkg|.dtx| & source file \\ |
| 1857 |
\verbpkg|.sty| & package file \\ |
| 1858 |
\verbpkg|.tex| & reference manual file \\ |
| 1859 |
\verbpkg|.pdf| & reference manual \\ |
| 1860 |
\verbpkg|-src.tex| & source code documentation file \\ |
| 1861 |
\verbpkg|-src.pdf| & source code documentation \\ |
| 1862 |
\verbpkg|-samp.tex| & sample file \\ |
| 1863 |
\verbpkg|-ser.tex| & multipart sample main file \\ |
| 1864 |
\verbpkg|-ser-0|\textit{n}|.tex| & multipart sample sheet |
| 1865 |
\textit{n}=|1|, |2|, |3| \\ |
| 1866 |
\verbpkg|-ser-aa.tex| & multipart sample unused problems \\ |
| 1867 |
\verbpkg|-ser-p|\textit{x}|.tex| & multipart sample problem |
| 1868 |
\textit{x}=|e|, |f| \\ |
| 1869 |
\verbpkg|-ser.sh| & multipart sample compile script \\ |
| 1870 |
\verbpkg|-ser.mak| & multipart sample makefile \\ |
| 1871 |
\end{longtable} |
| 1872 |
The distribution consists of the files |
| 1873 |
|README.txt|, \verbpkg|.ins| and \verbpkg|.dtx|. |
| 1874 |
\begin{itemize} |
| 1875 |
\item |
| 1876 |
Run \LaTeX{} on \verbpkg|.ins| to create the package \verbpkg|.sty| |
| 1877 |
and further documentation files. |
| 1878 |
\item |
| 1879 |
Copy the file \verbpkg|.sty| to an appropriate directory of your \LaTeX{} |
| 1880 |
distribution, e.g.\ \textit{texmf-root}|/tex/latex/|\verbpkg. |
| 1881 |
\item |
| 1882 |
Alternatively, you may copy \verbpkg|.sty| to your project directory. |
| 1883 |
\item |
| 1884 |
Run (pdf)\LaTeX{} on \verbpkg|.dtx| |
| 1885 |
to compile the documentation \verbpkg|.pdf| (this file). |
| 1886 |
\end{itemize} |
| 1887 |
|
| 1888 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1889 |
\subsection{Related Packages} |
| 1890 |
|
| 1891 |
The package makes use of other packages available at CTAN: |
| 1892 |
\begin{itemize} |
| 1893 |
\item |
| 1894 |
This package relies on some functionality of the package \ctanpkg{verbatim} |
| 1895 |
to read verbatim code from the \LaTeX{} source without expansion of macros. |
| 1896 |
Compatibility with the \ctanpkg{verbatim} package |
| 1897 |
has been tested with v1.5q (\markdate{2014-10-28}). |
| 1898 |
\item |
| 1899 |
This package uses the package \ctanpkg{xkeyval} |
| 1900 |
to process the options for the package, environments and macros. |
| 1901 |
Compatibility with the \ctanpkg{xkeyval} package |
| 1902 |
has been tested with v2.7a (\markdate{2014-12-03}). |
| 1903 |
\item |
| 1904 |
This package can use the package \ctanpkg{hyperref} |
| 1905 |
to include hyperlinks between problems and solutions. |
| 1906 |
Compatibility with the \ctanpkg{hyperref} package |
| 1907 |
has been tested with v6.88e (\markdate{2018-11-30}). |
| 1908 |
\item |
| 1909 |
This package can use the package \ctanpkg{amstext} |
| 1910 |
(which is automatically loaded by \ctanpkg{amsmath}) |
| 1911 |
to display text within equations. |
| 1912 |
Compatibility with the \ctanpkg{amstext} package |
| 1913 |
has been tested with v2.01 (\markdate{2000-06-29}). |
| 1914 |
\item |
| 1915 |
This package uses the command |\currfilename| |
| 1916 |
provided by the package \ctanpkg{currfile} (if available and loaded) |
| 1917 |
to indicate the \LaTeX{} source file in the generated metapost file. |
| 1918 |
Compatibility with the \ctanpkg{currfile} package |
| 1919 |
has been tested with v0.7c (\markdate{2015-04-23}). |
| 1920 |
\item |
| 1921 |
This package can use the package \ctanpkg{metastr} |
| 1922 |
to write pdf metadata and to handle basic translations. |
| 1923 |
Compatibility with the \ctanpkg{metastr} package |
| 1924 |
has been tested with v1.0 (\markdate{2020-02-06}). |
| 1925 |
\end{itemize} |
| 1926 |
|
| 1927 |
There are several other \LaTeX{} packages |
| 1928 |
which offer a similar functionality |
| 1929 |
varying largely in scope and sophistication: |
| 1930 |
\begin{itemize} |
| 1931 |
\item |
| 1932 |
The package \ctanpkg{exsheets} |
| 1933 |
and its successor \ctanpkg{xsim} |
| 1934 |
provide a \LaTeX{} 3 style for typesetting exercises with solutions. |
| 1935 |
They offer options to |
| 1936 |
hide or delay solutions, |
| 1937 |
print only specific problems, |
| 1938 |
deal with points, |
| 1939 |
specify metadata, |
| 1940 |
handle exercise collections, |
| 1941 |
as well as some more specific options. |
| 1942 |
They allow to adjust the layout and choose among predefined ones. |
| 1943 |
\item |
| 1944 |
The package \ctanpkg{exercise} |
| 1945 |
provides a style for typesetting exercises with solutions. |
| 1946 |
It offers many options to |
| 1947 |
hide or delay solutions, |
| 1948 |
print only specific problems, |
| 1949 |
specify some metadata |
| 1950 |
as well as some more specific options. |
| 1951 |
It allows to customise the layout. |
| 1952 |
\item |
| 1953 |
The package \ctanpkg{exercises} |
| 1954 |
provides a style for typesetting exercises with solutions. |
| 1955 |
It offers options to hide solutions and deal with points. |
| 1956 |
It allows basic customisation of the layout. |
| 1957 |
\item |
| 1958 |
The package \ctanpkg{exam} |
| 1959 |
provides a document class for typesetting exams conveniently. |
| 1960 |
It offers many options to hide solutions, deal with points |
| 1961 |
and deal with other exam-specific tasks. |
| 1962 |
It allows to adjust the layout and choose among predefined ones. |
| 1963 |
\item |
| 1964 |
The package \ctanpkg{probsoln} |
| 1965 |
provides a style for typesetting exercises with solutions |
| 1966 |
which are stored in a collection. |
| 1967 |
It offers options to |
| 1968 |
hide solutions |
| 1969 |
and to assemble problems from an external collection. |
| 1970 |
\item |
| 1971 |
The packages |
| 1972 |
\ctanpkg{uebungsblatt}, |
| 1973 |
\ctanpkg{uassign}, |
| 1974 |
\ctanpkg{mathexam}, |
| 1975 |
\ctanpkg{exsol}, |
| 1976 |
\href{https://github.com/mbauman/homework}{\markpkg{homework}}, |
| 1977 |
\href{https://gist.github.com/jhwilson/1278588}{\markpkg{jhwhw}} |
| 1978 |
provide basic functionality for somewhat more particular situations. |
| 1979 |
\end{itemize} |
| 1980 |
See CTAN categories \ctanref{topic/exercise}{exercise} |
| 1981 |
and \ctanref{topic/exam}{exam} |
| 1982 |
for further up-to-date packages. |
| 1983 |
|
| 1984 |
The philosophy of the present package is to |
| 1985 |
define a low-level framework to describe exercises with solutions |
| 1986 |
to be used in various situations. |
| 1987 |
The aim is to provide the means to describe the content |
| 1988 |
(problems, solutions, sheets) in a simple fashion |
| 1989 |
and separate it from the various layout definitions and choices |
| 1990 |
which will define the appearance of the content. |
| 1991 |
The interface was designed to reduce potential conflict |
| 1992 |
with other packages and definitions. |
| 1993 |
The package itself provides a functional basic layout |
| 1994 |
rather than an elaborate or particularly appealing one. |
| 1995 |
However, it provides means to adjust the basic layout in many ways and |
| 1996 |
to predefine custom layout schemes. |
| 1997 |
The package offers most of the functionality of the above packages, |
| 1998 |
but (presently) misses out on some more advanced features. |
| 1999 |
See \secref{sec:customisation} on customisation assistance and examples |
| 2000 |
and \secref{sec:suggestions} for feature suggestions. |
| 2001 |
|
| 2002 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2003 |
\subsection{Feature Suggestions} |
| 2004 |
\label{sec:suggestions} |
| 2005 |
|
| 2006 |
The following is a list of features which may be useful for future |
| 2007 |
versions of this package: |
| 2008 |
\begin{itemize} |
| 2009 |
\item |
| 2010 |
Define structures for multiple-choice questions. |
| 2011 |
\item |
| 2012 |
Add more guidance to \secref{sec:guides} on customisation settings. |
| 2013 |
\item |
| 2014 |
Add more examples of customisation settings to achieve specific goals |
| 2015 |
to \secref{sec:examples}. |
| 2016 |
Please send suggestions. |
| 2017 |
\item |
| 2018 |
Option to hide problem text while maintaining access to embedded solutions |
| 2019 |
(for a version containing only solutions): |
| 2020 |
this is difficult to implement because the problem environment |
| 2021 |
cannot simply be discarded, but would have to be scanned very carefully |
| 2022 |
for the embedded solution; |
| 2023 |
instead process problems to some document and save solutions to file, |
| 2024 |
then read solutions from different document. |
| 2025 |
\end{itemize} |
| 2026 |
|
| 2027 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2028 |
\subsection{Revision History} |
| 2029 |
|
| 2030 |
\iffalse |
| 2031 |
|
| 2032 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2033 |
\paragraph{vN.N.N+:} \markdate{20YY-MM-DD} |
| 2034 |
|
| 2035 |
\begin{itemize} |
| 2036 |
\item |
| 2037 |
\ldots |
| 2038 |
\end{itemize} |
| 2039 |
|
| 2040 |
\fi |
| 2041 |
|
| 2042 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2043 |
\paragraph{v3.5.3:} \markdate{2026-03-23} |
| 2044 |
|
| 2045 |
\begin{itemize} |
| 2046 |
\item |
| 2047 |
split off source code documentation into separate document \verbpkg|-src| |
| 2048 |
\item |
| 2049 |
package maintenance |
| 2050 |
\end{itemize} |
| 2051 |
|
| 2052 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2053 |
\paragraph{v3.5.2:} \markdate{2026-01-22} |
| 2054 |
|
| 2055 |
\begin{itemize} |
| 2056 |
\item |
| 2057 |
distinguish between problem, subproblem and solutions |
| 2058 |
for display of points in margin |
| 2059 |
\end{itemize} |
| 2060 |
|
| 2061 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2062 |
\paragraph{v3.5.1:} \markdate{2025-03-25} |
| 2063 |
|
| 2064 |
\begin{itemize} |
| 2065 |
\item |
| 2066 |
maintenance and manual update |
| 2067 |
\end{itemize} |
| 2068 |
|
| 2069 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2070 |
\paragraph{v3.5:} \markdate{2024-10-18} |
| 2071 |
|
| 2072 |
\begin{itemize} |
| 2073 |
\item |
| 2074 |
more convenient delimiter configuration |compose...delim| for various items |
| 2075 |
\item |
| 2076 |
composition of problem titles in |composetitleproblem| |
| 2077 |
split up further into the configurations |composebareproblem| |
| 2078 |
and |composenamedproblem|; |
| 2079 |
to enable delimiter `.' for problems without a name, use |
| 2080 |
\begin{center} |
| 2081 |
|\exerciseconfig{composebareproblemdelim}{.}| |
| 2082 |
\end{center} |
| 2083 |
\item |
| 2084 |
style |subproblemdelimitem| added |
| 2085 |
to shift delimiter `)' from subproblem reference labels |
| 2086 |
to subproblem item composition. |
| 2087 |
\item |
| 2088 |
|composetitlesolutionsproblemmulti| improved |
| 2089 |
(thanks to Daniel Wegmann for pointing out insufficient behaviour) |
| 2090 |
\item |
| 2091 |
option |forproblem| for |solution| |
| 2092 |
to release association to previous subproblem |
| 2093 |
\item |
| 2094 |
option to |disable| particular subproblems and solutions |
| 2095 |
including following |solution| block |
| 2096 |
\item |
| 2097 |
handling of first solutions within a problem block |
| 2098 |
\end{itemize} |
| 2099 |
|
| 2100 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2101 |
\paragraph{v3.4:} \markdate{2020-02-24} |
| 2102 |
|
| 2103 |
\begin{itemize} |
| 2104 |
\item |
| 2105 |
lists of sheets, problems and subproblems; |
| 2106 |
list iterators |
| 2107 |
\item |
| 2108 |
tags for subproblems, tag customisation |
| 2109 |
\item |
| 2110 |
interaction with package \ctanpkg{metastr} |
| 2111 |
\item |
| 2112 |
minor fixes |
| 2113 |
\end{itemize} |
| 2114 |
|
| 2115 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2116 |
\paragraph{v3.31:} \markdate{2020-01-11} |
| 2117 |
|
| 2118 |
\begin{itemize} |
| 2119 |
\item |
| 2120 |
|onlysolutions| environment for solution mode content |
| 2121 |
\item |
| 2122 |
sample multipart setup streamlined |
| 2123 |
\end{itemize} |
| 2124 |
|
| 2125 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2126 |
\paragraph{v3.3:} \markdate{2019-06-15} |
| 2127 |
|
| 2128 |
\begin{itemize} |
| 2129 |
\item |
| 2130 |
control display of |problem| environments via |
| 2131 |
package option |problembuf|: |
| 2132 |
manual display, write to file, disable individual problems |
| 2133 |
\item |
| 2134 |
|solutionbelow| mode |here*| superseded by |
| 2135 |
package option |solutionbuf| |
| 2136 |
\item |
| 2137 |
display total points within solution: |solutionpointsat| |
| 2138 |
(thanks to Till Bargheer for suggestion) |
| 2139 |
\item |
| 2140 |
read points for current sheet, (sub)problem and solution |
| 2141 |
(thanks to Johannes Hahn for suggestion) |
| 2142 |
\item |
| 2143 |
case switch for bonus points |
| 2144 |
(thanks to Johannes Hahn for suggestion) |
| 2145 |
\item |
| 2146 |
option to |disable| particular problems, |
| 2147 |
control by hook function |
| 2148 |
(thanks to Manuel Benz for suggestion) |
| 2149 |
\item |
| 2150 |
provided interface |\showfracpoints| and |\exerciseconfig{frac}| |
| 2151 |
for fractional points display |
| 2152 |
\item |
| 2153 |
filename extensions configurable |
| 2154 |
\end{itemize} |
| 2155 |
|
| 2156 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2157 |
\paragraph{v3.2:} \markdate{2019-05-01} |
| 2158 |
|
| 2159 |
\begin{itemize} |
| 2160 |
\item |
| 2161 |
bonus points can be specified as |
| 2162 |
|points=|[\textit{regular}][|+|\textit{bonus}] |
| 2163 |
\item |
| 2164 |
|solutionbelow| mode |here*| added |
| 2165 |
for direct processing of the solution environment |
| 2166 |
\item |
| 2167 |
multipart sample added |
| 2168 |
\end{itemize} |
| 2169 |
|
| 2170 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2171 |
\paragraph{v3.11:} \markdate{2019-04-15} |
| 2172 |
|
| 2173 |
\begin{itemize} |
| 2174 |
\item |
| 2175 |
fix interaction with |
| 2176 |
package \ctanpkg{calc} |
| 2177 |
(thanks to Johannes Hahn for bug report) |
| 2178 |
\item |
| 2179 |
fix style |fracpoints| in combination |
| 2180 |
with some [|sub|]|problempointsat| choices |
| 2181 |
(thanks to Johannes Hahn for bug report) |
| 2182 |
\item |
| 2183 |
fix spacing for [|sub|]|problempointsat=margin| |
| 2184 |
(thanks to Johannes Hahn for bug report) |
| 2185 |
\end{itemize} |
| 2186 |
|
| 2187 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2188 |
\paragraph{v3.1:} \markdate{2019-01-21} |
| 2189 |
|
| 2190 |
\begin{itemize} |
| 2191 |
\item |
| 2192 |
alternate placement modes for solutions |
| 2193 |
\item |
| 2194 |
fixed expansion of problem title |
| 2195 |
\item |
| 2196 |
reset font size for problem text |
| 2197 |
\end{itemize} |
| 2198 |
|
| 2199 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2200 |
\paragraph{v3.0:} \markdate{2019-01-16} |
| 2201 |
|
| 2202 |
\begin{itemize} |
| 2203 |
\item |
| 2204 |
renamed to \verbpkg|.sty| |
| 2205 |
\item |
| 2206 |
first version published on CTAN |
| 2207 |
\item |
| 2208 |
overhaul and streamline interface |
| 2209 |
\item |
| 2210 |
solution processing remodelled |
| 2211 |
\item |
| 2212 |
changed metadata handling |
| 2213 |
\item |
| 2214 |
changed and generalised points handling |
| 2215 |
\item |
| 2216 |
generalised sectioning layout |
| 2217 |
\item |
| 2218 |
changed layout specification model |
| 2219 |
\item |
| 2220 |
insert hyperlinks using \ctanpkg{hyperref} |
| 2221 |
\item |
| 2222 |
manual, example and installation package added |
| 2223 |
\end{itemize} |
| 2224 |
|
| 2225 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2226 |
\paragraph{v2.0 -- v2.6:} \markdate{2014-10-03} -- \markdate{2018-11-05} |
| 2227 |
|
| 2228 |
\begin{itemize} |
| 2229 |
\item |
| 2230 |
changed metadata interface |
| 2231 |
\item |
| 2232 |
broadened scope |
| 2233 |
\item |
| 2234 |
added more layout options |
| 2235 |
\item |
| 2236 |
added more metadata |
| 2237 |
\item |
| 2238 |
added sheet and problem tags |
| 2239 |
\item |
| 2240 |
add and remember points |
| 2241 |
\end{itemize} |
| 2242 |
|
| 2243 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2244 |
\paragraph{v1.1 -- v1.6:} \markdate{2014-08-07} -- \markdate{2014-09-14} |
| 2245 |
|
| 2246 |
\begin{itemize} |
| 2247 |
\item |
| 2248 |
renamed to |nbprob.sty| |
| 2249 |
\item |
| 2250 |
added metadata |
| 2251 |
\item |
| 2252 |
added points |
| 2253 |
\item |
| 2254 |
added layout configuration |
| 2255 |
\item |
| 2256 |
removed specific macros |
| 2257 |
\end{itemize} |
| 2258 |
|
| 2259 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2260 |
\paragraph{v1.0 -- v1.02:} \markdate{2011-09-23} -- \markdate{2013-03-17} |
| 2261 |
|
| 2262 |
\begin{itemize} |
| 2263 |
\item |
| 2264 |
first version as |problems.cls| |
| 2265 |
\item |
| 2266 |
dedicated layout and macros for author's exercise sheets |
| 2267 |
\end{itemize} |
| 2268 |
|
| 2269 |
|
| 2270 |
\end{document} |
| 2271 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2272 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2273 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2274 |
\endinput |
| 2275 |
%% |
| 2276 |
%% End of file `exframe.tex'. |