summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-01 22:32:37 +0000
committerKarl Berry <karl@freefriends.org>2021-02-01 22:32:37 +0000
commitd33be88651887b88e8b06efdfe6e45b1821114da (patch)
treef4e4c6eb2d7aeb82e96f0a8fec1128e9b3223bfe /Master/texmf-dist/tex/latex
parent3582807496bc5284b93dced002154d17359d6821 (diff)
xsim (1feb21)
git-svn-id: svn://tug.org/texlive/trunk@57592 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim-manual.cls4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.sty4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex121
3 files changed, 126 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
index ed32a87fb3a..600a7f60eb9 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
+++ b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
@@ -941,7 +941,8 @@
\xsim@add@example{texsx-391530}{Exercises and sub-exercises}
\xsim@add@example{texsx-395273}{Different aspects of exercises, highlighted solutions}
\xsim@add@example{texsx-466584}{Flushright Solutions}
-\xsim@add@example{texsx-498299}{Multiple choice questions with automated solutions}
+\xsim@add@example{texsx-498299}{Multiple choice questions with automated solutions (1)}
+\xsim@add@example{texsx-549540}{Multiple choice questions with automated solutions (2)}
\xsim@add@example{texsx-576998}{Exercises at the end of section and sectionwise solutions}
\xsim@add@example{texsx-580636}{Multiple hints per exercise with backlinks}
\xsim@add@example{texwelt-6698}{Custom list of exercises}
@@ -995,6 +996,7 @@
\xsim@add@version{0.19a} {2020-03-19}
\xsim@add@version{0.19b} {2020-04-04}
\xsim@add@version{0.20} {2021-01-31}
+\xsim@add@version{0.20a} {2021-02-01}
% ----------------------------------------------------------------------------
\newrobustcmd*\xsimauxfileinfo{%
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.sty b/Master/texmf-dist/tex/latex/xsim/xsim.sty
index 94866005c48..e1953059a7b 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.sty
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.sty
@@ -29,10 +29,10 @@
\ExplSyntaxOn
-\tl_const:Nn \c_xsim_date_tl {2021/01/31}
+\tl_const:Nn \c_xsim_date_tl {2021/02/01}
\tl_const:Nn \c_xsim_version_major_number_tl {0}
\tl_const:Nn \c_xsim_version_minor_number_tl {20}
-\tl_const:Nn \c_xsim_version_subrelease_tl {}
+\tl_const:Nn \c_xsim_version_subrelease_tl {a}
\tl_const:Nx \c_xsim_version_number_tl
{
\c_xsim_version_major_number_tl .
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex
new file mode 100644
index 00000000000..31f5810bce5
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex
@@ -0,0 +1,121 @@
+% ----------------------------------------------------------------------------
+% the XSIM package - layouts style
+%
+% eXercise Sheets IMproved
+%
+% ----------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/xsim
+% E-Mail: contact@mychemistry.eu
+% ----------------------------------------------------------------------------
+% Copyright 2017--2020 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% ----------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% ----------------------------------------------------------------------------
+\xsimstyle{layouts}[2019/10/12]
+
+\RequirePackage{needspace}
+
+\DeclareExerciseEnvironmentTemplate{runin}
+ {%
+ \par\vspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}} % <<< notice the space
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{points}{%
+ \marginpar{%
+ \printgoal{\PropertyValue}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
+ \,\IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }%
+ }%
+ }%
+ }
+ {}
+
+\RequirePackage{array}
+
+\DeclareExerciseEnvironmentTemplate{margin}
+ {%
+ \trivlist
+ \item[\llap{%
+ \smash{%
+ \tabular[t]{@{}r@{}}
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}
+ \IfExercisePropertySetT{points}{%
+ \tabularnewline
+ (%
+ \printgoal{\GetExerciseProperty{points}}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{#1}}%
+ \,\XSIMtranslate{point-abbr}%
+ )%
+ }%
+ \endtabular
+ }%
+ }]\relax
+ }
+ {\endtrivlist}
+
+\DeclareExerciseEnvironmentTemplate{inline}
+ {%
+ \textbf{\GetExerciseProperty{counter}}%
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{points}{ % <<< notice the space
+ (\printgoal{\PropertyValue}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
+ \,\IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}})%
+ }%
+ } % <<< notice the space
+ }
+ {}
+
+\DeclareExerciseEnvironmentTemplate{minimal}
+ {\par\UseExerciseTemplate{begin}{inline}}
+ {\UseExerciseTemplate{end}{inline}\par}
+
+\DeclareExerciseEnvironmentTemplate{centered}
+ {%
+ \par\vspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent
+ \hfil\textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}}\hfil
+ \par\noindent
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{points}{%
+ \marginpar{%
+ \printgoal{\PropertyValue}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
+ \,\IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }%
+ }%
+ }%
+ }
+ {}
+
+% ----------------------------------------------------------------------------
+\endinput
+
+2020/02/23 - added: inline, centered
+ - adapt to removed \par from the generic environments