summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/README6
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdfbin679273 -> 677932 bytes
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex260
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets.sty106
4 files changed, 212 insertions, 160 deletions
diff --git a/Master/texmf-dist/doc/latex/exsheets/README b/Master/texmf-dist/doc/latex/exsheets/README
index f2d1cb1b91c..40dd109879c 100644
--- a/Master/texmf-dist/doc/latex/exsheets/README
+++ b/Master/texmf-dist/doc/latex/exsheets/README
@@ -1,9 +1,9 @@
--------------------------------------------------------------------------
-EXSHEETS 2014/09/14
+EXSHEETS 2014/10/14
bundled packages:
-the EXSHEETS package v0.16
+the EXSHEETS package v0.17
Yet another package for the creation of exercise sheets
-the EXSHEETS-LISTINGS package v0.16
+the EXSHEETS-LISTINGS package v0.17
Using listings in exsheets
--------------------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
index f82b8eccbcc..1be4dfe0ada 100644
--- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
+++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
index ee83c00a510..4780f0d809f 100644
--- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
+++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
@@ -340,124 +340,135 @@ released independently. You can find it as every other package on \ctan\ and
in a full \TeX~Live or \hologo{MiKTeX} installation.
\section{News}
-\subsection{Version 0.7}
-With version~0.7 there has been a potentially breaking change: the
-\code{tasks} environment previously provided by \ExSheets\ has been extracted
-into a package of its own. This does not change any syntax \emph{per
- se}. However, if you used custom settings then you'll probably run into some
-problems. The options for the environment are no longer set with
-\cs{SetupExSheets} but with \cs{settasks}. Also the object that is used for
-the list template and its instances has been renamed from
-\code{exsheets-tasks} into \code{tasks}.
-
-What's probably even more of a breaking change is a syntax difference of the
-\code{tasks} environment: the optional argument for the number of columns is
-\emph{no longer set in braces but parentheses}. This is deliberate as it
-reflects the optional nature of the argument better and is consistent with the
-syntax of \cs{NewTasks}, too.
-
-Additionally the labels of the list got an additional offset of \code{1ex}
-from the items which will lead to slightly different output. In some cases
-this might actually lead to the most annoying changes. In this case say
-\cs{settasks}\Marg{label-offset=0pt} which should cure things again.
-
-I am very sorry for any inconvenience! I am trying to keep such changes as
-minimal and rare as possibly. However, it is not always avoidable when a
-package is new and still a child. It will grow up eventually.
-
-\ExSheets' other packages -- \href{tasks_en.pdf}{\Tasks} and
-\href{cntformats_en.pdf}{\cntformats} -- have gotten their own documentation
-which are essentially extracted from this very document you're reading now.
-This manual contains links to the respective manuals.
-
-\subsection{Version v0.9i}
-The \pkg{translations} package~\cite{pkg:translations} is no longer part of
-the \ExSheets\ bundle. From now on (July~17.\@ 2013) it is provided as a
-package of its own.
-
-\subsection{Version 0.10}
-The \ExSheets\ family has got a new member: \ExSheetslistings. This package
-proposes a solution for the problem of using verbatim material in \ExSheets'
-\env{question} and \env{solution} environments. It is presented in
-part~\ref{part:listings}.
-
-Question now can get subtitles that are printed if the heading instance
-supports it, see section~\ref{sec:subtitles-questions}.
-
-\subsection{Version 0.11}
-The commands \cs{GetQuestionClass} and \cs{PrintQuestionClassTF} have been
-added. They're explained in section~\ref{sec:retr-class-value}.
-
-\subsection{Version 0.12}
-The \option{auto-label} is now more flexible to allow the use together with
-packages \pkg{cleveref}.
-
-Question properties can now be retrieved before the question is printed (by
-writing the properties to the \code{aux} file).
-
-\subsection{Version 0.13}
-New options:
-\begin{itemize}
- \item \option{chapter-hook} allows to add code to the list of solutions when
- the solutions of a new chapter are printed, see
- section~\ref{sec:solutions-print-all}.
- \item \option{section-hook} allows to add code to the list of solutions when
- the solutions of a new section are printed, see
- section~\ref{sec:solutions-print-all}.
-\end{itemize}
-
-\subsection{Version 0.14}
-New options:
-\begin{itemize}
- \item New option \option{pre-hook} to the \env{question} environment that
- allows to add code directly before the question body, see
- section~\ref{sec:opti-ques-envir}.
- \item New option \option{post-hook} to the \env{question} environment that
- allows to add code directly after the question body, see
- section~\ref{sec:opti-ques-envir}.
- \item New command \cs{ExSheetsHeading}, see
- section~\ref{sec:using-an-exsheets}.
- \item New pre-defined question properties \code{question-body},
- \code{bonus-points} and \code{counter}, see
- section~\ref{sec:additional_info}.
- \item New option \option{save-to-aux}, see section
- \ref{sec:additional_info}.
-\end{itemize}
+\begin{description}
+\item[Version 0.7]
+ With version~0.7 there has been a potentially breaking change: the
+ \code{tasks} environment previously provided by \ExSheets\ has been
+ extracted into a package of its own. This does not change any syntax
+ \emph{per se}. However, if you used custom settings then you'll probably run
+ into some problems. The options for the environment are no longer set with
+ \cs{SetupExSheets} but with \cs{settasks}. Also the object that is used for
+ the list template and its instances has been renamed from
+ \code{exsheets-tasks} into \code{tasks}.
+
+ What's probably even more of a breaking change is a syntax difference of the
+ \code{tasks} environment: the optional argument for the number of columns is
+ \emph{no longer set in braces but parentheses}. This is deliberate as it
+ reflects the optional nature of the argument better and is consistent with
+ the syntax of \cs{NewTasks}, too.
+
+ Additionally the labels of the list got an additional offset of \code{1ex}
+ from the items which will lead to slightly different output. In some cases
+ this might actually lead to the most annoying changes. In this case say
+ \cs{settasks}\Marg{label-offset=0pt} which should cure things again.
+
+ I am very sorry for any inconvenience! I am trying to keep such changes as
+ minimal and rare as possibly. However, it is not always avoidable when a
+ package is new and still a child. It will grow up eventually.
+
+ \ExSheets' other packages -- \href{tasks_en.pdf}{\Tasks} and
+ \href{cntformats_en.pdf}{\cntformats} -- have gotten their own documentation
+ which are essentially extracted from this very document you're reading now.
+ This manual contains links to the respective manuals.
+
+\item[Version v0.9i]
+ The \pkg{translations} package~\cite{pkg:translations} is no longer part of
+ the \ExSheets\ bundle. From now on (July~17.\@ 2013) it is provided as a
+ package of its own.
+
+\item[Version 0.10]
+ The \ExSheets\ family has got a new member: \ExSheetslistings. This package
+ proposes a solution for the problem of using verbatim material in \ExSheets'
+ \env{question} and \env{solution} environments. It is presented in
+ part~\ref{part:listings}.
+
+ Question now can get subtitles that are printed if the heading instance
+ supports it, see section~\ref{sec:subtitles-questions}.
+
+\item[Version 0.11]
+ The commands \cs{GetQuestionClass} and \cs{PrintQuestionClassTF} have been
+ added. They're explained in section~\ref{sec:retr-class-value}.
+
+\item[Version 0.12]
+ The \option{auto-label} is now more flexible to allow the use together with
+ packages \pkg{cleveref}.
+
+ Question properties can now be retrieved before the question is printed (by
+ writing the properties to the \code{aux} file).
+
+\item[Version 0.13]
+ New options:
+ \begin{itemize}
+ \item \option{chapter-hook} allows to add code to the list of solutions
+ when the solutions of a new chapter are printed, see
+ section~\ref{sec:solutions-print-all}.
+ \item \option{section-hook} allows to add code to the list of solutions
+ when the solutions of a new section are printed, see
+ section~\ref{sec:solutions-print-all}.
+ \end{itemize}
+
+\item[Version 0.14]
+ New options:
+ \begin{itemize}
+ \item New option \option{pre-hook} to the \env{question} environment that
+ allows to add code directly before the question body, see
+ section~\ref{sec:opti-ques-envir}.
+ \item New option \option{post-hook} to the \env{question} environment that
+ allows to add code directly after the question body, see
+ section~\ref{sec:opti-ques-envir}.
+ \item New command \cs{ExSheetsHeading}, see
+ section~\ref{sec:using-an-exsheets}.
+ \item New pre-defined question properties \code{question-body},
+ \code{bonus-points} and \code{counter}, see
+ section~\ref{sec:additional_info}.
+ \item New option \option{save-to-aux}, see
+ section~\ref{sec:additional_info}.
+ \end{itemize}
+
+\item[Version 0.15]
+ \begin{itemize}
+ \item The packages \pkg{tasks} and \pkg{cntformats} have been removed from
+ the bundle and are now distributed as packages of their own.
+ \item The options \option*{load-headings} and \option*{load-tasks} have
+ been dropped. The optional functionality they provided is now provided
+ all the time.
+ \item New command \cs{IfQuestionPropertyTF}, see
+ section~\ref{sec:additional_info}.
+ \end{itemize}
+
+\item[Version 0.16]
+ New options/changes:
+ \begin{itemize}
+ \item The option \option{pre-hook} to the \env{question} environment now
+ places its contents before the question heading, see
+ section~\ref{sec:opti-ques-envir}.
+ \item New option \option{pre-body-hook} to the \env{question} environment
+ which adds its contents before the question body, see
+ section~\ref{sec:opti-ques-envir}.
+ \item New option \option{post-body-hook} to the \env{question} environment
+ which adds its contents after the question body, see
+ section~\ref{sec:opti-ques-envir}.
+ \item New option \option{pre-hook} to the \env{solution} environment which
+ adds code before a solution, see section~\ref{sec:opti-soli-envir}.
+ \item New option \option{post-hook} to the \env{solution} environment which
+ adds code after a solution, see section~\ref{sec:opti-soli-envir}.
+ \item New option \option{pre-body-hook} to the \env{solution} environment
+ which adds its contents before the solution body, see
+ section~\ref{sec:opti-soli-envir}.
+ \item New option \option{post-body-hook} to the \env{solution} environment
+ which adds its contents after the solution body, see
+ section~\ref{sec:opti-soli-envir}.
+ \end{itemize}
+
+\item[Version 0.17]
+ New option:
+ \begin{itemize}
+ \item The option \option{use-saved-counter-format} has been introduced. It
+ is described in section~\ref{sec:solutions} on
+ page~\pageref{option:use-saved-counter-format}.
+ \end{itemize}
+\end{description}
-\subsection{Version 0.15}
-\begin{itemize}
- \item The packages \pkg{tasks} and \pkg{cntformats} have been removed from
- the bundle and are now distributed as packages of their own.
- \item The options \option*{load-headings} and \option*{load-tasks} have been
- dropped. The optional functionality they provided is now provided all the
- time.
- \item New command \cs{IfQuestionPropertyTF}, see
- section~\ref{sec:additional_info}.
-\end{itemize}
-
-\subsection{Version 0.16}
-New options/changes:
-\begin{itemize}
- \item The option \option{pre-hook} to the \env{question} environment now
- places its contents before the question heading, see
- section~\ref{sec:opti-ques-envir}.
- \item New option \option{pre-body-hook} to the \env{question} environment
- which adds its contents before the question body, see
- section~\ref{sec:opti-ques-envir}.
- \item New option \option{post-body-hook} to the \env{question} environment
- which adds its contents after the question body, see
- section~\ref{sec:opti-ques-envir}.
- \item New option \option{pre-hook} to the \env{solution} environment which
- adds code before a solution, see section~\ref{sec:opti-soli-envir}.
- \item New option \option{post-hook} to the \env{solution} environment which
- adds code after a solution, see section~\ref{sec:opti-soli-envir}.
- \item New option \option{pre-body-hook} to the \env{solution} environment
- which adds its contents before the solution body, see
- section~\ref{sec:opti-soli-envir}.
- \item New option \option{post-body-hook} to the \env{solution} environment
- which adds its contents after the solution body, see
- section~\ref{sec:opti-soli-envir}.
-\end{itemize}
\section{Thanks}
I need to thank the many users who gave me feedback so far! For one thing
@@ -1015,6 +1026,18 @@ They might come in handy if you want two versions of an exercise sheet, one
with the exercises and one with the solutions, and you want to add different
titles to these versions, for instance.
+When solutions are saved a lot of information is saved. One of them is the
+current counter format. The following option determines wether the saved
+counter format or the currently active one is used when \cs{printsolutions} is
+called:
+\begin{options}
+ \keybool{use-saved-counter-format}\Default{false}
+ \sinceversion{0.17}When set to true the counter format of solutions
+ printed by \cs{printsolutions}\label{option:use-saved-counter-format} are
+ independent from the setting of \option{counter-format}. The saved format
+ is used instead.
+\end{options}
+
\subsection{Print all}\label{sec:solutions-print-all}
The first and easiest usage of \cs{printsolutions} is the following:
\begin{sourcecode}
@@ -1030,7 +1053,7 @@ explained in the next sections.
\printsolutions
\end{example}
-Two options aloow to add code to the list of solutions when used with
+Two options allow to add code to the list of solutions when used with
\cs{printsolutions}\Oarg{all} (which is the same as using it without option):
\begin{options}
@@ -1044,7 +1067,6 @@ Two options aloow to add code to the list of solutions when used with
corresponding section are printed).
\end{options}
-
\subsection{Print per chapter/section}
\minisec{Current chapter/section}
If you are not creating an exercise sheet or an exam but are writing a
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
index 5f358be1e6c..563a4d10dfd 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
@@ -25,8 +25,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% ----------------------------------------------------------------------------
-\def\exsheets@date{2014/09/14}
-\def\exsheets@version{0.16}
+\def\exsheets@date{2014/10/14}
+\def\exsheets@version{0.17}
\RequirePackage { expl3 , xparse }
\ProvidesExplPackage
@@ -246,7 +246,6 @@
headings .tl_set:N = \l__exsheets_heading_instance_tl ,
load-headings .code:n =
\exsheets_option_dropped:n {load-headings} ,
-% .bool_set:N = \l__exsheets_load_headings_bool ,
headings-format .tl_set:N =
\l_exsheets_heading_title_user_format_tl ,
subtitle-format .tl_set:N =
@@ -795,7 +794,7 @@
}
% ----------------------------------------------------------------------------
-% Aufgaben und Lösungen
+% Aufgaben und L�sungen
\bool_new:N \g__exsheets_questions_use_bool
\bool_gset_true:N \g__exsheets_questions_use_bool
\bool_new:N \l__exsheets_questions_use_bool
@@ -842,21 +841,20 @@
use-#2 .code:n =
{
\bool_gset_true:c { g__exsheets_use_#2_bool }
- \use:c { __exsheets_activate_#2:n } { ##1 }
+ \use:c { __exsheets_activate_#2:n } {##1}
} ,
question / #1 .code:n =
\bool_set_true:c { l__exsheets_questions_#1_bool }
- \tl_set:cn { l__exsheets_questions_#1_tl } { ##1 }
-% \exsheets_set_question_properties:n { #1 = ##1 }
+ \tl_set:cn { l__exsheets_questions_#1_tl } {##1}
}
\cs_new_protected:cpn { __exsheets_activate_#2:n } ##1
{
\prop_gclear:c { g__exsheets_#2_active_prop }
- \seq_set_split:Nnn \l__exsheets_tmpa_seq { , } { ##1 }
+ \seq_set_split:Nnn \l__exsheets_tmpa_seq { , } {##1}
\seq_map_inline:Nn \l__exsheets_tmpa_seq
{
\prop_gput:cnn { g__exsheets_#2_active_prop }
- { ####1 } { \__exsheets_dummy: }
+ {####1} { \__exsheets_dummy: }
}
}
\cs_new_protected:cpn { __exsheets_questions_use_#2: }
@@ -2219,6 +2217,14 @@
\group_end:
}
+\bool_new:N \l__exsheets_use_saved_pattern_bool
+
+\int_new:N \l__exsheets_counter_ch_int
+\int_new:N \l__exsheets_current_ch_int
+\int_new:N \l__exsheets_counter_sec_int
+\int_new:N \l__exsheets_current_sec_int
+\int_new:N \l__exsheets_counter_qu_int
+
\keys_define:nn {exsheets}
{
exsheets_print_solutions .choice: ,
@@ -2231,15 +2237,10 @@
exsheets_print_solutions / byID .code:n =
{ \exsheets_print_solutions_byID:n {#1} } ,
chapter-hook .tl_set:N = \l__exsheets_new_chapter_hook_tl ,
- section-hook .tl_set:N = \l__exsheets_new_section_hook_tl
+ section-hook .tl_set:N = \l__exsheets_new_section_hook_tl ,
+ use-saved-counter-format .bool_set:N = \l__exsheets_use_saved_pattern_bool
}
-\int_new:N \l__exsheets_counter_ch_int
-\int_new:N \l__exsheets_current_ch_int
-\int_new:N \l__exsheets_counter_sec_int
-\int_new:N \l__exsheets_current_sec_int
-\int_new:N \l__exsheets_counter_qu_int
-
\cs_new_protected:Npn \__exsheets_get_sectioning_numbers:
{
\cs_if_exist:NT \chapter
@@ -2262,15 +2263,24 @@
{#1} \l__exsheets_tmpd_tl
\group_begin:
\tl_set_eq:NN \CurrentQuestionID \l__exsheets_tmpc_tl
- \__exsheets_sectioning_hook:nV { ch }
+ \__exsheets_sectioning_hook:nV {ch}
\l__exsheets_new_chapter_hook_tl
- \__exsheets_sectioning_hook:nV { sec }
+ \__exsheets_sectioning_hook:nV {sec}
\l__exsheets_new_section_hook_tl
\group_end:
- \eSaveCounterPatternFrom [ exsheets ]
- \l__exsheets_current_pattern_interpretation_tl
- \l__exsheets_current_pattern_tl
- \l__exsheets_tmpd_tl
+ \bool_if:NTF \l__exsheets_use_saved_pattern_bool
+ {
+ \eSaveCounterPatternFrom [ exsheets ]
+ \l__exsheets_current_pattern_interpretation_tl
+ \l__exsheets_current_pattern_tl
+ \l__exsheets_tmpd_tl
+ }
+ {
+ \eSaveCounterPatternFrom [ exsheets ]
+ \l__exsheets_current_pattern_interpretation_tl
+ \l__exsheets_current_pattern_tl
+ \l__exsheets_qu_counter_pattern_tl
+ }
\__exsheets_print_solution:VVVV
\l__exsheets_current_pattern_tl
\l__exsheets_tmpa_tl
@@ -2445,10 +2455,19 @@
\__exsheets_sectioning_hook:nV { sec }
\l__exsheets_new_section_hook_tl
\group_end:
- \eSaveCounterPatternFrom [ exsheets ]
- \l__exsheets_current_pattern_interpretation_tl
- \l__exsheets_current_pattern_tl
- \l__exsheets_tmpd_tl
+ \bool_if:NTF \l__exsheets_use_saved_pattern_bool
+ {
+ \eSaveCounterPatternFrom [ exsheets ]
+ \l__exsheets_current_pattern_interpretation_tl
+ \l__exsheets_current_pattern_tl
+ \l__exsheets_tmpd_tl
+ }
+ {
+ \eSaveCounterPatternFrom [ exsheets ]
+ \l__exsheets_current_pattern_interpretation_tl
+ \l__exsheets_current_pattern_tl
+ \l__exsheets_qu_counter_pattern_tl
+ }
\__exsheets_print_solution:VVVV
\l__exsheets_current_pattern_tl
\l__exsheets_tmpa_tl
@@ -2466,14 +2485,14 @@
\seq_map_inline:Nn \l__exsheets_solutions_byID_seq
{
\prop_get:NnN \g__exsheets_questions_id_prop
- { ##1 } \l__exsheets_tmpa_tl
+ {##1} \l__exsheets_tmpa_tl
\seq_put_right:NV \l__exsheets_tmpa_seq \l__exsheets_tmpa_tl
}
\bool_if:NT \l__exsheets_print_byID_sorted_bool
{
\seq_sort:Nn \l__exsheets_tmpa_seq
{
- \int_compare:nNnTF { ##1 } > { ##2 }
+ \int_compare:nNnTF {##1} > {##2}
{ \sort_reversed: }
{ \sort_ordered: }
}
@@ -2481,23 +2500,34 @@
\seq_map_inline:Nn \l__exsheets_tmpa_seq
{
\group_begin:
- \tl_if_eq:nnF { ##1 } { \q_no_value }
+ \tl_if_eq:nnF {##1} { \q_no_value }
{
\prop_get:NnNT \g__exsheets_solutions_names_prop
- { ##1 } \l__exsheets_tmpa_tl
+ {##1} \l__exsheets_tmpa_tl
{
\prop_get:NnN \g__exsheets_solutions_content_prop
- { ##1 } \l__exsheets_tmpb_tl
+ {##1} \l__exsheets_tmpb_tl
\prop_get:NnN \g__exsheets_solutions_questions_id_prop
- { ##1 } \l__exsheets_tmpc_tl
+ {##1} \l__exsheets_tmpc_tl
+ \prop_get:NnN \g__exsheets_solutions_counter_prop
+ {##1} \l__exsheets_tmpd_tl
\__exsheets_restore_number_from_and_do:Nnn
\g__exsheets_question_number_prop
- { ##1 }
+ {##1}
{
- \eSaveCounterPatternFrom [ exsheets ]
- \l__exsheets_current_pattern_interpretation_tl
- \l__exsheets_current_pattern_tl
- \l__exsheets_qu_counter_pattern_tl
+ \bool_if:NTF \l__exsheets_use_saved_pattern_bool
+ {
+ \eSaveCounterPatternFrom [ exsheets ]
+ \l__exsheets_current_pattern_interpretation_tl
+ \l__exsheets_current_pattern_tl
+ \l__exsheets_tmpd_tl
+ }
+ {
+ \eSaveCounterPatternFrom [ exsheets ]
+ \l__exsheets_current_pattern_interpretation_tl
+ \l__exsheets_current_pattern_tl
+ \l__exsheets_qu_counter_pattern_tl
+ }
\__exsheets_print_solution:VVVV
\l__exsheets_current_pattern_tl
\l__exsheets_tmpa_tl
@@ -3121,6 +3151,7 @@ HISTORY:
- fix issue #22
- fix issue #23
- use only one version number for the whole bundle
+2014/10/14 v0.17 - new option `use-saved-counter-format'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO:
@@ -3133,4 +3164,3 @@ HISTORY:
- \examspace inside {tasks} => possible? (\pagegoal-\pagetotal) gives wrong
values here
- remove doubled points name if total points are unknown
-