diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/xsim')
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/README | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-23968.pdf | bin | 0 -> 46008 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-23968.tex | 66 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/xsim.history | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/xsim.ideas | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf | bin | 1220136 -> 1229192 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/xsim_manual.tex | 111 |
7 files changed, 168 insertions, 27 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/README b/Master/texmf-dist/doc/latex/xsim/README index 5c33f5ca6cc..5cdaaaffdb8 100644 --- a/Master/texmf-dist/doc/latex/xsim/README +++ b/Master/texmf-dist/doc/latex/xsim/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -XSIM 2019/10/06 v0.13 +XSIM 2019/10/13 v0.14 eXercise Sheets IMproved @@ -85,6 +85,7 @@ The xsim package consists of the example files: xsim.texsx-395273.tex, xsim.texsx-395273.pdf xsim.texwelt-6698.tex, xsim.texwelt-6698.pdf xsim.texwelt-15093.tex, xsim.texwelt-15093.pdf + xsim.texwelt-23968.tex, xsim.texwelt-23968.pdf xsim.golatex-16824.tex, xsim.golatex-16824.pdf xsim.golatex-18844.tex, xsim.golatex-18844.pdf -------------------------------------------------------------------------- diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-23968.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-23968.pdf Binary files differnew file mode 100644 index 00000000000..726cbcddb43 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-23968.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-23968.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-23968.tex new file mode 100644 index 00000000000..e967f7f8263 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texwelt-23968.tex @@ -0,0 +1,66 @@ +% http://texwelt.de/wissen/fragen/23968/ +\documentclass{article} +\usepackage{xsim} + +% new property: +\DeclareExerciseProperty{shortsolution} + +% new environment: +\NewDocumentEnvironment{shortsolution}{+b} + {\SetExerciseProperty{shortsolution}{#1}} + {} + +% we'll use a description list for the list of short solutions: +\newcommand\printshortsolutions{% + \begin{description} + \ForEachUsedExerciseByType{% + \def\ExerciseType{##1}% + \def\ExerciseID{##2}% + \GetExercisePropertyT{shortsolution} + {% + \item[Short Solution ##3] + ####1% + }% + }% + \end{description} +} + +\begin{document} + +\section{Problems} +% set shortsolution through option: +\begin{exercise}[subtitle=Pythagoras] + This is the first problem. +\end{exercise} +\begin{shortsolution} + This is a shortsolution to the first problem. +\end{shortsolution} +\begin{solution} + This is the solution to the first problem. +\end{solution} + +\begin{exercise}[subtitle=Another Problem] + This is the second problem. +\end{exercise} +\begin{solution} + This is the solution to the second problem. +\end{solution} + +% set shortsolution with custom command: +\begin{exercise}[subtitle=Yet Another Problem] + This is the third problem. +\end{exercise} +\begin{shortsolution} + This is a shortsolution to the third problem. +\end{shortsolution} +\begin{solution} + This is the solution to the third problem. +\end{solution} + +\section{Shortsolutions} +\printshortsolutions + +\section{Solutions} +\printsolutions[headings=false] + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.history b/Master/texmf-dist/doc/latex/xsim/xsim.history index c16a4ef7ec0..8be4a79e36a 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim.history +++ b/Master/texmf-dist/doc/latex/xsim/xsim.history @@ -115,3 +115,15 @@ HISTORY: and solution names - bug fixes (issues 37, 39, 43, 47) v0.13 2019/10/06 - experimental package option `no-files' + v0.14 2019/10/13 - new exercise parameters `exercise-heading' and + `solution-heading' + - new options `exercise/heading' and `solution/heading' as + interface for setting the new parameters + - new command \GetExerciseHeadingF for using the new + parameters in environment templates + - change the environment template `default' to use the new + \GetExerciseHeadingF and output a \par at the end + - make argument of \xsimsetup long + - new template `minimal' + - new option `load-style' + - new example `texwelt-23968' (long and short solutions) diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.ideas b/Master/texmf-dist/doc/latex/xsim/xsim.ideas index 7a7810f84de..cdc4b7d2ba4 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim.ideas +++ b/Master/texmf-dist/doc/latex/xsim/xsim.ideas @@ -26,7 +26,4 @@ IDEAS: - a document class `xsim-exam' for creating exams - a mechanism for providing variants of an exam -- provide a switch: either write the environments to an external file - or save it to an auxiliary file ? (not really sure about this one -- - probably not) - some kind of `subexercise' mechanism diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf Binary files differindex b6fb1d329c8..96ec4408f9c 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf +++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex index 9bf643e1ca6..33ec88e4a7d 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex +++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex @@ -144,14 +144,15 @@ or as global option \begin{sourcecode} \documentclass[verbose]{article} \end{sourcecode} -or via the setup command: +or via the setup\changedversion{0.13} command as options belonging to the +\module{package}: \begin{commands} \command{xsimsetup}[\marg{options}] Set up \xsim's package options and all other options described at other places in the manual. \end{commands} -\subsection{Setting Options} +\subsection{Setting Options}\label{sec:setting-options} Apart from the package options already described in section~\vref{sec:package-options} \xsim\ has further options. Those can be \enquote{toplevel} options or options belonging to a module. @@ -373,7 +374,8 @@ Declaring a new exercise type will also define a new command: There are \numberofexercises~exercises and \numberofproblems~problem in this manual. \end{example} -\xsim's pre-defined environment pair has been defined as follows: +\xsim's pre-defined environment pair\changedversion{0.14} has been defined as +follows: \begin{sourcecode} \DeclareExerciseType{exercise}{ exercise-env = exercise , @@ -383,7 +385,9 @@ Declaring a new exercise type will also define a new command: solution-name = \XSIMtranslate{solution} , solutions-name = \XSIMtranslate{solutions} , exercise-template = default , - solution-template = default + solution-template = default , + exercise-heading = \subsection* , + solution-heading = \subsection* } \end{sourcecode} @@ -439,13 +443,26 @@ must) be set. Here is the complete list: An internal parameter that is used to keep track of the number of exercises of a type. This parameter cannot be set or changed by the user. + \paraval{exercise-heading}{exercise heading command} + The\sinceversion{0.14} command used for typesetting of the heading of + exercises of type \meta{type} -- used for typesetting with the command + \cs{GetExerciseHeadingF}. + \paraval{solution-heading}{solution heading command} + The\sinceversion{0.14} command used for typesetting of the heading of + solutions of type \meta{type} -- used for typesetting with the command + \cs{GetExerciseHeadingF}. \end{parameters} It is possible to change some of the parameters after an exercise type has been defined. Those include \parameter{exercise-name}, \parameter{solution-name}, \parameter{exercise-template}, and -\parameter{solution-template}: +\parameter{solution-template}. It is also possible to define new parameters. \begin{commands} + \command{DeclareExerciseParameter}[\sarg\marg{parameter}] + Declares the new parameter \meta{parameter}. The optional star declares a + fixed parameter which cannot be changed once it is set. \emph{You + probably will never need this command. Most tasks can be solved using + properties (see section~\vref{sec:exercise-properties}) instead.} \command{SetExerciseParameter}[\marg{type}\marg{parameter}\marg{value}] Usable to set a single parameter to a new value. \command{SetExerciseParameters}[\marg{type}\marg{parameters}] @@ -483,7 +500,7 @@ Exercise like the \env{exercise} environment and possibly others defined with user}. \propval{counter-value}{integer} Holds the counter value of an exercise (\ie, what you usually know as - \cs*{arabic}\marg{counter}). \emph{Cannot be set by the user}. + \cs*{the}\cs*{value}\marg{counter}). \emph{Cannot be set by the user}. \propval{subtitle}{text} Holds the subtitle of an exercise. \propval{points}{number} @@ -513,25 +530,32 @@ Exercise like the \env{exercise} environment and possibly others defined with usually know as \cs*{thepage}). \propval{page-value}{integer} Holds the page counter value of an exercise (\ie, what you usually know as - \cs*{arabic}\Marg{page}). + \cs*{the}\cs*{value}\Marg{page}). \propval{section}{text} Holds the section counter value representation of an exercise (\ie, what you usually know as \cs*{thesection}). \propval{section-value}{integer} Holds the section counter value of an exercise (\ie, what you usually know - as \cs*{arabic}\Marg{section}). + as \cs*{the}\cs*{value}\Marg{section}). \propval{chapter}{text} Holds the chapter counter value representation of an exercise (\ie, what you usually know as \cs*{thechapter}). \emph{Only if a command \cs*{chapter} \emph{and} a counter \code{chapter} exist.} \propval{chapter-value}{integer} Holds the chapter counter value of an exercise (\ie, what you usually know - as \cs*{arabic}\Marg{chapter}). \emph{Only if a command \cs*{chapter} + as \cs*{the}\cs*{value}\Marg{chapter}). \emph{Only if a command \cs*{chapter} \emph{and} a counter \code{chapter} exist.} \propval{sectioning}{section numbers} Holds five brace groups which in turn hold the section numbers (integers) of the exercise in the order \marg{chapter}\marg{section}\marg{subsection}\marg{subsubsection}\marg{paragraph}. + \propval{exercise-body}{\TeX code} + When\sinceversion{0.13} the package option \option{no-files} is set this + property is defined and holds the environment body of an exercise. + \propval{solution-body}{\TeX code} + When\sinceversion{0.13} the package option \option{no-files} is set this + property is defined and holds the environment body of the corresponding + solution. \end{properties} Some of these \acsp*{prop} are fixed and cannot be set by the user. Those @@ -851,6 +875,12 @@ the environments' names are the module names for the options (here using the \keyval{name}{name}\Module{solution} An interface for \cs{SetExerciseParameter}\Marg{exercise}% \Marg{solution-name}\marg{name}. + \keyval{heading}{heading command}\Module{exercise} + An\sinceversion{0.14} interface for \cs{SetExerciseParameter}% + \Marg{exercise}\Marg{exercise-heading}\marg{heading command}. + \keyval{heading}{heading command}\Module{solution} + An\sinceversion{0.14} interface for \cs{SetExerciseParameter}% + \Marg{exercise}\Marg{solution-heading}\marg{heading command}. \keyval{pre-hook}{code}\Module{exercise}\Default The code for the \emph{pre exercise hook} for exercises of the type \enquote{exercise}. @@ -1258,6 +1288,10 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate \pkg{exsheets}, see section~\ref{sec:margin-template}. Available through the style file \code{layouts} (see section~\vref{sec:style-files} for more information on style files\index{style file}). + \item[\code{minimal}] A\sinceversion{0.13a} minimalistic layout, see + section~\ref{sec:minimal-template}. Available through the style file + \code{layouts} (see section~\vref{sec:style-files} for more information on + style files\index{style file}). \end{description} \collectexercises{layouts} @@ -1388,6 +1422,11 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate Retrieves the value of the parameter \parameter{exercise-name} for the current exercise or of the parameter \parameter{solution-name} for the current solution. + \expandable\command{GetExerciseHeadingF}[\marg{false}] + \sinceversion{0.14}Retrieves the value of the parameter + \parameter{exercise-heading} for the current exercise or of the parameter + \parameter{solution-heading} for the current solution. Inserts + \meta{false} if the corresponding parameter has not been set. \expandable\command{ExerciseParameterGet}[\marg{type}\marg{parameter}] Retrieves the value of the parameter \meta{parameter} for the exercise of type \meta{type} with id \meta{id}. @@ -1585,21 +1624,21 @@ section~\vref{sec:example-files}. \subsubsection{The \code{default} Exercise Template}\label{sec:exercise-templ-default} -Below the definition of the \code{default} exercise template provided by -\xsim\ is shown: +Below the definition\changedversion{0.14} of the \code{default} exercise +template provided by \xsim\ is shown: \begin{sourcecode} \DeclareExerciseEnvironmentTemplate{default}{% - \subsection* - {% - \XSIMmixedcase{\GetExerciseName}\nobreakspace - \GetExerciseProperty{counter}% - \IfInsideSolutionF - {% - \GetExercisePropertyT{subtitle} - { {\normalfont\itshape\PropertyValue}}% - }% - } + \GetExerciseHeadingF{\subsection*}% + {% + \XSIMmixedcase{\GetExerciseName}\nobreakspace + \GetExerciseProperty{counter}% + \IfInsideSolutionF + {% + \GetExercisePropertyT{subtitle} + { {\normalfont\itshape\PropertyValue}}% + }% + } \GetExercisePropertyT{points} {% \marginpar @@ -1611,7 +1650,7 @@ Below the definition of the \code{default} exercise template provided by }% }% } - {} + {\par} \end{sourcecode} \subsubsection{A New Exercise Type Using \pkg*{tcolorbox}} @@ -1731,6 +1770,26 @@ The following example shows how you could mimick \pkg*{exsheets}' {\endtrivlist} \end{sourcecode} +\subsubsection{A \code{minimal} Template} +\label{sec:minimal-template} + +This shows the implementation of the \code{minimal} template: +\begin{sourcecode} + \DeclareExerciseEnvironmentTemplate{minimal} + {% + \textbf{\GetExerciseProperty{counter}}% + \IfInsideSolutionF{% + \GetExercisePropertyT{points}{% + \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}% + \,\IfExerciseGoalSingularTF{points} + {\XSIMtranslate{point}} + {\XSIMtranslate{points}}% + }% + }% + } + {} +\end{sourcecode} + \subsubsection{The Headings Templates}\label{sec:headings-templates} \xsim\ defines four heading templates which only differ by which text they output: @@ -2134,7 +2193,8 @@ called: \end{center} The first command in the file should be \cs{xsimstyle}\Marg{math-exam}. This file can now be loaded into your document using -\cs{loadxsimstyle}\Marg{math-exam}: +\cs{loadxsimstyle}\Marg{math-exam} or by using +\cs{xsimsetup}\Marg{load-style=math-exam}: \begin{sourcecode} \documentclass[DIV=18,parskip=half]{scrartcl} \usepackage[T1]{fontenc} @@ -2168,6 +2228,11 @@ The formal description of the commands: \command{loadxsimstyle}[\marg{csv list of style names}] Load one or more styles into the document. \end{commands} +\begin{options} + \keyval{load-style}{csv list of style names} + Another\sinceversion{0.14} interface for \cs{loadxsimstyle}\marg{csv list + of style names}. +\end{options} \begin{bewareofthedog} At the moment this mechanism offers no advantages over creating a custom |