From 765b5b157bf87a50e461b2c952c85ccb3e5fae11 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 24 Feb 2020 14:31:15 +0000 Subject: xsim (23feb20) git-svn-id: svn://tug.org/texlive/trunk@53893 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/xsim/README | 2 +- Master/texmf-dist/doc/latex/xsim/xsim.history | 4 + Master/texmf-dist/doc/latex/xsim/xsim.ideas | 1 + Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf | Bin 1231179 -> 1233169 bytes Master/texmf-dist/doc/latex/xsim/xsim_manual.tex | 167 ++++++++++++----------- 5 files changed, 92 insertions(+), 82 deletions(-) (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/xsim/README b/Master/texmf-dist/doc/latex/xsim/README index 43d9ae35361..d8f72533c50 100644 --- a/Master/texmf-dist/doc/latex/xsim/README +++ b/Master/texmf-dist/doc/latex/xsim/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -XSIM 2020/01/21 v0.17 +XSIM 2020/02/23 v0.18 XSIMVERB 2019/12/29 v0.1a eXercise Sheets IMproved diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.history b/Master/texmf-dist/doc/latex/xsim/xsim.history index 7cb4ab4849f..20415de1bff 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim.history +++ b/Master/texmf-dist/doc/latex/xsim/xsim.history @@ -144,3 +144,7 @@ HISTORY: - fix issue #27 - implement issue #2 - don't allow package options to be set with \xsimsetup + v0.18 2020/02/23 - fix issue #56 + - change \printexercise and \printsolution to accept a + clist of either ids or IDs (or mixed) + - new templates in the `layouts' style diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.ideas b/Master/texmf-dist/doc/latex/xsim/xsim.ideas index 6ae5cd9a6a4..b23ebec899f 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim.ideas +++ b/Master/texmf-dist/doc/latex/xsim/xsim.ideas @@ -26,3 +26,4 @@ IDEAS: - a document class `xsim-exam' for creating exams - a mechanism for providing variants of an exam + diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf index 9014b1c3689..03d1892dacb 100644 Binary files a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf and b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf differ diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex index e3328631df4..e301758b606 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex +++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex @@ -817,7 +817,7 @@ depending on different settings: \end{itemize} \begin{example} - \begin{exercise}[print=false] + \begin{exercise}[print=false,ID=invisible] This exercise will not be printed but the exercise counter will be incremented nonetheless. Its solution will be printed in the list of solutions. @@ -912,15 +912,16 @@ the environments' names are the module names for the options (here using the If you know type and \property{id} of an exercise you can (re-)insert every existing exercise, \ie, every exercise whose external file exists. \begin{commands} - \command{printexercise}[\marg{type}\marg{id}] - Inserts the exercise of type \meta{type} with the \property{id} - \meta{id}. - \command{xprintexercise}[\marg{type}\marg{id}] - \sinceversion{0.16}The same as \cs{printexercise} but expands \meta{type} - and \meta{id} before it uses them. + \command{printexercise}[\marg{type}\marg{csv of ids}] + \changedversion{0.17a}Inserts the exercise or exercises of type + \meta{type} with the \property{id}s or \property{ID}s given in \meta{csv + of ids}. + \command{xprintexercise}[\marg{type}\marg{csv of ids}] + \sincechanged{0.16}{0.17a}The same as \cs{printexercise} but expands + \meta{type} and the items of \meta{csv of ids} before it uses them. \end{commands} \begin{example} - \printexercise{exercise}{5} + \printexercise{exercise}{invisible} \end{example} \section{Collecting Exercises}\label{sec:collecting-exercises} @@ -1290,14 +1291,17 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate information on style files\index{style file}). \item[\code{margin}] A layout rather similar to the one by package \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}). + the style file \code{layouts}. + \item[\code{minimal}] A\sinceversion{0.13} minimalistic layout, see + section~\ref{sec:minimal-template}. As the others inspired by an + \pkg{exsheets} layout. Available through the style file \code{layouts}. + \item[\code{inline}] A\sinceversion{0.18} minimalistic layout, the same as + \code{minimal} but doesn't add \cs*{par} at the beginning and end. + Available through the style file \code{layouts}. + \item[\code{centered}] A\sinceversion{0.18} layout with a centered heading. + Available through the style file \code{layouts}. \end{description} - + \collectexercises{layouts} \begin{exercise}[subtitle=The Subtitle,points=2.5,ID=showlayout] Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, @@ -1544,11 +1548,11 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate \item \code{\#6}: the \property{bonus-points} property of the exercise \end{itemize} \command{XSIMprint}[\Marg{exercise|solution}\marg{type}\marg{id}] - \sinceversion{0.16}Inserts the either the exercise or the solution of type - \meta{type} with the \property{id} \meta{id}. + \sincechanged{0.16}{0.17a}Inserts the either the exercise or the solution + of type \meta{type} with the \property{id} or \property{ID} \meta{id}. \command{XSIMxprint}[\Marg{exercise|solution}\marg{type}\marg{id}] - \sinceversion{0.16}The same as \cs{XSIMprint} but expands \meta{type} and - \meta{id} before it uses them. + \sincechanged{0.16}{0.17a}The same as \cs{XSIMprint} but expands + \meta{type} and \meta{id} before it uses them. \expandable\command{XSIMtranslate}[\marg{keyword}] Delivers the translation of \meta{keyword} according to the current document language (in the meaning of a \pkg{babel}~\cite{pkg:babel} or @@ -1627,6 +1631,67 @@ The predefined templates are \enquote{\code{default}} and \enquote{\code{default*}}, see sections~\vref{sec:table-templ-default} and~\vref{sec:table-templ-default*}. +\subsection{Create and Use \xsim\ Style Files}\label{sec:style-files} +\index{style file|(} + +\xsim\changedversion{0.11} offers you the possibility to create own +\emph{style files}. Let's say you want to have a style called +\code{math-exam}. Then you need to save all necessary definitions in a file +called: +\begin{center} + \code{xsim.style.math-exam.code.tex} +\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} or by using +\cs{xsimsetup}\Marg{load-style=math-exam}: +\begin{sourcecode} + \documentclass[DIV=18,parskip=half]{scrartcl} + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + + \usepackage[clear-aux]{xsim} + \loadxsimstyle{math-exam} + + \title{Math Exam \#3} + \date{2017-03-28} +\end{sourcecode} + +In this style file stuff like template and property definitions should +happen. This is more or less a convenient way to +\begin{itemize} + \item keep the preamble \enquote{clean} and + \item define re-usable styles without the need of copying the document + preamble to another document. +\end{itemize} +A style file is like a package or class file, \ie, \code{@} has category +code~11 (letter). + +The formal description of the commands: +\begin{commands} + \command{xsimstyle}[\sarg\marg{style name}] + The\changedversion{0.11} first command in a \xsim\ style file called + \code{xsim.style.\meta{style name}.code.tex} which defines the \xsim\ + style \meta{style name}. The starred version activates expl3 + syntax\footnote{Those users who want this will know what it means. If you + don't know what it means you will not need it.}. + \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 + package or simply \cs*{input}ing a file. Future versions might provide + additional features. +\end{bewareofthedog} + +\index{style file|)} + \subsection{Examples}\label{sec:template-examples} The repository of this package\footnote{GitHub: @@ -1793,6 +1858,7 @@ This shows the implementation of the \code{minimal} template: \begin{sourcecode} \DeclareExerciseEnvironmentTemplate{minimal} {% + \par \textbf{\GetExerciseProperty{counter}}% \IfInsideSolutionF{% \GetExercisePropertyT{points}{% @@ -1803,7 +1869,7 @@ This shows the implementation of the \code{minimal} template: }% }% } - {} + {\par} \end{sourcecode} \subsubsection{The Headings Templates}\label{sec:headings-templates} @@ -2184,67 +2250,6 @@ The usage is now as follows: \end{exercise} \end{example} -\subsection{\dots Create and Use \xsim\ Style Files?}\label{sec:style-files} -\index{style file|(} - -\xsim\changedversion{0.11} offers you the possibility to create own -\emph{style files}. Let's say you want to have a style called -\code{math-exam}. Then you need to save all necessary definitions in a file -called: -\begin{center} - \code{xsim.style.math-exam.code.tex} -\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} or by using -\cs{xsimsetup}\Marg{load-style=math-exam}: -\begin{sourcecode} - \documentclass[DIV=18,parskip=half]{scrartcl} - \usepackage[T1]{fontenc} - \usepackage[utf8]{inputenc} - - \usepackage[clear-aux]{xsim} - \loadxsimstyle{math-exam} - - \title{Math Exam \#3} - \date{2017-03-28} -\end{sourcecode} - -In this style file stuff like template and property definitions should -happen. This is more or less a convenient way to -\begin{itemize} - \item keep the preamble \enquote{clean} and - \item define re-usable styles without the need of copying the document - preamble to another document. -\end{itemize} -A style file is like a package or class file, \ie, \code{@} has category -code~11 (letter). - -The formal description of the commands: -\begin{commands} - \command{xsimstyle}[\sarg\marg{style name}] - The\changedversion{0.11} first command in a \xsim\ style file called - \code{xsim.style.\meta{style name}.code.tex} which defines the \xsim\ - style \meta{style name}. The starred version activates expl3 - syntax\footnote{Those users who want this will know what it means. If you - don't know what it means you will not need it.}. - \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 - package or simply \cs*{input}ing a file. Future versions might provide - additional features. -\end{bewareofthedog} - -\index{style file|)} - \subsection{\dots Print All Solutions Grouped by Section?} Here is an idea how to get a list of all solutions grouped by the section the corresponding exercises are appearing in. -- cgit v1.2.3