texlive[50920] Master/texmf-dist: exframe (1may19)

commits+karl at tug.org commits+karl at tug.org
Thu May 2 00:50:55 CEST 2019


Revision: 50920
          http://tug.org/svn/texlive?view=revision&revision=50920
Author:   karl
Date:     2019-05-02 00:50:55 +0200 (Thu, 02 May 2019)
Log Message:
-----------
exframe (1may19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/exframe/README.txt
    trunk/Master/texmf-dist/doc/latex/exframe/exframe.pdf
    trunk/Master/texmf-dist/source/latex/exframe/exframe.dtx
    trunk/Master/texmf-dist/source/latex/exframe/exframe.ins
    trunk/Master/texmf-dist/tex/latex/exframe/exframe.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/exframe/exfsamp.tex
    trunk/Master/texmf-dist/doc/latex/exframe/exfser01.tex
    trunk/Master/texmf-dist/doc/latex/exframe/exfser02.tex
    trunk/Master/texmf-dist/doc/latex/exframe/exfser03.tex
    trunk/Master/texmf-dist/doc/latex/exframe/exfseraa.tex
    trunk/Master/texmf-dist/doc/latex/exframe/exfserm.tex
    trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.mak
    trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.sh
    trunk/Master/texmf-dist/doc/latex/exframe/exfserpe.tex
    trunk/Master/texmf-dist/doc/latex/exframe/exfserpf.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/exframe/exfsmp1.tex

Modified: trunk/Master/texmf-dist/doc/latex/exframe/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/README.txt	2019-05-01 21:03:02 UTC (rev 50919)
+++ trunk/Master/texmf-dist/doc/latex/exframe/README.txt	2019-05-01 22:50:55 UTC (rev 50920)
@@ -1,4 +1,4 @@
-exframe v3.1
+exframe v3.2
 Copyright 2011-2019 Niklas Beisert
 
 exframe is a LaTeX2e package which provides a general purpose
@@ -16,7 +16,16 @@
     exframe.ins  installation file
     exframe.dtx  source file
     exframe.sty  package file
-    exfsmp1.tex  sample latex file
+    exfsamp.tex  standalone sample latex file
+    exfserm.tex  multipart sample main file
+    exfser01.tex multipart sample sheet 1
+    exfser02.tex multipart sample sheet 2
+    exfser03.tex multipart sample sheet 3
+    exfseraa.tex multipart sample unused problems
+    exfserpe.tex multipart sample problem E
+    exfserpf.tex multipart sample problem F
+    exfsermk.sh  multipart sample compile script
+    exfsermk.mak multipart sample makefile
     exframe.pdf  manual
 
 The distribution consists of the files
@@ -25,7 +34,9 @@
 Run "(pdf)latex exframe.dtx" to compile the manual exframe.pdf.
 
 Run "latex exframe.ins" to create the package exframe.sty
-and the sample exfsmp1.tex.
+and the samples consisting of exfsamp.tex, exfserm.tex,
+exfser01.tex, exfser02.tex, exfser03.tex, exfseraa.tex,
+exfserpe.tex, exfserpf.tex, exfsermk.sh, exfsermk.mak.
 Copy the file exframe.sty to an appropriate directory of your LaTeX
 distribution, e.g. texmf-root/tex/latex/exframe.
 

Modified: trunk/Master/texmf-dist/doc/latex/exframe/exframe.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/exframe/exfsamp.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfsamp.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfsamp.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,218 @@
+%%
+%% This is file `exfsamp.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exframe.dtx  (with options: `samplesingle')
+%% 
+%% Copyright (C) 2011-2019 Niklas Beisert
+%% 
+%% 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.
+%% 
+\NeedsTeXFormat{LaTeX2e}[1996/12/01]
+\ProvidesFile{exfsamp.tex}[2019/05/01 v3.2 standalone sample for exframe]
+\documentclass[12pt]{article}
+
+\usepackage{geometry}
+\geometry{layout=a4paper}
+\geometry{paper=a4paper}
+\geometry{margin=2.5cm}
+\parindent0pt
+\parskip0.5ex
+
+\usepackage{amsmath}
+\usepackage{hyperref}
+\usepackage[extstyle]{exframe}
+
+\exercisesetup{solutions=true}
+%%\exercisesetup{solutions=false}
+
+\exercisestyle{plainheader}
+\exerciseconfig{composeheaderbelowright}{\getsheetdata{points}}%
+
+\exerciseconfig{countersheet}{\Roman{sheet}}
+\exerciseconfig{countersubproblem}{\roman{subproblem})}
+\exerciseconfig{countersubproblemmax}{vii)}
+
+\exerciseconfig{termsheet}{\"Ubungsblatt}
+\exerciseconfig{termsheets}{\"Ubungsbl\"atter}
+
+\exercisestyle{pointsat=margin}
+\reversemarginpar
+\exerciseconfig{composepointsmargin}[1]{#1p.}
+\exerciseconfig{composepointspairmargin}[2]{
+  \ifdim#2pt=0pt#1p.%
+  \else\ifdim#1pt=0pt+#2p.%
+  \else#1+#2p.%
+  \fi\fi}
+
+\exerciseconfig{styletitle}{\sffamily\bfseries}
+
+\exerciseconfig{skipproblembelow}{1.5cm}
+
+\exercisestyle{fracpoints}
+\exercisestyle{solutionbelow=problem}
+\exercisestyle{solutionsep}
+
+\exerciseconfig{composemetasheet}[2]{\getexercisedata{course},
+  \exerciseifempty{#2}{\getexerciseconfig{termsheet} #1}{#2}}
+
+\exercisesetup{pdfdata=sheet}
+\exercisedata{title=%
+  {\getexercisedata{course}, \getexercisedata{material}}}
+\exercisedata{author=%
+  {\getexercisedata{instructor}, \getexercisedata{institution}}}
+
+\exercisedata{institution={Katharinen-Volksschule}}
+\exercisedata{course={Mathematik}}
+\exercisedata{instructor={J.\ G.\ B\"uttner}}
+\exercisedata{period={ca.\ 1786}}
+\exercisedata{material={\"Ubungsaufgaben}}
+
+\begin{document}
+
+\begin{sheet}[number=5]
+
+\begin{problem}[title={Sums},points=99+4]
+
+This problem deals with sums and series.
+
+\begin{subproblem}[points=2,difficulty=simple,label={\problemtag-simplesum}]
+Compute the sum
+\showpoints
+\begin{equation}
+1+2+3.
+\end{equation}
+
+\begin{solution}
+The result is
+\begin{equation}
+1+2+3=6.
+\end{equation}
+\end{solution}
+
+\end{subproblem}
+
+\begin{subproblem}[points=97+0.5,difficulty=lengthy]
+Compute the sum
+\begin{equation}
+1+2+3+\ldots+98+99+100.
+\end{equation}
+Keep calm and calculate!
+%%That ought to keep him occupied for a while
+\end{subproblem}
+
+\begin{solution}[author={C.\ F.\ Gau\ss}]
+We use the result $1+2+3=6$ from part \ref{\problemtag-simplesum}
+to jumpstart the calculation. The remaining sums yield
+\awardpoints*[1 for each remaining sum]{97}
+\begin{equation}
+6+4+5+\ldots+99+100=5050.
+\end{equation}
+Alternatively the summands can be grouped into pairs as follows:
+\begin{align}
+1+100&=101,\\
+2+99&=101,\\
+3+98&=101,\\
+\ldots &\nonumber\\
+50+51&=101.
+\end{align}
+These amount to 50 times the same number 101.
+Therefore the sum equals
+\begin{equation}
+1+2+\ldots+99+100=50\cdot 101=5050.
+\end{equation}
+\textit{Ligget se!} \awardpoints{97+0.5}
+\end{solution}
+
+You may give the final part a try:
+
+\begin{subproblem}[optional={optional},
+  difficulty={requires inspiration},points={+3.5}]
+Compute the series
+\showpoints
+\begin{equation}
+1+2+3+\ldots
+\end{equation}
+
+\begin{solution}
+The series is divergent, so the result is $\infty$ \awardpoints{+1}.
+\par
+However, after subtracting the divergent part,
+the result clearly is
+\begin{equation}
+\zeta(-1)=-\frac{1}{12}\,,
+\end{equation}
+where the zeta-function $\zeta(s)$ is defined by
+\begin{equation}
+\zeta(s):=\sum_{k=1}^\infty \frac{1}{k^s}\,.
+\end{equation}
+This definition holds only for $s>1$ where the sum is convergent,
+but one can continue the complex analytic function to $s<0$
+\awardpoints{+1.5}.
+\par
+Another way of understanding the result
+is to use the indefinite summation formula
+for arbitrary exponent $s$ in the summand
+(which also follows from the Euler--MacLaurin formula)
+\begin{equation}
+\sum_n n^s
+= \frac{n^{s+1}}{s+1}
+ -\sum_{j=0}^s  \frac{\zeta(j-s)\,s!}{(s-j)!\,j!}\,n^j
+= \ldots - \zeta(-s)\,n^0.
+\end{equation}
+Curiously, the constant term with $j=0$ is just the desired result
+but with the wrong sign
+(in fact, the constant term of an indefinite sum is ambiguous;
+for the claim we merely set $j=0$
+in the expression which holds for others values of $j$)
+\awardpoints{+0.5}.
+In order to understand the sign,
+we propose that the above formula describes the regularised result
+for the sum with limits $+\infty$ and $n$
+\begin{equation}
+\sum_{k=+\infty}^n k^s
+\simeq \frac{n^{s+1}}{s+1}
+ -\sum_{j=0}^s  \frac{\zeta(j-s)\,s!}{(s-j)!\,j!}\,n^j.
+\end{equation}
+Then we flip the summation limits of the desired sum
+to bring it into the above form
+\awardpoints{+0.5}
+\begin{equation}
+\sum_{k=1}^\infty k^s
+= -\sum_{k=\infty}^0 k^s
+\simeq \zeta(-s).
+\end{equation}
+\end{solution}
+
+\end{subproblem}
+
+\end{problem}
+
+\begin{problem}[points=1, difficulty=insane]
+Show that the equation
+\begin{equation}
+a^3+b^3=c^3
+\end{equation}
+has no positive integer solutions.
+\end{problem}
+
+\begin{solution}
+\normalmarginpar
+This is beyond the scope of this example.
+\marginpar{\footnotesize\raggedright does not fit here.\par}
+\end{solution}
+
+\end{sheet}
+
+\end{document}
+\endinput
+%%
+%% End of file `exfsamp.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfsamp.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfser01.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfser01.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfser01.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,97 @@
+%%
+%% This is file `exfser01.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exframe.dtx  (with options: `samplemultisheet1')
+%% 
+%% Copyright (C) 2011-2019 Niklas Beisert
+%% 
+%% 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.
+%% 
+%%\providecommand{\printsol}{n}
+\input{childdoc.def}
+\childdocof{exfserm}
+
+\begin{sheet}[due={2019-04-29}]
+
+\begin{problem}[title={Sample A}]
+
+\ifdefined\mpostuse
+\begin{mpostfig}[label={\problemtag-fig}]
+interim xu:=1.5cm;
+paths[1]:=fullcircle scaled 1xu;
+fill paths[1] withgreyscale 0.7;
+draw paths[1] withpen pencircle scaled 1pt;
+label(btex \figure etex, center(paths[1]));
+\end{mpostfig}
+\fi
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{center}
+\ifdefined\mpostuse\mpostuse{\problemtag-fig}\else figure\fi
+\end{center}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\end{problem}
+
+\turnover
+
+\begin{problem}[title={Sample B}]
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\end{problem}
+
+\end{sheet}
+
+\endinput
+%%
+%% End of file `exfser01.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfser01.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfser02.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfser02.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfser02.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,95 @@
+%%
+%% This is file `exfser02.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exframe.dtx  (with options: `samplemultisheet2')
+%% 
+%% Copyright (C) 2011-2019 Niklas Beisert
+%% 
+%% 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.
+%% 
+%%\providecommand{\printsol}{n}
+\input{childdoc.def}
+\childdocof{exfserm}
+\begin{sheet}[due={2019-05-06}]
+\begin{problem}[title={Sample C}]
+
+\ifdefined\mpostuse
+\begin{mpostfig}[label={\problemtag-fig}]
+interim xu:=1.5cm;
+paths[1]:=fullcircle scaled 1xu;
+fill paths[1] withgreyscale 0.7;
+draw paths[1] withpen pencircle scaled 1pt;
+label(btex \figure etex, center(paths[1]));
+\end{mpostfig}
+\fi
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{center}
+\ifdefined\mpostuse\mpostuse{\problemtag-fig}\else figure\fi
+\end{center}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\end{problem}
+
+\turnover
+
+\begin{problem}[title={Sample D}]
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\end{problem}
+
+\end{sheet}
+
+\endinput
+%%
+%% End of file `exfser02.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfser02.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfser03.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfser03.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfser03.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,32 @@
+%%
+%% This is file `exfser03.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exframe.dtx  (with options: `samplemultisheet3')
+%% 
+%% Copyright (C) 2011-2019 Niklas Beisert
+%% 
+%% 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.
+%% 
+%%\providecommand{\printsol}{n}
+\input{childdoc.def}
+\childdocof{exfserm}
+\begin{sheet}[due={2019-05-13}]
+\input{exfserpe}
+
+\turnover
+
+\input{exfserpf}
+\end{sheet}
+
+\endinput
+%%
+%% End of file `exfser03.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfser03.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfseraa.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfseraa.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfseraa.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,95 @@
+%%
+%% This is file `exfseraa.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exframe.dtx  (with options: `samplemultisheeta')
+%% 
+%% Copyright (C) 2011-2019 Niklas Beisert
+%% 
+%% 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.
+%% 
+%%\providecommand{\printsol}{n}
+\input{childdoc.def}
+\childdocof{exfserm}
+\begin{sheet}[title={unused problems}]
+\begin{problem}[title={Sample X}]
+
+\ifdefined\mpostuse
+\begin{mpostfig}[label={\problemtag-fig}]
+interim xu:=1.5cm;
+paths[1]:=fullcircle scaled 1xu;
+fill paths[1] withgreyscale 0.7;
+draw paths[1] withpen pencircle scaled 1pt;
+label(btex \figure etex, center(paths[1]));
+\end{mpostfig}
+\fi
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{center}
+\ifdefined\mpostuse\mpostuse{\problemtag-fig}\else figure\fi
+\end{center}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\end{problem}
+
+\turnover
+
+\begin{problem}[title={Sample Y}]
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\end{problem}
+
+\end{sheet}
+
+\endinput
+%%
+%% End of file `exfseraa.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfseraa.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfserm.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfserm.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfserm.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,231 @@
+%%
+%% This is file `exfserm.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exframe.dtx  (with options: `samplemultimain')
+%% 
+%% Copyright (C) 2011-2019 Niklas Beisert
+%% 
+%% 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.
+%% 
+\NeedsTeXFormat{LaTeX2e}[1996/12/01]
+\ProvidesFile{exfserm.tex}[2019/05/01 v3.2 multipart sample for exframe]
+\input{childdoc.def}
+\childdocmain{exfserm}
+
+\providecommand{\draftver}{y}
+\ifchilddoc
+\providecommand{\printsol}{y}
+\else
+\providecommand{\printsol}{n}
+\fi
+
+\documentclass[12pt]{article}
+
+\RequirePackage{graphicx}
+
+\PassOptionsToPackage{bookmarks=\ifchilddoc false\else true\fi}{hyperref}
+\PassOptionsToPackage{bookmarksopen=true}{hyperref}
+\RequirePackage{hyperref}
+\IfFileExists{hyperxmp.sty}{\RequirePackage{hyperxmp}}{}
+
+\RequirePackage[extdata,extstyle]{exframe}
+
+\if\printsol n
+\exercisesetup{solutions=false}
+\exercisesetup{twoside=true}
+\else
+\exercisesetup{solutions=true}
+\exercisesetup{twoside=false}
+\fi
+
+%%\if\printsol n\else\showprobleminfo{author,source,recycle}\fi
+
+\exercisesetup{autolabelproblem}
+\exercisestyle{contents,solutionsep}
+\ifchilddocmanual\else
+\exercisestyle{pagebysheet,problembysheet,equationbysheet,sheetequation}
+\fi
+\exercisestyle{solutionbelow={problem}}
+\ifchilddoc\ifchilddocmanual\else\exercisesetup{pdfdata=sheet}\fi\fi
+
+\RequirePackage[a4paper,margin=2.5cm]{geometry}
+\pagestyle{plain}
+\setlength\parindent{0pt}
+\setlength\parskip{\smallskipamount}
+\setlength\overfullrule{5pt}
+\newcommand{\turnover}{\ifsolutions\else\vfill%
+  \hfill{\mathversion{bold}$\longrightarrow$}\newpage\fi}
+
+\exercisestyle{plainheader}
+\exerciseconfig{composeheaderbelowright}
+ {\sheetdataempty{editdate}{}{version: \getsheetdata{editdate}}}
+\ifchilddoc\ifsolutions\else
+ \exerciseconfig{composeheaderbelowright}
+  {\sheetdataempty{due}{}{due: \getsheetdata{due}}}
+\fi\fi
+
+\def\lorem{Lorem ipsum dolor sit amet, consectetur adipisici elit,
+  sed eiusmod tempor incidunt ut labore et dolore magna aliqua.
+  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
+  nisi ut aliquid ex ea commodi consequat.
+  Quis aute iure reprehenderit in voluptate velit esse
+  cillum dolore eu fugiat nulla pariatur.
+  Excepteur sint obcaecat cupiditat non proident,
+  sunt in culpa qui officia deserunt mollit anim id est laborum.\par}
+
+\IfFileExists{mpostinl.sty}{\RequirePackage{mpostinl}}{}
+\ifdefined\mpostsetup
+
+\mpostsetup{checksum}
+\if\draftver y\mpostsetup{now,nowall}\fi
+\ifchilddocmanual\else\mpostsetup{numberwithin={sheet}}\fi
+\ifsolutions\else\mpostsetup{warnunused=false}\fi
+
+\mpostsetup{globaldef=true}
+\begin{mposttex}
+\def\figure{figure}
+\end{mposttex}
+\begin{mpostdef}
+path paths[];
+newinternal numeric xu;
+xu:=1cm;
+\end{mpostdef}
+\mpostsetup{globaldef=false}
+
+\fi
+
+\exercisedata{course={exframe package samples}}
+\exercisedata{instructor={N.\ Beisert}}
+\exercisedata{institution={exframe academy}}
+\exercisedata{period={spring 2019}}
+\exercisedata{date={2019}}
+
+\exercisedata{material={\ifsolutions\getexerciseconfig{termsolutions}%
+  \else\getexerciseconfig{termsheets}\fi}}
+\exerciseconfig{composetitlesheet}[2]{\exerciseifempty{#2}%
+  {\ifsolutions\getexerciseconfig{termsolutions}\else%
+   \getexerciseconfig{termsheet}\fi\ #1}%
+  {\ifsolutions\getexerciseconfig{termsolutions}\fi\ #2}}
+\exerciseconfig{composemetasheet}[2]{\if\draftver yDRAFT: \fi%
+  \getexercisedata{course},
+  \getexerciseconfig{composetitlesheet}{#1}{#2}}
+
+\exercisedata{title={\if\draftver yDRAFT: \fi%
+  \getexercisedata{course}, \getexercisedata{material}}}
+\exercisedata{author={Niklas Beisert, \getexercisedata{institution}}}
+\exercisedata{subject={lecture series at \getexercisedata{institution},
+  \getexercisedata{period}}}
+
+\exerciseconfig{termsheet}{sheet}
+\exerciseconfig{termsheets}{sample sheets}
+\exerciseconfig{termsolution}{Solution}
+\exerciseconfig{termsolutions}{solutions}
+
+\def\copyrightmessage
+  {This document as well as its parts is protected by copyright.}
+\def\licensemessage
+  {Reproduction of any part of this work in any form
+  without prior written consent of \getexercisedata{institution}
+  is not permissible.}
+
+\ifsolutions\else\if\draftver y\else
+\def\licensecctype{by-sa}
+\def\licenseccname{Attribution-ShareAlike \licenseccver{} International}
+\fi\fi
+
+\ifdefined\licensecctype
+\ifdefined\licenseccver\else\def\licenseccver{4.0}\fi
+\def\licenseurl
+  {https://creativecommons.org/licenses/\licensecctype/\licenseccver}
+\def\licensemessage{\texorpdfstring
+  {This work is licensed under the Creative Commons ``\licenseccname'' License
+  (CC \MakeUppercase{\licensecctype} \licenseccver).\par
+  \IfFileExists{doclicense.sty}{
+   \begin{center}\includegraphics{doclicense-CC-\licensecctype}\end{center}}{}
+  To view a copy of this license, visit: \url{\licenseurl}}
+  {This work is licensed under the Creative Commons \licenseccname{} License.}}
+\fi
+
+\ifdefined\xmptilde
+\hypersetup{pdfcopyright={Copyright \getexercisedata{date}
+  \getexercisedata{author}. \copyrightmessage{} \licensemessage}}
+\ifdefined\sourceurl\hypersetup{pdflicenseurl={\sourceurl}}\else
+\ifdefined\licenseurl\hypersetup{pdflicenseurl={\licenseurl}}\fi\fi
+\ifdefined\XMPLangAlt
+\hypersetup{pdfsource={}}
+\XMPLangAlt{en}{pdfcopyright={Copyright \getexercisedata{date}
+  \getexercisedata{author}. \copyrightmessage{} \licensemessage}}
+\fi
+\fi
+
+\begin{document}
+
+\def\tmp{}
+\ifchilddocmanual
+\def\tmp{\end{document}}
+\input{\childdocname}
+\fi\tmp
+
+\setcounter{section}{-1}
+\begingroup\ifchilddoc\else
+\renewcommand{\thepage}{\arabic{page}}
+
+\pdfbookmark[1]{Title Page}{title}
+\thispagestyle{empty}
+\vspace*{\fill}
+\begin{center}
+\begingroup\bfseries\LARGE\getexercisedata{course}\par\endgroup
+\vspace{0.5cm}
+\begingroup\large\getexercisedata{material}\par\endgroup
+\vspace{0.5cm}
+\begingroup\large\getexercisedata{institution},
+  \getexercisedata{period}\par\endgroup
+\vspace{2cm}
+\begingroup\scshape\Large\getexercisedata{instructor}\par\endgroup
+\end{center}
+\vspace*{\fill}\vspace*{\fill}
+\newpage
+
+\phantomsection\pdfbookmark[1]{Copyright}{copyright}
+\thispagestyle{empty}
+\vspace*{\fill}\vspace*{\fill}
+\begin{center}
+\begin{minipage}{11cm}\raggedright
+{\copyright} \getexercisedata{date} \getexercisedata{author}
+\par\medskip
+\copyrightmessage{}
+\licensemessage
+\ifdefined\sourcemessage\par\medskip\sourcemessage\fi
+\ifdefined\attributionmessage\par\medskip\attributionmessage\fi
+\end{minipage}\end{center}
+\vspace*{\fill}\vspace*{\fill}\vspace*{\fill}
+\newpage
+
+\makeatletter\renewcommand\@pnumwidth{2.4em}\makeatother
+\setcounter{tocdepth}{2}
+\phantomsection\pdfbookmark[1]{Contents}{contents}
+{\parskip0pt\tableofcontents}
+\exercisecleardoublepage\setcounter{page}{1}
+
+\fi\endgroup
+
+\include{exfser01}
+\include{exfser02}
+\include{exfser03}
+
+\def\jobnameunused{exfseraa}
+\ifx\childdocname\jobnameunused\include{\jobnameunused}\fi
+
+\end{document}
+\endinput
+%%
+%% End of file `exfserm.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfserm.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.mak
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.mak	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.mak	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,48 @@
+MAIN = exfserm
+SOURCE = exfser
+PROBLEM = exfserp
+SCRIPT = exfsermk.sh
+MAKEFILE = exfsermk.mak
+TARGETLIST = Problems Solutions
+SHEETNUM = 01 02 03 aa
+PREREQS = $(MAIN).tex
+SOURCES = $(SHEETNUM:%=$(SOURCE)%.tex)
+SHEETS = $(foreach trg,$(TARGETLIST),$(trg).pdf $(SHEETNUM:%=$(trg)%.pdf))
+TARGETS = $(foreach trg,$(TARGETLIST),$(trg).pdf)
+GENFILES = $(foreach trg,$(TARGETLIST),$(trg).tex $(SHEETNUM:%=$(trg)%.tex))
+BAKFILES = $(SOURCES) $(MAIN).tex $(MAKEFILE) $(SCRIPT) $(PROBLEM)*
+
+default: sheets ;
+sheets: $(SHEETS) ;
+main: $(TARGETS) ;
+sheet%: $(foreach trg,$(TARGETLIST),$(trg)%.pdf) ;
+all: main sheets ;
+sources: $(GENFILES) ;
+
+$(TARGETS): $(SOURCES) $(PREREQS)
+	bash ./$(SCRIPT) $@
+$(word 1,$(TARGETLIST))%.pdf: $(SOURCE)%.tex $(PREREQS)
+	bash ./$(SCRIPT) $@
+$(word 2,$(TARGETLIST))%.pdf: $(SOURCE)%.tex $(PREREQS)
+	bash ./$(SCRIPT) $@
+$(GENFILES):
+	bash ./$(SCRIPT) $@
+
+touch:
+	touch $(MAIN).tex
+clean:
+	rm -f $(SHEETNUM:%=$(SOURCE)%.aux)
+	rm -f $(SHEETNUM:%=$(SOURCE)%.log)
+	rm -f $(foreach trg,$(TARGETLIST),$(SHEETNUM:%=$(trg)%.log) $(trg).log)
+	rm -f $(patsubst %,$(MAIN)%,.aux .log .out .toc)
+	rm -f $(patsubst %,$(MAIN)%,.mp .mpx -*.mps -tmp.log -tmp.mp -tmp.mpx)
+	rm -f mpxerr.tex mpxerr.log mpxerr.dvi texput.log
+	rm -f $(patsubst %,$(PROBLEM)*%,.aux .log .mp .mpx -*.mps)
+	rm -f $(patsubst %,$(PROBLEM)*%,-tmp.log -tmp.mp -tmp.mpx)
+clean-bak:
+	rm -f $(BAKFILES:%=%~) $(BAKFILES:%=%.bak)
+clean-all:  clean
+	rm -f $(SHEETS) $(TARGETS)
+	rm -f $(SHEETNUM:%=$(SOURCE)%.pdf) $(MAIN).pdf
+	rm -f $(foreach trg,$(TARGETLIST),$(SHEETNUM:%=$(trg)%.tex) $(trg).tex)
+	rm -f $(PROBLEM)*.pdf


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.mak
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.sh
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.sh	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.sh	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+if [ -z $1 ]
+then
+  echo "Usage:
+  $0 number [version]
+    number: number of sheet, 0 for combined document
+    version: 1 for problems, 2 for solutions
+  $0 filename
+    filename: target file to be compiled"
+  exit 1
+fi
+
+num="$1"
+ver="$2"
+main="exfserm"
+source="exfser"
+target1="Problems"
+target2="Solutions"
+sheets="01 02 03 aa"
+nl=$'\n'
+sheetokay=""
+make=".pdf"
+
+for v in $target1 $target2
+do
+  if [[ $num =~ ^$v ]]
+  then
+    ver=$v
+    num=${num#$v}
+    if [[ $num =~ ^.*\.tex$ ]]; then make=".tex"; fi
+    num=${num%%.*}
+  fi
+done
+
+if [[ $num =~ ^[0-9]$ ]]; then num="0$num"; fi
+if [[ $num == "00" ]]; then num=""; fi
+
+if [[ -z $num ]]; then sheetokay="okay"; fi
+for v in $sheets
+do
+  if [[ "$num" == "$v" ]]; then sheetokay="okay"; fi
+done
+
+if [[ -z $sheetokay ]]
+then
+  echo "error: unknown sheet"
+  exit 1
+fi
+
+function docompile
+{
+  if [[ -z $num ]]; then job=$main; else job=$source$num; fi
+  for par in -draftmode ""
+  do
+    body="\\def\\jobname{$job}\\def\\draftver{n}\\def\\printsol{$sol}"
+    body="$body\\input{childdoc.def}"
+    if [[ -z $num ]]
+    then
+      body="$body\\childdocforward{$main}"
+    else
+      body="$body\\childdocforward[$main]{$source$num}"
+    fi
+    drop="This is|entering extended mode|\\write18"
+    drop="$drop|Preloading the plain mem file|mpost\.mp|plain\.mp"
+    pdflatex -shell-escape -interaction=batchmode $par \
+      -jobname "$target$num" "$body" | grep -vE "$drop"
+  done
+  grep -E "Warning|Error|Undefined|Overfull|Underfull" "$target$num.log"
+}
+
+function writesource
+{
+  body="\\def\\draftver{n}$nl\\def\\printsol{$sol}$nl"
+  body="$body\\input{childdoc.def}$nl"
+  if [[ -z $num ]]
+  then
+    body="$body\\childdocforward{$main}"
+  else
+    body="$body\\childdocforwardprefix[$main]{$target}{$source}"
+  fi
+  echo "$body" > $target$num.tex
+}
+
+function process
+{
+  target=$1
+  sol=$2
+  if [[ "$make" == ".pdf" ]]; then docompile; else writesource; fi
+}
+
+if [[ -z $ver || "$ver" == "$target1" || $ver = 1 ]]
+then
+  process $target1 n
+fi
+if [[ -z $ver || "$ver" == "$target2" || $ver = 2 ]]
+then
+  process $target2 y
+fi
+
+echo


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfsermk.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfserpe.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfserpe.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfserpe.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,69 @@
+%%
+%% This is file `exfserpe.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exframe.dtx  (with options: `samplemultiprobleme')
+%% 
+%% Copyright (C) 2011-2019 Niklas Beisert
+%% 
+%% 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.
+%% 
+%%\providecommand{\printsol}{n}
+\input{childdoc.def}
+\childdocby{exfserm}
+\begin{problem}[title={Sample E}]
+
+\ifdefined\mpostuse
+\begin{mpostfig}[label={\problemtag-fig}]
+interim xu:=1.5cm;
+paths[1]:=fullcircle scaled 1xu;
+fill paths[1] withgreyscale 0.7;
+draw paths[1] withpen pencircle scaled 1pt;
+label(btex \figure etex, center(paths[1]));
+\end{mpostfig}
+\fi
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{center}
+\ifdefined\mpostuse\mpostuse{\problemtag-fig}\else figure\fi
+\end{center}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\end{problem}
+\endinput
+%%
+%% End of file `exfserpe.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfserpe.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/exframe/exfserpf.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfserpf.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfserpf.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -0,0 +1,44 @@
+%%
+%% This is file `exfserpf.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exframe.dtx  (with options: `samplemultiproblemf')
+%% 
+%% Copyright (C) 2011-2019 Niklas Beisert
+%% 
+%% 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.
+%% 
+%%\providecommand{\printsol}{n}
+\input{childdoc.def}
+\childdocby{exfserm}
+\begin{problem}[title={Sample F}]
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\end{problem}
+
+\endinput
+%%
+%% End of file `exfserpf.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/exframe/exfserpf.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/exframe/exfsmp1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/exframe/exfsmp1.tex	2019-05-01 21:03:02 UTC (rev 50919)
+++ trunk/Master/texmf-dist/doc/latex/exframe/exfsmp1.tex	2019-05-01 22:50:55 UTC (rev 50920)
@@ -1,211 +0,0 @@
-%%
-%% This is file `exfsmp1.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exframe.dtx  (with options: `sample1')
-%% 
-%% Copyright (C) 2011-2019 Niklas Beisert
-%% 
-%% 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.
-%% 
-\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-\ProvidesFile{exfsmp1.tex}[2019/01/21 v3.1 sample 1 for exframe]
-\documentclass[12pt]{article}
-
-\usepackage{geometry}
-\geometry{layout=a4paper}
-\geometry{paper=a4paper}
-\geometry{margin=2.5cm}
-\parindent0pt
-\parskip0.5ex
-
-\usepackage{amsmath}
-\usepackage{hyperref}
-\usepackage[extstyle]{exframe}
-
-\exercisesetup{solutions=true}
-%%\exercisesetup{solutions=false}
-
-\exercisestyle{plainheader}
-\exerciseconfig{composeheaderbelowright}{\getsheetdata{points}}%
-
-\exerciseconfig{countersheet}{\Roman{sheet}}
-\exerciseconfig{countersubproblem}{\roman{subproblem})}
-\exerciseconfig{countersubproblemmax}{vii)}
-
-\exerciseconfig{termsheet}{\"Ubungsblatt}
-\exerciseconfig{termsheets}{\"Ubungsbl\"atter}
-
-\exercisestyle{pointsat=margin}
-\reversemarginpar
-\exerciseconfig{composepointsmargin}[1]{#1p.}
-
-\exerciseconfig{styletitle}{\sffamily\bfseries}
-
-\exerciseconfig{skipproblembelow}{1.5cm}
-
-\exercisestyle{fracpoints}
-\exercisestyle{solutionbelow=problem}
-\exercisestyle{solutionsep}
-
-\exerciseconfig{composemetasheet}[2]{\getexercisedata{course},
-  \exerciseifempty{#2}{\getexerciseconfig{termsheet} #1}{#2}}
-
-\exercisesetup{pdfdata=sheet}
-\exercisedata{title=%
-  {\getexercisedata{course}, \getexercisedata{material}}}
-\exercisedata{author=%
-  {\getexercisedata{instructor}, \getexercisedata{institution}}}
-
-\exercisedata{institution={Katharinen-Volksschule}}
-\exercisedata{course={Mathematik}}
-\exercisedata{instructor={J.\ G.\ B\"uttner}}
-\exercisedata{period={ca.\ 1786}}
-\exercisedata{material={\"Ubungsaufgaben}}
-
-\begin{document}
-
-\begin{sheet}[number=5]
-
-\begin{problem}[title={Sums}]
-
-This problem deals with sums and series.
-
-\begin{subproblem}[points=2,difficulty=simple,label={\problemtag-simplesum}]
-Compute the sum
-\showpoints
-\begin{equation}
-1+2+3.
-\end{equation}
-
-\begin{solution}
-The result is
-\begin{equation}
-1+2+3=6.
-\end{equation}
-\end{solution}
-
-\end{subproblem}
-
-\begin{subproblem}[points=97,difficulty=lengthy]
-Compute the sum
-\begin{equation}
-1+2+3+\ldots+98+99+100.
-\end{equation}
-Keep calm and calculate!
-%%That ought to keep him occupied for a while
-\end{subproblem}
-
-\begin{solution}[author={C.\ F.\ Gau\ss}]
-We use the result $1+2+3=6$ from part \ref{\problemtag-simplesum}
-to jumpstart the calculation. The remaining sums yield
-\awardpoints[1 for each remaining sum]{97}
-\begin{equation}
-6+4+5+\ldots+99+100=5050.
-\end{equation}
-Alternatively the summands can be grouped into pairs as follows:
-\begin{align}
-1+100&=101,\\
-2+99&=101,\\
-3+98&=101,\\
-\ldots &\nonumber\\
-50+51&=101.
-\end{align}
-These amount to 50 times the same number 101.
-Therefore the sum equals
-\begin{equation}
-1+2+\ldots+99+100=50\cdot 101=5050.
-\end{equation}
-\textit{Ligget se!} \awardpoints*{97}
-\end{solution}
-
-You may give the final part a try:
-
-\begin{subproblem}[optional={optional}, difficulty={requires inspiration}]
-Compute the series
-\begin{equation}
-1+2+3+\ldots
-\end{equation}
-
-\begin{solution}
-The series is divergent, so the result is $\infty$ \awardpoints*{1}.
-\par
-However, after subtracting the divergent part,
-the result clearly is
-\begin{equation}
-\zeta(-1)=-\frac{1}{12}\,,
-\end{equation}
-where the zeta-function $\zeta(s)$ is defined by
-\begin{equation}
-\zeta(s):=\sum_{k=1}^\infty \frac{1}{k^s}\,.
-\end{equation}
-This definition holds only for $s>1$ where the sum is convergent,
-but one can continue the complex analytic function to $s<0$
-\awardpoints*{1.5}.
-\par
-Another way of understanding the result
-is to use the indefinite summation formula
-for arbitrary exponent $s$ in the summand
-(which also follows from the Euler--MacLaurin formula)
-\begin{equation}
-\sum_n n^s
-= \frac{n^{s+1}}{s+1}
- -\sum_{j=0}^s  \frac{\zeta(j-s)\,s!}{(s-j)!\,j!}\,n^j
-= \ldots - \zeta(-s)\,n^0.
-\end{equation}
-Curiously, the constant term with $j=0$ is just the desired result
-but with the wrong sign
-(in fact, the constant term of an indefinite sum is ambiguous;
-for the claim we merely set $j=0$
-in the expression which holds for others values of $j$)
-\awardpoints*{0.5}.
-In order to understand the sign,
-we propose that the above formula describes the regularised result
-for the sum with limits $+\infty$ and $n$
-\begin{equation}
-\sum_{k=+\infty}^n k^s
-\simeq \frac{n^{s+1}}{s+1}
- -\sum_{j=0}^s  \frac{\zeta(j-s)\,s!}{(s-j)!\,j!}\,n^j.
-\end{equation}
-Then we flip the summation limits of the desired sum
-to bring it into the above form
-\awardpoints*{0.5}
-\begin{equation}
-\sum_{k=1}^\infty k^s
-= -\sum_{k=\infty}^0 k^s
-\simeq \zeta(-s).
-\end{equation}
-\end{solution}
-
-\end{subproblem}
-
-\end{problem}
-
-\begin{problem}[points=1, difficulty=insane]
-Show that the equation
-\begin{equation}
-a^3+b^3=c^3
-\end{equation}
-has no positive integer solutions.
-\end{problem}
-
-\begin{solution}
-\normalmarginpar
-This is beyond the scope of this example.
-\marginpar{\footnotesize\raggedright does not fit here.\par}
-\end{solution}
-
-\end{sheet}
-
-\end{document}
-\endinput
-%%
-%% End of file `exfsmp1.tex'.

Modified: trunk/Master/texmf-dist/source/latex/exframe/exframe.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/exframe/exframe.dtx	2019-05-01 21:03:02 UTC (rev 50919)
+++ trunk/Master/texmf-dist/source/latex/exframe/exframe.dtx	2019-05-01 22:50:55 UTC (rev 50920)
@@ -15,13 +15,16 @@
 % The Current Maintainer of this work is Niklas Beisert.
 %
 % This work consists of the files exframe.dtx and exframe.ins
-% and the derived files exframe.sty and exfsmp1.tex.
+% and the derived files exframe.sty and exfsamp.tex, exfserm.tex,
+% exfser01.tex, exfser02.tex, exfser03.tex, exfseraa.tex,
+% exfserpe.tex, exfserpf.tex, exfsermk.sh, exfsermk.mak.
 %
-%<package|sample1>\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-%<package>\ProvidesPackage{exframe}[2019/01/21 v3.1 Framework for Exercise Problems]
-%<sample1>\ProvidesFile{exfsmp1.tex}[2019/01/21 v3.1 sample 1 for exframe]
+%<package|samplesingle|samplemultimain>\NeedsTeXFormat{LaTeX2e}[1996/12/01]
+%<package>\ProvidesPackage{exframe}[2019/05/01 v3.2 Framework for Exercise Problems]
+%<samplesingle>\ProvidesFile{exfsamp.tex}[2019/05/01 v3.2 standalone sample for exframe]
+%<samplemultimain>\ProvidesFile{exfserm.tex}[2019/05/01 v3.2 multipart sample for exframe]
 %<*driver>
-\def\thedate#1{2019/01/21}\def\theversion#1{v3.1}
+\def\thedate#1{2019/05/01}\def\theversion#1{v3.2}
 \ProvidesFile{exframe.dtx}[\thedate{} \theversion{} exframe reference manual file]
 \PassOptionsToClass{10pt,a4paper}{article}
 \documentclass{ltxdoc}
@@ -325,10 +328,14 @@
 and therefore the choice |here| is similar to (|sub|)|problem|.
 The latter form, however, makes sure that a solution
 does not inherit the margin of the parent block.
+The alternate mode |here*| does not intermediately store
+the solution block content in a token buffer;
+this might resolve some tokenisation issues
+in special circumstances.
 The alternate modes |problem*| and |subproblem*|
 positions the solution \emph{after} the (sub)problem block
 such that it does not inherit any layout,
-but also the no definitions made in the parent block.
+but also no definitions made in the parent block.
 In |manual| mode, all solutions are collected (with appropriate headers)
 until they are output by the directive |\insertsolutions|.
 If no solutions are stored in the buffer
@@ -335,7 +342,7 @@
 (or if the mode is not |manual|), |\insertsolutions| has no effect.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\DescribeMacro{\readsolutions}
+\DescribeMacro{\writesolutions}
 Another option to handle solutions is to write them to a file
 for later use.
 Writing to a file is initiated by:
@@ -727,6 +734,11 @@
 More general fractional decimal numbers such as multiples of 0.2
 will be subject to rounding errors and will not display nicely.
 
+Bonus points can be specified in the format
+|points=|[\textit{regular}][|+|\textit{bonus}].
+By default, such points will be printed as
+[\textit{regular}][|+|\textit{bonus}] where 0 components are omitted.
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \DescribeMacro{pointsat}
 \DescribeMacro{subpointsat}
@@ -773,6 +785,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \DescribeMacro{\getsheetpoints}
 \DescribeMacro{\getproblempoints}
+\DescribeMacro{\extractpoints}
 The package allows to read the point totals
 for other sheets and problems:
 %
@@ -785,6 +798,11 @@
 %
 Here \textit{tag} is the tag assigned to the corresponding sheet or problem,
 see \secref{sec:labels}.
+If bonus points are used, the points will be returned
+in the format [\textit{regular}][|+|\textit{bonus}];
+the components \textit{regular} and \textit{bonus}
+can be extracted from the returned expression
+by |\extractpoints| and |\extractpoints*|, respectively.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \DescribeMacro{\awardpoints}
@@ -1085,8 +1103,8 @@
 %
 \begin{itemize}
 \item |solutionbelow=|\textit{pos}
-(can take values |here|, |subproblem|, |subproblem*|, |problem|, |problem*|,
-|sheet| and |manual|;
+(can take values |here|, |here*|, |subproblem|, |subproblem*|,
+|problem|, |problem*|, |sheet| and |manual|;
 initially set to |subproblem|) --
 positions the solutions below the indicated blocks;
 see \secref{sec:solutions} for details.
@@ -1347,7 +1365,10 @@
 The Current Maintainer of this work is Niklas Beisert.
 
 This work consists of the files |README.txt|, |exframe.ins| and |exframe.dtx|
-as well as the derived files |exframe.sty|, |exfsmp1.tex| and |exframe.pdf|.
+as well as the derived files |exframe.sty|, |exfsamp.tex|, |exfserm.tex|,
+|exfser|\textit{nn}|.tex| (\textit{nn}=|01|, |02|, |03|, |aa|),
+|exfserpe.tex|, |exfserpf.tex|, |exfsermk.sh|, |exfsermk.mak|
+and |exframe.pdf|.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \subsection{Files and Installation}
@@ -1360,7 +1381,16 @@
     |exframe.ins|  & installation file \\
     |exframe.dtx|  & source file \\
     |exframe.sty|  & package file \\
-    |exfsmp1.tex|  & sample file \\
+    |exfsamp.tex|  & sample file \\
+    |exfserm.tex|  & multipart sample main file \\
+    |exfser01.tex| & multipart sample sheet 1 \\
+    |exfser02.tex| & multipart sample sheet 2 \\
+    |exfser03.tex| & multipart sample sheet 3 \\
+    |exfseraa.tex| & multipart sample unused problems \\
+    |exfserpe.tex| & multipart sample problem E \\
+    |exfserpf.tex| & multipart sample problem F \\
+    |exfsermk.sh|  & multipart sample compile script \\
+    |exfsermk.mak| & multipart sample makefile \\
     |exframe.pdf|  & manual
 \end{tabular}
 \end{center}
@@ -1374,7 +1404,9 @@
 to compile the manual |exframe.pdf| (this file).
 \item
 Run \LaTeX{} on |exframe.ins| to create the package |exframe.sty|
-and the sample |exfsmp1.tex|.
+and the samples consisting of |exfsamp.tex|, |exfserm.tex|,
+|exfser01.tex|, |exfser02.tex|, |exfser03.tex|, |exfseraa.tex|,
+|exfserpe.tex|, |exfserpf.tex|, |exfsermk.sh|, |exfsermk.mak|.
 Copy the file |exframe.sty| to an appropriate directory of your \LaTeX{}
 distribution, e.g.\ \textit{texmf-root}|/tex/latex/exframe|.
 \end{itemize}
@@ -1414,11 +1446,6 @@
 to indicate the \LaTeX{} source file in the generated metapost file.
 Compatibility with the \textsf{currfile} package
 has been tested with v0.7c (2015/04/23).
-\item
-This package cooperates well with the package
-\href{http://ctan.org/pkg/childdoc}{\textsf{childdoc}}
-to produce individual sheets, single problems
-as well as a collection of all exercises.
 \end{itemize}
 
 There are several other \LaTeX{} packages
@@ -1433,7 +1460,7 @@
 They offer options to
 hide or delay solutions,
 print only specific problems,
-deal with points
+deal with points,
 specify metadata,
 handle exercise collections,
 as well as some more specific options.
@@ -1513,9 +1540,6 @@
 cannot simply be discarded, but must be scanned very carefully
 for the embedded solution.
 \item
-Provide an example with multiple sheets in the same document
-such that the sheet can be compiled individually or as a collection.
-\item
 Define structures for multiple-choice questions.
 \end{itemize}
 
@@ -1523,6 +1547,36 @@
 \subsection{Revision History}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\paragraph{v3.2:} 2019/05/01
+
+\begin{itemize}
+\item
+bonus points can be specified as
+|points=|[\textit{regular}][|+|\textit{bonus}]
+\item
+|solutionbelow| mode |here*| added
+for direct processing of the solution block
+\item
+multipart sample added
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\paragraph{v3.11:} 2019/04/15
+
+\begin{itemize}
+\item
+fix interaction with
+package \href{http://ctan.org/pkg/calc}{\textsf{calc}}
+(thanks to Johannes Hahn for bug report)
+\item
+fix style |fracpoints| in combination with some [|sub|]|pointsat| choices
+(thanks to Johannes Hahn for bug report)
+\item
+fix spacing for [|sub|]|pointsat=margin|
+(thanks to Johannes Hahn for bug report)
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \paragraph{v3.1:} 2019/01/21
 
 \begin{itemize}
@@ -1619,25 +1673,20 @@
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \section{Sample Files}
-% \label{sec:sample}
+% \section{Standalone Sample}
+% \label{sec:samplesingle}
+%\iffalse
+%<*samplesingle>
+%\fi
 %
-% This section provides examples of how to use
+% This section provides an example of how to use
 % some of the \textsf{exframe} features.
 % The resulting layout will be somewhat messy
-% due to a random selection of features\ldots
+% due to a random selection of features.
 %
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \subsection{Single Exercise Sheet}
-% \label{sec:sample1}
-%\iffalse
-%<*sample1>
-%\fi
-%
-% The first (and presently only) example
-% describes a single exercise sheet.
+% This example file describes a single exercise sheet.
 % The other sheet of the series would be declared
-% in independent documents.
+% analogously in independent documents.
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \paragraph{Preamble.}
@@ -1715,6 +1764,11 @@
 \exercisestyle{pointsat=margin}
 \reversemarginpar
 \exerciseconfig{composepointsmargin}[1]{#1p.}
+\exerciseconfig{composepointspairmargin}[2]{
+  \ifdim#2pt=0pt#1p.%
+  \else\ifdim#1pt=0pt+#2p.%
+  \else#1+#2p.%
+  \fi\fi}
 %    \end{macrocode}
 
 % Change the basic font style for all titles to be bold sans-serif:
@@ -1782,7 +1836,7 @@
 
 % Start a problem with a title:
 %    \begin{macrocode}
-\begin{problem}[title={Sums}]
+\begin{problem}[title={Sums},points=99+4]
 %    \end{macrocode}
 
 % Some introduction to the problem:
@@ -1817,7 +1871,7 @@
 
 % Another subproblem:
 %    \begin{macrocode}
-\begin{subproblem}[points=97,difficulty=lengthy]
+\begin{subproblem}[points=97+0.5,difficulty=lengthy]
 Compute the sum
 \begin{equation}
 1+2+3+\ldots+98+99+100.
@@ -1834,7 +1888,7 @@
 \begin{solution}[author={C.\ F.\ Gau\ss}]
 We use the result $1+2+3=6$ from part \ref{\problemtag-simplesum}
 to jumpstart the calculation. The remaining sums yield
-\awardpoints[1 for each remaining sum]{97}
+\awardpoints*[1 for each remaining sum]{97}
 \begin{equation}
 6+4+5+\ldots+99+100=5050.
 \end{equation}
@@ -1851,7 +1905,7 @@
 \begin{equation}
 1+2+\ldots+99+100=50\cdot 101=5050.
 \end{equation}
-\textit{Ligget se!} \awardpoints*{97}
+\textit{Ligget se!} \awardpoints{97+0.5}
 \end{solution}
 %    \end{macrocode}
 
@@ -1862,8 +1916,10 @@
 
 % Final subproblem; this one is optional:
 %    \begin{macrocode}
-\begin{subproblem}[optional={optional}, difficulty={requires inspiration}]
+\begin{subproblem}[optional={optional},
+  difficulty={requires inspiration},points={+3.5}]
 Compute the series
+\showpoints
 \begin{equation}
 1+2+3+\ldots
 \end{equation}
@@ -1872,7 +1928,7 @@
 % Provide a solution:
 %    \begin{macrocode}
 \begin{solution}
-The series is divergent, so the result is $\infty$ \awardpoints*{1}.
+The series is divergent, so the result is $\infty$ \awardpoints{+1}.
 \par
 However, after subtracting the divergent part,
 the result clearly is
@@ -1885,7 +1941,7 @@
 \end{equation}
 This definition holds only for $s>1$ where the sum is convergent,
 but one can continue the complex analytic function to $s<0$
-\awardpoints*{1.5}.
+\awardpoints{+1.5}.
 \par
 Another way of understanding the result
 is to use the indefinite summation formula
@@ -1902,7 +1958,7 @@
 (in fact, the constant term of an indefinite sum is ambiguous;
 for the claim we merely set $j=0$
 in the expression which holds for others values of $j$)
-\awardpoints*{0.5}.
+\awardpoints{+0.5}.
 In order to understand the sign,
 we propose that the above formula describes the regularised result
 for the sum with limits $+\infty$ and $n$
@@ -1913,7 +1969,7 @@
 \end{equation}
 Then we flip the summation limits of the desired sum
 to bring it into the above form
-\awardpoints*{0.5}
+\awardpoints{+0.5}
 \begin{equation}
 \sum_{k=1}^\infty k^s
 = -\sum_{k=\infty}^0 k^s
@@ -1965,11 +2021,962 @@
 \end{document}
 %    \end{macrocode}
 %\iffalse
-%</sample1>
+%</samplesingle>
 %\fi
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \section{Multipart Sample}
+% \label{sec:samplemulti}
+%
+% The second example describes a series of exercise sheets
+% which can be compiled as a collection or as individual sheets.
+% This example describes a versatile setup
+% with several convenient features;
+% most of these features can be adjusted or removed easily as they
+% mostly enhance the setup and do not interact with each other strongly.
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Main File}
+% \label{sec:samplemultimain}
+%\iffalse
+%<*samplemultimain>
+%\fi
+%
+% The main source file is called |exfserm.tex|.
+% It is referenced at several places within the setup,
+% and when changing the name they need to be adjusted accordingly.
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{childdoc Mechanism.}
+%
+% The setup uses the package \textsf{childdoc} to allow compilation
+% of the series as a whole or in parts and with various sets of options:
+%    \begin{macrocode}
+\input{childdoc.def}
+\childdocmain{exfserm}
+%    \end{macrocode}
+% The parameter of |\childdocmain| must match the main file name |exfserm|.
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Compilation Switches.}
+%
+% Define compilation switches and declare their default settings.
+% |\printsol| controls whether solutions should be printed or not;
+% by default solutions are activated for compilation of a part,
+% but not for the complete document.
+% |\draftver| controls whether the final version of
+% the document is to be compiled;
+% concretely this affects the compilations of metapost figures, see below:
+%    \begin{macrocode}
+\providecommand{\draftver}{y}
+\ifchilddoc
+\providecommand{\printsol}{y}
+\else
+\providecommand{\printsol}{n}
+\fi
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Preamble.}
+%
+% Standard document class:
+%    \begin{macrocode}
+\documentclass[12pt]{article}
+%    \end{macrocode}
+
+%    \begin{macrocode}
+% \textsf{graphicx} package to display license logo:
+\RequirePackage{graphicx}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{hyperref Package.}
+%
+% Use the \textsf{hyperref} package.
+% Declare some options, e.g.\ use bookmarks only for complete document:
+%    \begin{macrocode}
+\PassOptionsToPackage{bookmarks=\ifchilddoc false\else true\fi}{hyperref}
+\PassOptionsToPackage{bookmarksopen=true}{hyperref}
+\RequirePackage{hyperref}
+%    \end{macrocode}
+% Use the \textsf{hyperxmp} package for inclusion of
+% copyright metadata in the compiled pdf files:
+%    \begin{macrocode}
+\IfFileExists{hyperxmp.sty}{\RequirePackage{hyperxmp}}{}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{exframe Package.}
+%
+% Invoke \textsf{exframe} with extended data and styles:
+%    \begin{macrocode}
+\RequirePackage[extdata,extstyle]{exframe}
+%    \end{macrocode}
+
+% Set solutions switch and declare two-sided layout only
+% if no solutions are printed:
+%    \begin{macrocode}
+\if\printsol n
+\exercisesetup{solutions=false}
+\exercisesetup{twoside=true}
+\else
+\exercisesetup{solutions=true}
+\exercisesetup{twoside=false}
+\fi
+%    \end{macrocode}
+
+% Might want to display some metadata (only for partial compile):
+%    \begin{macrocode}
+%%\if\printsol n\else\showprobleminfo{author,source,recycle}\fi
+%    \end{macrocode}
+
+% Set some options. Automatically assign labels to problems.
+% Include sheets and problems in table of contents.
+% Separate solutions by horizontal rules.
+% Count problems, equations and pages by sheet
+% (unless compiling single problem).
+% Collect solutions below each problem.
+% Write pdf metadata for sheet when compiling single sheet.
+%    \begin{macrocode}
+\exercisesetup{autolabelproblem}
+\exercisestyle{contents,solutionsep}
+\ifchilddocmanual\else
+\exercisestyle{pagebysheet,problembysheet,equationbysheet,sheetequation}
+\fi
+\exercisestyle{solutionbelow={problem}}
+\ifchilddoc\ifchilddocmanual\else\exercisesetup{pdfdata=sheet}\fi\fi
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Layout Definitions.}
+%
+% Set page dimensions and layout:
+%    \begin{macrocode}
+\RequirePackage[a4paper,margin=2.5cm]{geometry}
+\pagestyle{plain}
+%    \end{macrocode}
+% Remove paragraph indentation:
+%    \begin{macrocode}
+\setlength\parindent{0pt}
+\setlength\parskip{\smallskipamount}
+%    \end{macrocode}
+% Show overfull lines:
+%    \begin{macrocode}
+\setlength\overfullrule{5pt}
+%    \end{macrocode}
+% Define turn page over mark; hide when printing solutions:
+%    \begin{macrocode}
+\newcommand{\turnover}{\ifsolutions\else\vfill%
+  \hfill{\mathversion{bold}$\longrightarrow$}\newpage\fi}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Sheet Banner.}
+%
+% Use standard sheet banner;
+% show sheet |editdate| below banner (if declared);
+% when compiling single sheet, display sheet due date instead:
+%    \begin{macrocode}
+\exercisestyle{plainheader}
+\exerciseconfig{composeheaderbelowright}
+ {\sheetdataempty{editdate}{}{version: \getsheetdata{editdate}}}
+\ifchilddoc\ifsolutions\else
+ \exerciseconfig{composeheaderbelowright}
+  {\sheetdataempty{due}{}{due: \getsheetdata{due}}}
+\fi\fi
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Lorem.}
+%
+% Define a macro |\lorem| to write out some paragraph of text
+% for the example:
+%    \begin{macrocode}
+\def\lorem{Lorem ipsum dolor sit amet, consectetur adipisici elit,
+  sed eiusmod tempor incidunt ut labore et dolore magna aliqua.
+  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
+  nisi ut aliquid ex ea commodi consequat.
+  Quis aute iure reprehenderit in voluptate velit esse
+  cillum dolore eu fugiat nulla pariatur.
+  Excepteur sint obcaecat cupiditat non proident,
+  sunt in culpa qui officia deserunt mollit anim id est laborum.\par}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{metapost Setup.}
+%
+% Use package \textsf{mpostinl} (if available)
+% to include some metapost figures within the source of the problems:
+%    \begin{macrocode}
+\IfFileExists{mpostinl.sty}{\RequirePackage{mpostinl}}{}
+\ifdefined\mpostsetup
+%    \end{macrocode}
+
+% Setup \textsf{mpostinl}.
+% Use checksums to invoke metapost only when figures change.
+% Process all figures individually and immediately when in
+% draft mode (avoids a second compilation pass).
+% Number figures within sheet to provide a stable numbering
+% upon insertion/deletion of new figures or partial compilation.
+% Do not warn about unused figures when preparing without solutions
+% (figures for solutions should be declared outside |solution| blocks):
+%    \begin{macrocode}
+\mpostsetup{checksum}
+\if\draftver y\mpostsetup{now,nowall}\fi
+\ifchilddocmanual\else\mpostsetup{numberwithin={sheet}}\fi
+\ifsolutions\else\mpostsetup{warnunused=false}\fi
+%    \end{macrocode}
+
+% Global metapost definitions.
+% Define some latex macro to demonstrate
+% usage of latex for typesetting labels.
+% Define some global metapost variables,
+% |paths| is an array of path variables,
+% |xu| serves as a length unit to
+% scale individual figures
+% (use |interim xu:=...;| to set scale for local figure only):
+%    \begin{macrocode}
+\mpostsetup{globaldef=true}
+\begin{mposttex}
+\def\figure{figure}
+\end{mposttex}
+\begin{mpostdef}
+path paths[];
+newinternal numeric xu;
+xu:=1cm;
+\end{mpostdef}
+\mpostsetup{globaldef=false}
+%    \end{macrocode}
+
+% Close optional \textsf{mpostinl} processing:
+%    \begin{macrocode}
+\fi
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Document Data.}
+%
+% Set document data for series of problem sheets:
+%    \begin{macrocode}
+\exercisedata{course={exframe package samples}}
+\exercisedata{instructor={N.\ Beisert}}
+\exercisedata{institution={exframe academy}}
+\exercisedata{period={spring 2019}}
+\exercisedata{date={2019}}
+%    \end{macrocode}
+
+% Assemble some entries from given data:
+%    \begin{macrocode}
+\exercisedata{material={\ifsolutions\getexerciseconfig{termsolutions}%
+  \else\getexerciseconfig{termsheets}\fi}}
+\exerciseconfig{composetitlesheet}[2]{\exerciseifempty{#2}%
+  {\ifsolutions\getexerciseconfig{termsolutions}\else%
+   \getexerciseconfig{termsheet}\fi\ #1}%
+  {\ifsolutions\getexerciseconfig{termsolutions}\fi\ #2}}
+\exerciseconfig{composemetasheet}[2]{\if\draftver yDRAFT: \fi%
+  \getexercisedata{course},
+  \getexerciseconfig{composetitlesheet}{#1}{#2}}
+%    \end{macrocode}
+
+% Set general purpose metadata:
+%    \begin{macrocode}
+\exercisedata{title={\if\draftver yDRAFT: \fi%
+  \getexercisedata{course}, \getexercisedata{material}}}
+\exercisedata{author={Niklas Beisert, \getexercisedata{institution}}}
+\exercisedata{subject={lecture series at \getexercisedata{institution},
+  \getexercisedata{period}}}
+%    \end{macrocode}
+
+% Redefine some terms:
+%    \begin{macrocode}
+\exerciseconfig{termsheet}{sheet}
+\exerciseconfig{termsheets}{sample sheets}
+\exerciseconfig{termsolution}{Solution}
+\exerciseconfig{termsolutions}{solutions}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{License.}
+%
+% It is always useful to specify a copyright line
+% and a license for the document.
+% Define some restrictive default text.
+%    \begin{macrocode}
+\def\copyrightmessage
+  {This document as well as its parts is protected by copyright.}
+\def\licensemessage
+  {Reproduction of any part of this work in any form
+  without prior written consent of \getexercisedata{institution}
+  is not permissible.}
+%    \end{macrocode}
+
+% Apply Creative Commons BY-SA license
+% under certain conditions (no solutions, final version):
+%    \begin{macrocode}
+\ifsolutions\else\if\draftver y\else
+\def\licensecctype{by-sa}
+\def\licenseccname{Attribution-ShareAlike \licenseccver{} International}
+\fi\fi
+%    \end{macrocode}
+
+% Write applicable Creative Commons license information.
+% Use Creative Commons logos included in package \textsf{doclicense}:
+%    \begin{macrocode}
+\ifdefined\licensecctype
+\ifdefined\licenseccver\else\def\licenseccver{4.0}\fi
+\def\licenseurl
+  {https://creativecommons.org/licenses/\licensecctype/\licenseccver}
+\def\licensemessage{\texorpdfstring
+  {This work is licensed under the Creative Commons ``\licenseccname'' License
+  (CC \MakeUppercase{\licensecctype} \licenseccver).\par
+  \IfFileExists{doclicense.sty}{
+   \begin{center}\includegraphics{doclicense-CC-\licensecctype}\end{center}}{}
+  To view a copy of this license, visit: \url{\licenseurl}}
+  {This work is licensed under the Creative Commons \licenseccname{} License.}}
+\fi
+%    \end{macrocode}
+
+% Write copyright and license as pdf metadata
+% (using package \textsf{hyperxmp} if available):
+%    \begin{macrocode}
+\ifdefined\xmptilde
+\hypersetup{pdfcopyright={Copyright \getexercisedata{date}
+  \getexercisedata{author}. \copyrightmessage{} \licensemessage}}
+\ifdefined\sourceurl\hypersetup{pdflicenseurl={\sourceurl}}\else
+\ifdefined\licenseurl\hypersetup{pdflicenseurl={\licenseurl}}\fi\fi
+\ifdefined\XMPLangAlt
+\hypersetup{pdfsource={}}
+\XMPLangAlt{en}{pdfcopyright={Copyright \getexercisedata{date}
+  \getexercisedata{author}. \copyrightmessage{} \licensemessage}}
+\fi
+\fi
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Body.}
+%
+% Start document body:
+%    \begin{macrocode}
+\begin{document}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Single Problem Display.}
+%
+% The following code handles the compilation
+% of individual problems from their own source file.
+% Make sure to leave the conditional before issuing |\end{document}|:
+%    \begin{macrocode}
+\def\tmp{}
+\ifchilddocmanual
+\def\tmp{\end{document}}
+\input{\childdocname}
+\fi\tmp
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Frontmatter.}
+%
+% Do not print frontmatter for individual sheets.
+% Define a plain page counter for frontmatter:
+%    \begin{macrocode}
+\setcounter{section}{-1}
+\begingroup\ifchilddoc\else
+\renewcommand{\thepage}{\arabic{page}}
+%    \end{macrocode}
+
+% Prepare a title page to display some relevant data:
+%    \begin{macrocode}
+\pdfbookmark[1]{Title Page}{title}
+\thispagestyle{empty}
+\vspace*{\fill}
+\begin{center}
+\begingroup\bfseries\LARGE\getexercisedata{course}\par\endgroup
+\vspace{0.5cm}
+\begingroup\large\getexercisedata{material}\par\endgroup
+\vspace{0.5cm}
+\begingroup\large\getexercisedata{institution},
+  \getexercisedata{period}\par\endgroup
+\vspace{2cm}
+\begingroup\scshape\Large\getexercisedata{instructor}\par\endgroup
+\end{center}
+\vspace*{\fill}\vspace*{\fill}
+\newpage
+%    \end{macrocode}
+
+% Prepare a copyright and license page using data specified above:
+%    \begin{macrocode}
+\phantomsection\pdfbookmark[1]{Copyright}{copyright}
+\thispagestyle{empty}
+\vspace*{\fill}\vspace*{\fill}
+\begin{center}
+\begin{minipage}{11cm}\raggedright
+{\copyright} \getexercisedata{date} \getexercisedata{author}
+\par\medskip
+\copyrightmessage{}
+\licensemessage
+\ifdefined\sourcemessage\par\medskip\sourcemessage\fi
+\ifdefined\attributionmessage\par\medskip\attributionmessage\fi
+\end{minipage}\end{center}
+\vspace*{\fill}\vspace*{\fill}\vspace*{\fill}
+\newpage
+%    \end{macrocode}
+
+% Print table of contents:
+%    \begin{macrocode}
+\makeatletter\renewcommand\@pnumwidth{2.4em}\makeatother
+\setcounter{tocdepth}{2}
+\phantomsection\pdfbookmark[1]{Contents}{contents}
+{\parskip0pt\tableofcontents}
+\exercisecleardoublepage\setcounter{page}{1}
+%    \end{macrocode}
+
+% End of frontmatter:
+%    \begin{macrocode}
+\fi\endgroup
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Include Sheets.}
+%
+% Include problem sheets:
+%    \begin{macrocode}
+\include{exfser01}
+\include{exfser02}
+\include{exfser03}
+%    \end{macrocode}
+
+% Include sheet to collect unused problems
+% (only process for individual sheets, i.e.\ itself):
+%    \begin{macrocode}
+\def\jobnameunused{exfseraa}
+\ifx\childdocname\jobnameunused\include{\jobnameunused}\fi
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{End.}
+%
+% End of document body:
+%    \begin{macrocode}
+\end{document}
+%    \end{macrocode}
+%
+%\iffalse
+%</samplemultimain>
+%\fi
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Sheet File}
+% \label{sec:samplemultisheets}
+%\iffalse
+%<*samplemultisheet1|samplemultisheet2|samplemultisheet3|samplemultisheeta>
+%\fi
+%
+% Provide some source files
+% |exfser01.tex|, |exfser02.tex|, |exfser03.tex|, |exfseraa.tex|
+% for problem sheets.
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{childdoc Mechanism.}
+%
+% Instruct the package \textsf{childdoc} to compile
+% only the present sheet if source is compiled by latex:
+%    \begin{macrocode}
+%%\providecommand{\printsol}{n}
+\input{childdoc.def}
+\childdocof{exfserm}
+%    \end{macrocode}
+%\iffalse
+%</samplemultisheet1|samplemultisheet2|samplemultisheet3|samplemultisheeta>
+%<samplemultiprobleme|samplemultiproblemf>%%\providecommand{\printsol}{n}
+%<samplemultiprobleme|samplemultiproblemf>\input{childdoc.def}
+%<samplemultiprobleme|samplemultiproblemf>\childdocby{exfserm}
+%<*samplemultisheet1>
+%\fi
+% The parameter of |\childdocof| must match the main file name |exfserm|.
+% Uncommenting the commented line suppressed printing of the solution.
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Sheet Environment.}
+%
+% Declare a sheet with intended due date:
+%    \begin{macrocode}
+\begin{sheet}[due={2019-04-29}]
+%    \end{macrocode}
+% Adjust due date for each sheet.
+% For sheet containing unused problems |exfseraa.tex|,
+% declare a sheet |title={unused problems}| instead of due date.
+%\iffalse
+%</samplemultisheet1>
+%<samplemultisheet2>\begin{sheet}[due={2019-05-06}]
+%<samplemultisheet3>\begin{sheet}[due={2019-05-13}]
+%<samplemultisheeta>\begin{sheet}[title={unused problems}]
+%<*samplemultisheet1>
+%\fi
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Problems.}
+%
+% Start a problem:
+%    \begin{macrocode}
+\begin{problem}[title={Sample A}]
+%    \end{macrocode}
+%
+%\iffalse
+%</samplemultisheet1>
+%<samplemultisheet2>\begin{problem}[title={Sample C}]
+%<samplemultisheet3>\input{exfserpe}
+%<samplemultisheeta>\begin{problem}[title={Sample X}]
+%<samplemultiprobleme>\begin{problem}[title={Sample E}]
+%<*samplemultisheet1|samplemultisheet2|samplemultisheeta|samplemultiprobleme>
+%\fi
+
+% Let us declare a figure using \textsf{mpostinl} (if available).
+% Denote it by the label \textit{tag}|-fig|,
+% where \textit{tag} is the tag of the problem
+% (in order to avoid potential conflicts with other problems;
+% \textit{tag} is assigned automatically or by specifying
+% the option |tag| for the |problem| environment):
+%    \begin{macrocode}
+\ifdefined\mpostuse
+\begin{mpostfig}[label={\problemtag-fig}]
+interim xu:=1.5cm;
+paths[1]:=fullcircle scaled 1xu;
+fill paths[1] withgreyscale 0.7;
+draw paths[1] withpen pencircle scaled 1pt;
+label(btex \figure etex, center(paths[1]));
+\end{mpostfig}
+\fi
+%    \end{macrocode}
+
+% Write a problem body with figure, some subproblems and a solution:
+%    \begin{macrocode}
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{center}
+\ifdefined\mpostuse\mpostuse{\problemtag-fig}\else figure\fi
+\end{center}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+
+\lorem
+
+\begin{subproblem}
+\lorem
+\end{subproblem}
+
+\begin{solution}
+\lorem
+\end{solution}
+%    \end{macrocode}
+
+% End the problem:
+%    \begin{macrocode}
+\end{problem}
+%    \end{macrocode}
+%\iffalse
+%</samplemultisheet1|samplemultisheet2|samplemultisheeta|samplemultiprobleme>
+%<*samplemultisheet1|samplemultisheet2|samplemultisheet3|samplemultisheeta>
+%\fi
+
+% Start new page:
+%    \begin{macrocode}
+\turnover
+%    \end{macrocode}
+
+%\iffalse
+%</samplemultisheet1|samplemultisheet2|samplemultisheet3|samplemultisheeta>
+%<*samplemultisheet1>
+%\fi
+% Write a second problem to accompany the first one:
+%    \begin{macrocode}
+\begin{problem}[title={Sample B}]
+%    \end{macrocode}
+%
+%\iffalse
+%</samplemultisheet1>
+%<samplemultisheet2>\begin{problem}[title={Sample D}]
+%<samplemultisheet3>\input{exfserpf}
+%<samplemultisheeta>\begin{problem}[title={Sample Y}]
+%<samplemultiproblemf>\begin{problem}[title={Sample F}]
+%<*samplemultisheet1|samplemultisheet2|samplemultisheeta|samplemultiproblemf>
+%\fi
+
+% Problem body without a figure;
+% this time the |solution| environments are
+% included in the |subproblem| blocks:
+%    \begin{macrocode}
+\lorem
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+
+\begin{subproblem}
+\lorem
+\begin{solution}
+\lorem
+\end{solution}
+\end{subproblem}
+%    \end{macrocode}
+
+% End the problem:
+%    \begin{macrocode}
+\end{problem}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{End Sheet.}
+%\iffalse
+%</samplemultisheet1|samplemultisheet2|samplemultisheeta|samplemultiproblemf>
+%<*samplemultisheet1|samplemultisheet2|samplemultisheet3|samplemultisheeta>
+%\fi
+% End the sheet:
+%    \begin{macrocode}
+\end{sheet}
+%    \end{macrocode}
+
+%\iffalse
+%</samplemultisheet1|samplemultisheet2|samplemultisheet3|samplemultisheeta>
+%\fi
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Individual Problem Files}
+% \label{sec:samplemultisheet3}
+%\iffalse
+%<*discard>
+%\fi
+%
+% It may be more convenient to define each problem in an individual file,
+% so that a sheet can be composed by including the appropriate
+% problem files.
+% In such a setup, the \textsf{childdoc} mechanism
+% allows to compile each problem individually.
+%
+% To that end, prepare a file |exfserp|\textit{nn}|.tex|
+% containing the problem block |\begin{problem}| \ldots |\end{problem}|.
+% This file should start with:
+%    \begin{macrocode}
+%%\providecommand{\printsol}{n}
+\input{childdoc.def}
+\childdocby{exfserm}
+%    \end{macrocode}
+% and end with |\endinput|.
+% Then compose the problem sheet
+% by including the appropriate set of problem files
+% via |\input{exfserp|\textit{nn}|}|.
+%
+% In the example, a sheet file |exfser03.tex|
+% includes two problem files |exfserpe.tex| and |exfserpf.tex|.
+%
+%\iffalse
+%</discard>
+%\fi
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Make Scripts}
+% \label{sec:samplemultimake}
+%\iffalse
+%<*samplemultiscript>
+%\fi
+%
+% The setup allows the compilation in various modes for editing purposes.
+% In order to generate and update a complete set of documents for distribution
+% (all individual sheets and a collection of sheets;
+% with and without solutions),
+% it makes sense to use the software development utility |make|.
+% The compilation of individual components is simplified
+% by a |bash| shell script.
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Compile Script.}
+%
+% The |bash| shell script |exfsermk.sh| compiles one part of
+% the collection of problem sheets in a given mode.
+%
+% Shebang for |bash| script:
+%    \begin{macrocode}
+#!/bin/bash
+%    \end{macrocode}
+
+% Display usage:
+%    \begin{macrocode}
+if [ -z $1 ]
+then
+  echo "Usage:
+  $0 number [version]
+    number: number of sheet, 0 for combined document
+    version: 1 for problems, 2 for solutions
+  $0 filename
+    filename: target file to be compiled"
+  exit 1
+fi
+%    \end{macrocode}
+%\iffalse$\fi
+
+% Configure and declare variables with default values.
+% |num| takes the sheet number;
+% |ver| takes the compile mode;
+% |main| defines the name of the main source file;
+% |source|\textit{nn} defines the name of the sheet source file;
+% |target1|[\textit{nn}] defines the target file name in mode 1;
+% |target2|[\textit{nn}] defines the target file name in mode 2;
+% |sheets| is a list of allowable sheet identifiers \textit{nn}:
+%    \begin{macrocode}
+num="$1"
+ver="$2"
+main="exfserm"
+source="exfser"
+target1="Problems"
+target2="Solutions"
+sheets="01 02 03 aa"
+nl=$'\n'
+sheetokay=""
+make=".pdf"
+%    \end{macrocode}
+%\iffalse$\fi
+
+% Check if the parameter matches any of the acceptable output file names:
+%    \begin{macrocode}
+for v in $target1 $target2
+do
+  if [[ $num =~ ^$v ]]
+  then
+    ver=$v
+    num=${num#$v}
+    if [[ $num =~ ^.*\.tex$ ]]; then make=".tex"; fi
+    num=${num%%.*}
+  fi
+done
+%    \end{macrocode}
+
+% Ensure that |num| is a two-digit number, prepend `0' otherwise:
+%    \begin{macrocode}
+if [[ $num =~ ^[0-9]$ ]]; then num="0$num"; fi
+if [[ $num == "00" ]]; then num=""; fi
+%    \end{macrocode}
+
+% Check whether |num| is acceptable:
+%    \begin{macrocode}
+if [[ -z $num ]]; then sheetokay="okay"; fi
+for v in $sheets
+do
+  if [[ "$num" == "$v" ]]; then sheetokay="okay"; fi
+done
+%    \end{macrocode}
+
+% Otherwise display error message and exit:
+%    \begin{macrocode}
+if [[ -z $sheetokay ]]
+then
+  echo "error: unknown sheet"
+  exit 1
+fi
+%    \end{macrocode}
+%\iffalse$\fi
+
+% Function to compile a component.
+% Set up \textsf{childdoc} mechanism according to desired component.
+% Compile two passes, first in |-draftmode|.
+% Suppress messages by |mpost|.
+% Display warning messages in log file:
+%    \begin{macrocode}
+function docompile
+{
+  if [[ -z $num ]]; then job=$main; else job=$source$num; fi
+  for par in -draftmode ""
+  do
+    body="\\def\\jobname{$job}\\def\\draftver{n}\\def\\printsol{$sol}"
+    body="$body\\input{childdoc.def}"
+    if [[ -z $num ]]
+    then
+      body="$body\\childdocforward{$main}"
+    else
+      body="$body\\childdocforward[$main]{$source$num}"
+    fi
+    drop="This is|entering extended mode|\\write18"
+    drop="$drop|Preloading the plain mem file|mpost\.mp|plain\.mp"
+    pdflatex -shell-escape -interaction=batchmode $par \
+      -jobname "$target$num" "$body" | grep -vE "$drop"
+  done
+  grep -E "Warning|Error|Undefined|Overfull|Underfull" "$target$num.log"
+}
+%    \end{macrocode}
+%\iffalse$\fi
+
+% Function to generate a \textsf{childdoc} compile file with specific options:
+%    \begin{macrocode}
+function writesource
+{
+  body="\\def\\draftver{n}$nl\\def\\printsol{$sol}$nl"
+  body="$body\\input{childdoc.def}$nl"
+  if [[ -z $num ]]
+  then
+    body="$body\\childdocforward{$main}"
+  else
+    body="$body\\childdocforwardprefix[$main]{$target}{$source}"
+  fi
+  echo "$body" > $target$num.tex
+}
+%    \end{macrocode}
+
+% Configure variables and select appropriate function for intended task:
+%    \begin{macrocode}
+function process
+{
+  target=$1
+  sol=$2
+  if [[ "$make" == ".pdf" ]]; then docompile; else writesource; fi
+}
+%    \end{macrocode}
+%\iffalse$\fi
+
+% Translate versions to parameter values:
+%    \begin{macrocode}
+if [[ -z $ver || "$ver" == "$target1" || $ver = 1 ]]
+then
+  process $target1 n
+fi
+if [[ -z $ver || "$ver" == "$target2" || $ver = 2 ]]
+then
+  process $target2 y
+fi
+%    \end{macrocode}
+
+% Finish with blank line:
+%    \begin{macrocode}
+echo
+%    \end{macrocode}
+%
+%\iffalse
+%</samplemultiscript>
+%\fi
+%
+%\iffalse
+%<*samplemultimake>
+%\fi
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Makefile.}
+%
+% \catcode9=13\def^^I{~~~~~~~~}
+%
+% Define a make file |exfsermk.mak| for the project.
+% The compilation is then started by
+% |make -f exfsermk.mak| \ldots.
+% More conveniently, in a single-project setup within the directory,
+% this file would be called |Makefile| in which case it suffices
+% to just run |make| \ldots.
+%
+% Configuration definitions:
+%    \begin{macrocode}
+MAIN = exfserm
+SOURCE = exfser
+PROBLEM = exfserp
+SCRIPT = exfsermk.sh
+MAKEFILE = exfsermk.mak
+TARGETLIST = Problems Solutions
+SHEETNUM = 01 02 03 aa
+PREREQS = $(MAIN).tex
+SOURCES = $(SHEETNUM:%=$(SOURCE)%.tex)
+SHEETS = $(foreach trg,$(TARGETLIST),$(trg).pdf $(SHEETNUM:%=$(trg)%.pdf))
+TARGETS = $(foreach trg,$(TARGETLIST),$(trg).pdf)
+GENFILES = $(foreach trg,$(TARGETLIST),$(trg).tex $(SHEETNUM:%=$(trg)%.tex))
+BAKFILES = $(SOURCES) $(MAIN).tex $(MAKEFILE) $(SCRIPT) $(PROBLEM)*
+%    \end{macrocode}
+%\iffalse$\fi
+
+% Define some abstract targets;
+% |default| is the default target when no parameters are given:
+%    \begin{macrocode}
+default: sheets ;
+sheets: $(SHEETS) ;
+main: $(TARGETS) ;
+sheet%: $(foreach trg,$(TARGETLIST),$(trg)%.pdf) ;
+all: main sheets ;
+sources: $(GENFILES) ;
+%    \end{macrocode}
+%\iffalse$\fi
+
+% Compile particular files via |exfsermk.sh| bash script.
+% Note that command lines have to start with a tab character
+% (represented by 8 spaces here):
+%    \begin{macrocode}
+$(TARGETS): $(SOURCES) $(PREREQS)
+	bash ./$(SCRIPT) $@
+$(word 1,$(TARGETLIST))%.pdf: $(SOURCE)%.tex $(PREREQS)
+	bash ./$(SCRIPT) $@
+$(word 2,$(TARGETLIST))%.pdf: $(SOURCE)%.tex $(PREREQS)
+	bash ./$(SCRIPT) $@
+$(GENFILES):
+	bash ./$(SCRIPT) $@
+%    \end{macrocode}
+%\iffalse$\fi
+
+% Touch main file for recompile:
+%    \begin{macrocode}
+touch:
+	touch $(MAIN).tex
+%    \end{macrocode}
+%\iffalse$\fi
+% Define |clean| target to remove all intermediate compilation files:
+%    \begin{macrocode}
+clean:
+	rm -f $(SHEETNUM:%=$(SOURCE)%.aux)
+	rm -f $(SHEETNUM:%=$(SOURCE)%.log)
+	rm -f $(foreach trg,$(TARGETLIST),$(SHEETNUM:%=$(trg)%.log) $(trg).log)
+	rm -f $(patsubst %,$(MAIN)%,.aux .log .out .toc)
+	rm -f $(patsubst %,$(MAIN)%,.mp .mpx -*.mps -tmp.log -tmp.mp -tmp.mpx)
+	rm -f mpxerr.tex mpxerr.log mpxerr.dvi texput.log
+	rm -f $(patsubst %,$(PROBLEM)*%,.aux .log .mp .mpx -*.mps)
+	rm -f $(patsubst %,$(PROBLEM)*%,-tmp.log -tmp.mp -tmp.mpx)
+%    \end{macrocode}
+%\iffalse$\fi
+% Define |clean-bak| target to remove all backup files
+% ending in `|~|' or `|.bak|':
+%    \begin{macrocode}
+clean-bak:
+	rm -f $(BAKFILES:%=%~) $(BAKFILES:%=%.bak)
+%    \end{macrocode}
+% Define |clean-all| target to remove all generated files
+% for a clean source directory:
+%    \begin{macrocode}
+clean-all:  clean
+	rm -f $(SHEETS) $(TARGETS)
+	rm -f $(SHEETNUM:%=$(SOURCE)%.pdf) $(MAIN).pdf
+	rm -f $(foreach trg,$(TARGETLIST),$(SHEETNUM:%=$(trg)%.tex) $(trg).tex)
+	rm -f $(PROBLEM)*.pdf
+%    \end{macrocode}
+%\iffalse$\fi
+% \catcode9=9
+%
+%\iffalse
+%</samplemultimake>
+%\fi
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \section{Implementation}
 % \label{sec:implementation}
 %\iffalse
@@ -2047,6 +3054,14 @@
   \exf at exparg{\setkeys{#1}}{\exf at tmp}}
 %    \end{macrocode}
 
+% \macro{\exf at isif}
+% Execute |#3| if content of macro |#1| equals |#2|:
+%    \begin{macrocode}
+\newcommand{\exf at ifis}[3]%
+  {\def\exf at tmp{#2}\ifx#1\exf at tmp#3\fi}
+%    \end{macrocode}
+
+
 % \macro{\exf at href}
 % Display text with hyperreference passed by macro |#1|
 % (in case \textsf{hyperref} is loaded
@@ -2499,7 +3514,7 @@
 %    \begin{macrocode}
 \exerciseconfig{composetitlesubproblem}[1]{#1}
 %    \end{macrocode}
-% Compose solution item; argument is problem or subproblem number:
+% Compose solution item; arguments are problem and subproblem number:
 %    \begin{macrocode}
 \exerciseconfig{composeitemsolution}[2]{#1.}
 \exerciseconfig{composeitemsolutionsub}[2]{#2}
@@ -2550,7 +3565,7 @@
 %    \end{macrocode}
 % Compose label:
 %    \begin{macrocode}
-\exerciseconfig{composeitemsolution}[2]{#1#2}
+\exerciseconfig{composeitemsolutionlabel}[2]{#1#2}
 %    \end{macrocode}
 
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2595,6 +3610,44 @@
   {(\getexerciseconfig{composepoints}{#1}*\exerciseifnotempty{#2}{; #2})}
 %    \end{macrocode}
 
+% Compose pairs of points; omit 0 components:
+%    \begin{macrocode}
+\exerciseconfig{composepointspair}[2]{%
+  \ifdim#2pt=0pt%
+   \getexerciseconfig{composepoints}{#1}%
+  \else\ifdim#1pt=0pt%
+   +\getexerciseconfig{composepoints}{#2}%
+  \else%
+   \getexerciseconfig{composepointsnum}{#1}+%
+   \getexerciseconfig{composepointsnum}{#2}~%
+   \getexerciseconfig{termpoints}%
+  \fi\fi}
+%    \end{macrocode}
+% Compose pairs of points for designated use;
+% recycle plain definition if no bonus points given:
+%    \begin{macrocode}
+\exerciseconfig{composepointspairbody}[2]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsbody}{#1}\else%
+  (\getexerciseconfig{composepointspair}{#1}{#2})\fi}
+\exerciseconfig{composepointspairstart}[2]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsstart}{#1}\else%
+  (\getexerciseconfig{composepointspair}{#1}{#2})\fi}
+\exerciseconfig{composepointspairmargin}[2]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsmargin}{#1}\else%
+  \getexerciseconfig{composepointspair}{#1}{#2}\fi}
+\exerciseconfig{composepointspairsheet}[2]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointssheet}{#1}\else%
+  \getexerciseconfig{composepointspair}{#1}{#2}\fi}
+\exerciseconfig{composepointspairaward}[3]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsaward}{#1}{#3}\else%
+  (\getexerciseconfig{composepointspair}{#1}{#2}%
+   \exerciseifnotempty{#3}{; #3})\fi}
+\exerciseconfig{composepointspairawardalt}[3]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsawardalt}{#1}{#3}\else%
+  (\getexerciseconfig{composepointspair}{#1}{#2}*%
+   \exerciseifnotempty{#3}{; #3})\fi}
+%    \end{macrocode}
+
 % Display points in the margin:
 %    \begin{macrocode}
 \exerciseconfig{insertpointsmargin}[1]{\marginpar{\footnotesize #1}}
@@ -2605,6 +3658,11 @@
 \exerciseconfig{insertwarnpoints}[3]
   {\textbf{points mismatch for #1 (#2 determined vs.\ #3 given)}}
 %    \end{macrocode}
+% Display warning about points changed:
+%    \begin{macrocode}
+\exerciseconfig{insertwarnpointsrerun}[1]
+  {\textbf{points changed for #1 (please recompile)}}
+%    \end{macrocode}
 
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \paragraph{Counters.}
@@ -2688,14 +3746,9 @@
 %    \begin{macrocode}
 \def\exf at solutionbelow{subproblem}
 \define at choicekey{exf at style}{solutionbelow}%
-  {here,subproblem,subproblem*,problem,problem*,sheet,manual}%
-  {\def\exf at solutionbelow{#1}}
+  {here,here*,subproblem,subproblem*,problem,problem*,sheet,manual}%
+  {\ifexf at infile\else\def\exf at solutionbelow{#1}\fi}
 %    \end{macrocode}
-% Conditionals to compare solution locations:
-%    \begin{macrocode}
-\newcommand{\exf at solbelowis}[2]%
-  {\def\exf at tmp{#1}\ifx\exf at solutionbelow\exf at tmp#2\fi}
-%    \end{macrocode}
 %
 % \macro{sheetequation}
 % \macro{problemequation}
@@ -2719,13 +3772,6 @@
 \define at choicekey{exf at style}{subpointsat}%
   {start,start*,margin,end,manual,off}{\def\exf at subpointsat{#1}}
 %    \end{macrocode}
-% Conditionals to compare point locations:
-%    \begin{macrocode}
-\newcommand{\exf at pointsatis}[2]%
-  {\def\exf at tmp{#1}\ifx\exf at pointsat\exf at tmp#2\fi}
-\newcommand{\exf at subpointsatis}[2]%
-  {\def\exf at tmp{#1}\ifx\exf at subpointsat\exf at tmp#2\fi}
-%    \end{macrocode}
 %
 % \macro{problemby}
 % \macro{equationby}
@@ -2754,7 +3800,7 @@
 % Use vulgar fractions to display binary fractional points:
 %    \begin{macrocode}
 \defexercisestyle{fracpoints}%
-  {\exerciseconfig{composepointsnum}[1]{\exf at nicefrac{##1}}}
+  {\exerciseconfig{composepointsnum}[1]{\protect\exf at nicefrac{##1}}}
 %    \end{macrocode}
 %
 % \macro{twoside}
@@ -2951,9 +3997,8 @@
 %    \end{macrocode}
 % Special points processing:
 %    \begin{macrocode}
-\def\exf at data@sheet at rawpoints{}
-\def\exf at data@sheet at points{\exf at config@composepointssheet%
-  {\exf at data@sheet at rawpoints}}%
+\def\exf at data@sheet at points{\ifdefined\exf at sheet@points%
+   \expandafter\exf at config@composepointspairsheet\exf at sheet@points\fi}%
 %    \end{macrocode}
 
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -3159,15 +4204,14 @@
 
 % Automatic writing at |\begin{document}|:
 %    \begin{macrocode}
-\AtBeginDocument{\def\exf at tmp{auto}\ifx\exf at metadata\exf at tmp%
-  \exf at writemetadata{}\fi}
+\AtBeginDocument{\exf at ifis\exf at metadata{auto}{\exf at writemetadata{}}}
 %    \end{macrocode}
 
 % \macro{\writeexercisedata}
 % Write metadata manually:
 %    \begin{macrocode}
-\newcommand{\writeexercisedata}{\def\exf at tmp{manual}\ifx\exf at metadata\exf at tmp%
-  \exf at writemetadata{}\fi}
+\newcommand{\writeexercisedata}{%
+  \exf at ifis\exf at metadata{manual}{\exf at writemetadata{}}}
 %    \end{macrocode}
 
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -3410,6 +4454,113 @@
 % \label{sec:imp-points}
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Points Arithmetic.}
+%
+% \macro{\exf at addtopoints}
+% Add points |#2|+|#3| to macro |#1| using metric register:
+%    \begin{macrocode}
+\newcommand{\exf at addtopoints}[3]{%
+  \ifdefined#1\else\def#1{{0}{0}}\fi%
+  \setlength\exf at tmpdim{\expandafter\@firstoftwo#1pt}%
+  \addtolength\exf at tmpdim{#2pt}%
+  \edef\exf at tmp{\strip at pt\exf at tmpdim}%
+  \setlength\exf at tmpdim{\expandafter\@secondoftwo#1pt}%
+  \addtolength\exf at tmpdim{#3pt}%
+  \xdef#1{{\exf at tmp}{\strip at pt\exf at tmpdim}}}
+%    \end{macrocode}
+%
+% \macro{\exf at pointsmismatch}
+% Execute |#3| if points disagree:
+%    \begin{macrocode}
+\newcommand{\exf at pointsmismatch}[3]{%
+  \let\exf at tmp\@undefined%
+  \ifdim\expandafter\@firstoftwo#1pt=\expandafter\@firstoftwo#2pt\else%
+   \def\exf at tmp{}\fi%
+  \ifdim\expandafter\@secondoftwo#1pt=\expandafter\@secondoftwo#2pt\else%
+   \def\exf at tmp{}\fi%
+  \ifdefined\exf at tmp#3\fi}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Points Expansion.}
+%
+% \macro{\exf at outpoints}
+% If points macro |#3| is set,
+% expand |#3|, pass on as |#1{\protect#2}#3| and clear |#3| globally:
+%    \begin{macrocode}
+\def\exf at outpoints#1#2#3{\ifdefined#3%
+   \exf at exptwo\exf at outpoints@switch{#3}{#1}{#2}%
+   \global\let#3\@undefined\fi}
+\def\exf at outpoints@switch#1#2#3{#2{\protect#3#1}}
+%    \end{macrocode}
+
+% \macro{\exf at scanpoints}
+% Call as |\exf at scanpoints#1|[\textit{regular}][|+|\textit{bonus}]|++&| to
+% write |{|\textit{regular}|}{|\textit{bonus}|}| into |#1|;
+% fill with 0 if empty:
+%    \begin{macrocode}
+\def\exf at scanpoints#1#2+#3+#4&{%
+  \edef#1{\if&#2&0\else#2\fi}%
+  \edef#1{{#1}{\if&#3&0\else#3\fi}}}
+%    \end{macrocode}
+% \macro{\exf at formatpoints}
+% Format as [|#1|][|+#2|]; remove 0 components:
+%    \begin{macrocode}
+\def\exf at formatpoints#1#2{\ifdim#2pt=0pt#1\else%
+  \ifdim#1pt=0pt+#2\else#1+#2\fi\fi}
+%    \end{macrocode}
+
+% \macro{\extractpoints}
+% Extract main (plain) or bonus (starred) part from saved points register:
+%    \begin{macrocode}
+\newcommand{\extractpoints}{\@ifstar{\exf at extractpoints\@secondoftwo}%
+  {\exf at extractpoints\@firstoftwo}}
+\newcommand{\exf at extractpoints}[2]{\edef\exf at tmp{#2}%
+  \exf at exptwo\exf at scanpoints\exf at tmp\exf at tmp++&%
+  \expandafter#1\exf at tmp}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Tools.}
+%
+% \macro{\exf at makepointsmargin}
+% Combination to typeset points in margin:
+%    \begin{macrocode}
+\newcommand{\exf at makepointsmargin}[2]{%
+  \exf at config@insertpointsmargin{\exf at config@composepointspairmargin{#1}{#2}}}
+%    \end{macrocode}
+
+% \macro{\exf at warnmismatch}
+% If points |#3| and |#4| are defined and disagree,
+% issue a warning message:
+%    \begin{macrocode}
+\newcommand{\exf at warnmismatch}[4]{%
+  \ifdefined#4\ifdefined#3\exf at pointsmismatch#3#4{%
+   \let\exf at tmp\PackageWarning%
+   \ifx#1\exf at solutionname\let\exf at tmp\PackageWarningNoLine\fi%
+   \exf at tmp{exframe}{points mismatch %
+    (\expandafter\exf at formatpoints#3 determined %
+    vs. \expandafter\exf at formatpoints#4 given) %
+    for #1 \csname the#2\endcsname}%
+   \ifexf at warntext\edef\exf at tmp{%
+    {\expandafter\exf at formatpoints#3}{\expandafter\exf at formatpoints#4}}%
+    \exf at exptwo\exf at config@insertwarnpoints#1\exf at tmp\fi}%
+  \fi\fi}
+%    \end{macrocode}
+%
+% \macro{\exf at warnrerun}
+% If points |#3| and |#4| are defined and disagree,
+% issue advice to recompile:
+%    \begin{macrocode}
+\newcommand{\exf at warnrerun}[4]{%
+  \ifdefined#4\ifdefined#3\exf at pointsmismatch#3#4{%
+   \PackageWarning{exframe}{points changed %
+    for #1 \csname the#2\endcsname; rerun to fix}%
+   \ifexf at warntext\exf at config@insertwarnpointsrerun#1\fi}%
+  \fi\fi}
+%    \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \paragraph{Binary Rational Numbers.}
 %
 % \macro{\exf at splitsign}
@@ -3459,12 +4610,6 @@
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \paragraph{Sheet Points Code.}
 %
-% \macro{\exf at sheet@points at dim}
-% Declare a metric register to sum overall points on a sheet;
-% equate unit |pt| to a point:
-%    \begin{macrocode}
-\newlength{\exf at sheet@points at dim}
-%    \end{macrocode}
 % \macro{\exf at notesheetpoints}
 % Store a sheet point number in a macro:
 %    \begin{macrocode}
@@ -3479,8 +4624,9 @@
 % \macro{\exf at writesheetpoints}
 % Write sheet points to the |.aux| file:
 %    \begin{macrocode}
-\newcommand{\exf at writesheetpoints}[1]%
-  {\immediate\write\@auxout{\string\exf at notesheetpoints{\sheettag}{#1}}}
+\newcommand{\exf at writesheetpoints}[2]%
+  {\immediate\write\@auxout{\string\exf at notesheetpoints{\sheettag}%
+   {\exf at formatpoints{#1}{#2}}}}
 %    \end{macrocode}
 % \macro{\getsheetpoints}
 % Read sheet points stored in |.aux| file:
@@ -3492,12 +4638,6 @@
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \paragraph{Problem Points Code.}
 %
-% \macro{\exf at problem@points at dim}
-% Declare a metric register to sum overall points in a problem;
-% equate unit |pt| to a point:
-%    \begin{macrocode}
-\newlength{\exf at problem@points at dim}
-%    \end{macrocode}
 % \macro{\exf at noteproblempoints}
 % Store a problem point number in a macro:
 %    \begin{macrocode}
@@ -3512,8 +4652,9 @@
 % \macro{\exf at writeproblempoints}
 % Write problem points to the |.aux| file:
 %    \begin{macrocode}
-\newcommand{\exf at writeproblempoints}[1]%
-  {\immediate\write\@auxout{\string\exf at noteproblempoints{\problemtag}{#1}}}
+\newcommand{\exf at writeproblempoints}[2]%
+  {\immediate\write\@auxout{\string\exf at noteproblempoints{\problemtag}%
+   {\exf at formatpoints{#1}{#2}}}}
 %    \end{macrocode}
 % \macro{\getproblempoints}
 % Read problem points stored in |.aux| file:
@@ -3526,16 +4667,10 @@
 % Show points within a problem or subproblem:
 %    \begin{macrocode}
 \newcommand{\showpoints}{%
-  \ifdefined\exf at in@subproblem%
-   \ifdefined\exf at subproblem@points%
-    \exf at ensuretext{\exf at config@composepointsbody{\exf at subproblem@points}}%
-    \global\let\exf at subproblem@points\@undefined%
-   \fi%
-  \else\ifdefined\exf at in@problem%
-   \ifdefined\exf at problem@pointsshow%
-    \exf at ensuretext{\exf at config@composepointsbody{\exf at problem@pointsshow}}%
-    \global\let\exf at problem@pointsshow\@undefined%
-   \fi%
+  \ifdefined\exf at in@subproblem\exf at outpoints{\exf at ensuretext}%
+   {\exf at config@composepointspairbody}{\exf at subproblem@points}%
+  \else\ifdefined\exf at in@problem\exf at outpoints{\exf at ensuretext}%
+   {\exf at config@composepointspairbody}{\exf at problem@points at show}%
   \fi\fi}
 %    \end{macrocode}
 
@@ -3542,27 +4677,23 @@
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \paragraph{Solution Points Code.}
 %
-% \macro{\exf at solution@points at dim}
-% Declare a metric register to sum overall (mandatory) points in a solution;
-% equate unit |pt| to a point:
-%    \begin{macrocode}
-\newlength{\exf at solution@points at dim}
-%    \end{macrocode}
-
 % \macro{\exf at awardpointsalt}
 % Award points for alternative or optional solution;
 % does not count towards solution total:
 %    \begin{macrocode}
-\newcommand{\exf at awardpointsalt}[2][]{%
-  \exf at ensuretext{\exf at config@composepointsawardalt{#2}{#1}}}
+\newcommand{\exf at awardpointsalt}[2][]{\exf at scanpoints\exf at tmp#2++&%
+  \exf at exptwo\exf at ensuretext{%
+   \expandafter\exf at config@composepointspairawardalt\exf at tmp{#1}}}
 %    \end{macrocode}
 % \macro{\exf at awardpointsreg}
 % Award points for regular solution;
 % counts towards solution total:
 %    \begin{macrocode}
-\newcommand{\exf at awardpointsreg}[2][]{%
-  \global\addtolength{\exf at solution@points at dim}{#2 pt}%
-  \exf at ensuretext{\exf at config@composepointsaward{#2}{#1}}}
+\newcommand{\exf at awardpointsreg}[2][]{\exf at scanpoints\exf at tmp#2++&%
+  \exf at exptwo\exf at addtopoints\exf at solution@points at total\exf at tmp%
+  \exf at scanpoints\exf at tmp#2++&%
+  \exf at exptwo\exf at ensuretext{%
+   \expandafter\exf at config@composepointspairaward\exf at tmp{#1}}}
 %    \end{macrocode}
 % \macro{\awardpoints}
 % Award points within solution with optional starred form:
@@ -3580,7 +4711,7 @@
 % \macro{exf at sheet}
 % Define options for |sheet| environment:
 %    \begin{macrocode}
-\define at key{exf at sheet}{points}{\def\exf at points@given{#1}}
+\define at key{exf at sheet}{points}{\exf at scanpoints\exf at points@given#1++&}
 \define at key{exf at sheet}{number}{\setcounter{\exf at sheetcounter}{#1}}
 \define at key{exf at sheet}{label}{\def\exf at label{#1}}
 \define at key{exf at sheet}{tag}{\def\sheettag{#1}}
@@ -3599,7 +4730,7 @@
 % Use equation counter for sheets:
 %    \begin{macrocode}
   \ifexf at style@sheetequation%
-   \exf at eqsav\value{equation}%
+   \exf at eqsav\value{equation}\relax%
    \setcounter{equation}{\value{exf at sheetequation}}%
    \let\theequation\theexf at sheetequation%
    \let\theHequation\theHexf at sheetequation%
@@ -3609,7 +4740,7 @@
 %    \begin{macrocode}
   \let\exf at points@given\@undefined%
   \def\sheettag{\csname the\exf at sheetcounter\endcsname}%
-  \setlength{\exf at sheet@points at dim}{0pt}%
+  \let\exf at sheet@points at total\@undefined%
   \let\exf at label\@undefined%
   \setkeys{exf at sheet}{#1}%
 %    \end{macrocode}
@@ -3620,16 +4751,17 @@
 %    \end{macrocode}
 % Set points from explicit input or from |.aux| storage:
 %    \begin{macrocode}
+  \let\exf at sheet@points\@undefined%
   \ifdefined\exf at points@given%
-   \let\exf at data@sheet at rawpoints\exf at points@given%
+   \let\exf at sheet@points\exf at points@given%
   \else\ifcsname exf at sheetpoints@\sheettag\endcsname%
-   \exf at csdotwo\let\exf at data@sheet at rawpoints{exf at sheetpoints@\sheettag}%
+   \exf at csdotwo\let\exf at tmp{exf at sheetpoints@\sheettag}%
+   \exf at exptwo\exf at scanpoints\exf at sheet@points\exf at tmp++&%
   \fi\fi%
 %    \end{macrocode}
 % Process metadata:
 %    \begin{macrocode}
-  \def\exf at tmp{sheet}\ifx\exf at metadata\exf at tmp%
-   \exf at writemetadata{sheet}\fi%
+  \exf at ifis\exf at metadata{sheet}{\exf at writemetadata{sheet}}%
 %    \end{macrocode}
 % Insert hook code:
 %    \begin{macrocode}
@@ -3651,44 +4783,29 @@
 % perform sanity check on total points if given explicitly:
 %    \begin{macrocode}
  {\ifdefined\exf at points@given%
-   \ifdim\exf at sheet@points at dim=0pt\else%
-    \ifdim\exf at sheet@points at dim=\exf at data@sheet at rawpoints pt\else%
-     \PackageWarning{exframe}{points mismatch for %
-      \exf at sheetname\space\csname the\exf at sheetcounter\endcsname}%
-     \ifexf at warntext\exf at config@insertwarnpoints{\exf at sheetname}%
-      {\strip at pt\exf at sheet@points at dim}{\exf at data@sheet at rawpoints}\fi%
-   \fi\fi%
+   \exf at warnmismatch{\exf at sheetname}{\exf at sheetcounter}%
+    {\exf at sheet@points at total}{\exf at sheet@points}%
 %    \end{macrocode}
 % Test whether points have changed since last compile:
 %    \begin{macrocode}
   \else%
-   \ifx\exf at data@sheet at rawpoints\exf at empty\else%
-    \ifdim\exf at sheet@points at dim=\exf at data@sheet at rawpoints pt\else%
-     \PackageWarning{exframe}{points changed for %
-      \exf at sheetname\space\csname the\exf at sheetcounter\endcsname;
-      rerun to fix}%
-     \ifexf at warntext\exf at config@insertwarnpoints{\exf at sheetname}%
-      {\strip at pt\exf at sheet@points at dim}{\exf at data@sheet at rawpoints}\fi%
-   \fi\fi%
+   \exf at warnrerun{\exf at sheetname}{\exf at sheetcounter}%
+    {\exf at sheet@points at total}{\exf at sheet@points}%
 %    \end{macrocode}
-% Store points if not given explicitly:
+% Store points:
 %    \begin{macrocode}
-   \ifdim\exf at sheet@points at dim=0pt%
-    \def\exf at data@sheet at rawpoints{}%
-   \else%
-    \edef\exf at data@sheet at rawpoints{\strip at pt\exf at sheet@points at dim}%
-   \fi%
+   \let\exf at sheet@points\exf at sheet@points at total%
   \fi%
 %    \end{macrocode}
 % Write sheet points to |.aux| file:
 %    \begin{macrocode}
-  \ifx\exf at data@sheet at rawpoints\exf at empty\else%
-   \exf at writesheetpoints{\exf at data@sheet at rawpoints}%
+  \ifdefined\exf at sheet@points%
+   \expandafter\exf at writesheetpoints\exf at sheet@points%
   \fi%
 %    \end{macrocode}
 % Insert solutions:
 %    \begin{macrocode}
-  \exf at solbelowis{sheet}{\insertsolutions}%
+  \exf at ifis\exf at solutionbelow{sheet}{\insertsolutions}%
 %    \end{macrocode}
 % Insert hook code:
 %    \begin{macrocode}
@@ -3721,7 +4838,7 @@
 % \macro{exf at problem}
 % Define options for |problem| environment:
 %    \begin{macrocode}
-\define at key{exf at problem}{points}{\def\exf at points@given{#1}}
+\define at key{exf at problem}{points}{\exf at scanpoints\exf at points@given#1++&}
 \define at key{exf at problem}{label}{\def\exf at label{#1}}
 \define at key{exf at problem}{tag}{\def\problemtag{#1}}
 \define at key{exf at problem}{sollabel}{\xdef\exf at sollabel{#1}}
@@ -3752,7 +4869,7 @@
 % Use equation counter for problems:
 %    \begin{macrocode}
   \ifexf at style@problemequation%
-   \exf at eqsav\value{equation}%
+   \exf at eqsav\value{equation}\relax%
    \setcounter{equation}{\value{exf at problemequation}}%
    \let\theequation\theexf at problemequation%
    \let\theHequation\theHexf at problemequation%
@@ -3765,7 +4882,7 @@
   \let\exf at points@given\@undefined%
   \let\exf at label\@undefined%
   \global\let\exf at sollabel\@undefined%
-  \setlength{\exf at problem@points at dim}{0pt}%
+  \let\exf at problem@points at total\@undefined%
   \setkeys{exf at problem,exf at probleminfo}{#1}%
 %    \end{macrocode}
 % Process automatic and manual labels:
@@ -3782,9 +4899,9 @@
     \csname theH\exf at problemcounter\endcsname}%
   \fi%
   \ifx\exf at data@problem at rawtitle\exf at empty%
-    \global\let\exf at prevprobtitle\@undefined%
+   \global\let\exf at prevprobtitle\@undefined%
   \else%
-    \protected at xdef\exf at prevprobtitle{\exf at data@problem at rawtitle}%
+   \protected at xdef\exf at prevprobtitle{\exf at data@problem at rawtitle}%
   \fi%
   \global\let\exf at prevsubprob\@undefined%
   \global\let\exf at prevsubprobhref\@undefined%
@@ -3794,31 +4911,27 @@
   \let\exf at problem@points\@undefined%
   \ifdefined\exf at points@given%
    \let\exf at problem@points\exf at points@given%
-  \else%
-   \ifcsname exf at problempoints@\problemtag\endcsname%
-    \exf at csdotwo\let\exf at problem@points{exf at problempoints@\problemtag}%
+  \else\ifcsname exf at problempoints@\problemtag\endcsname%
+   \exf at csdotwo\let\exf at tmp{exf at problempoints@\problemtag}%
+   \exf at exptwo\exf at scanpoints\exf at problem@points\exf at tmp++&%
   \fi\fi%
   \global\let\exf at prevpoints\exf at problem@points%
-  \let\exf at problem@pointsshow\@undefined%
-  \ifdefined\exf at problem@points\ifdim\exf at problem@points pt=0pt\else%
-   \let\exf at problem@pointsshow\exf at problem@points%
-  \fi\fi%
+  \let\exf at problem@points at show\@undefined%
+  \ifdefined\exf at problem@points%
+   \let\exf at problem@points at show\exf at problem@points%
+  \fi%
 %    \end{macrocode}
 % Disable points display if desired:
 %    \begin{macrocode}
-  \exf at pointsatis{off}{\let\exf at problem@pointsshow\@undefined}%
+  \exf at ifis\exf at pointsat{off}{\let\exf at problem@points at show\@undefined}%
 %    \end{macrocode}
 % Display points in opening line if desired;
 % expand points into argument and remove points:
 %    \begin{macrocode}
-  \exf at pointsatis{start}{\ifdefined\exf at problem@pointsshow%
-   \exf at exptwo\exf at append@intro{\expandafter%
-    \exf at config@composepointsstart\expandafter{\exf at problem@pointsshow}}%
-   \let\exf at problem@pointsshow\@undefined\fi}%
-  \exf at pointsatis{start*}{\ifdefined\exf at problem@pointsshow%
-   \exf at exptwo\exf at prepend@intro{\expandafter%
-    \exf at config@composepointsstart\expandafter{\exf at problem@pointsshow}}%
-   \let\exf at problem@pointsshow\@undefined\fi}%
+  \exf at ifis\exf at pointsat{start}{\exf at outpoints{\exf at append@intro}%
+   {\exf at config@composepointspairstart}{\exf at problem@points at show}}%
+  \exf at ifis\exf at pointsat{start*}{\exf at outpoints{\exf at prepend@intro}%
+   {\exf at config@composepointspairstart}{\exf at problem@points at show}}%
 %    \end{macrocode}
 % Insert hook code, set problem body style:
 %    \begin{macrocode}
@@ -3864,12 +4977,9 @@
 % Write points into margin if desired;
 % expand points into argument and remove points:
 %    \begin{macrocode}
-  \exf at pointsatis{margin}{\ifdefined\exf at problem@pointsshow%
-   \expandafter\exf at prepend@def\expandafter\exf at intro\expandafter%
-    {\expandafter\protect\expandafter%
-     \exf at config@insertpointsmargin\expandafter{\expandafter%
-      \exf at config@composepointsmargin\expandafter{\exf at problem@pointsshow}}}%
-   \let\exf at problem@pointsshow\@undefined\fi}%
+  \exf at ifis\exf at pointsat{margin}{%
+   \exf at outpoints{\exf at prepend@def\exf at introitem}%
+   {\exf at makepointsmargin}{\exf at problem@points at show}}%
 %    \end{macrocode}
 % Write out opening line:
 %    \begin{macrocode}
@@ -3887,50 +4997,32 @@
 %    \end{macrocode}
 % End environment, show points if desired:
 %    \begin{macrocode}
- {\exf at pointsatis{end}{\showpoints}%
+ {\exf at ifis\exf at pointsat{end}{\showpoints}%
 %    \end{macrocode}
 % Perform sanity checks on total points if given explicitly:
 %    \begin{macrocode}
   \ifdefined\exf at points@given%
-   \ifdim\exf at problem@points at dim=0pt\else%
-    \ifdim\exf at problem@points at dim=\exf at problem@points pt\else%
-     \PackageWarning{exframe}{points mismatch for %
-      \exf at problemname\space\csname the\exf at problemcounter\endcsname}%
-     \ifexf at warntext\exf at config@insertwarnpoints{\exf at problemname}%
-      {\strip at pt\exf at problem@points at dim}{\exf at problem@points}\fi%
-   \fi\fi%
+   \exf at warnmismatch{\exf at problemname}{\exf at problemcounter}%
+    {\exf at problem@points at total}{\exf at problem@points}%
 %    \end{macrocode}
 % Warn if calculated total points have changed:
 %    \begin{macrocode}
   \else%
-   \ifdefined\exf at problem@points%
-    \ifdim\exf at problem@points at dim=\exf at problem@points pt\else%
-     \PackageWarning{exframe}{points changed for %
-      \exf at problemname\space\csname the\exf at problemcounter\endcsname;
-      rerun to fix}%
-     \ifexf at warntext\exf at config@insertwarnpoints{\exf at problemname}%
-      {\strip at pt\exf at problem@points at dim}{\exf at problem@points}\fi%
-   \fi\fi%
+   \exf at warnrerun{\exf at problemname}{\exf at problemcounter}%
+    {\exf at problem@points at total}{\exf at problem@points}%
 %    \end{macrocode}
-% Read computed total points, check whether zero:
+% Read computed total points:
 %    \begin{macrocode}
-   \ifdim\exf at problem@points at dim=0pt%
-    \let\exf at problem@points\@undefined%
-   \else%
-    \edef\exf at problem@points{\strip at pt\exf at problem@points at dim}%
-   \fi%
+   \let\exf at problem@points\exf at problem@points at total%
   \fi%
 %    \end{macrocode}
 % Write points to |.aux| file; add to sheet total:
 %    \begin{macrocode}
   \ifdefined\exf at problem@points%
-   \exf at writeproblempoints{\exf at problem@points}%
-   \global\addtolength{\exf at sheet@points at dim}{\exf at problem@points pt}%
+   \expandafter\exf at writeproblempoints\exf at problem@points%
+   \exf at exptwo\exf at addtopoints\exf at sheet@points at total\exf at problem@points%
   \fi%
-%    \end{macrocode}
-% Warn if some but not all problems on sheet declare points:
-%    \begin{macrocode}
-  \ifdefined\exf at problem@points\else\ifdim\exf at sheet@points at dim=0pt\else%
+  \ifdefined\exf at problem@points\else\ifdefined\exf at sheet@points at total%
    \PackageWarning{exframe}{no points defined for \exf at problemname}%
   \fi\fi%
 %    \end{macrocode}
@@ -3945,7 +5037,7 @@
 %    \end{macrocode}
 % Display solution if desired:
 %    \begin{macrocode}
-  \exf at solbelowis{problem}{%
+  \exf at ifis\exf at solutionbelow{problem}{%
    \exf at config@insertproblemsolution%
    \exf at showsolutions{\exf at config@composetitlesolutionmulti}{}}%
 %    \end{macrocode}
@@ -3967,7 +5059,7 @@
 %    \end{macrocode}
 % Display solution if desired:
 %    \begin{macrocode}
-  \exf at solbelowis{problem*}{%
+  \exf at ifis\exf at solutionbelow{problem*}{%
    \exf at showsolutions{\exf at config@composetitlesolutionmulti}{}}%
 %    \end{macrocode}
 % Done:
@@ -3981,7 +5073,7 @@
 % \macro{exf at subproblem}
 % Define options for |subproblem| environment:
 %    \begin{macrocode}
-\define at key{exf at subproblem}{points}{\def\exf at subproblem@points{#1}}
+\define at key{exf at subproblem}{points}{\exf at scanpoints\exf at subproblem@points#1++&}
 \define at key{exf at subproblem}{label}{\def\exf at label{#1}}
 %    \end{macrocode}
 
@@ -4027,12 +5119,12 @@
 %    \begin{macrocode}
   \ifdefined\exf at subproblem@points%
    \global\let\exf at prevpoints\exf at subproblem@points%
-   \global\addtolength{\exf at problem@points at dim}{\exf at subproblem@points pt}%
+   \exf at exptwo\exf at addtopoints\exf at problem@points at total\exf at subproblem@points%
 %    \end{macrocode}
 % Warn if no points given for present subproblem but previously:
 %    \begin{macrocode}
   \else%
-   \ifdim\exf at problem@points at dim=0pt\else%
+   \ifdefined\exf at problem@points at total%
     \PackageWarning{exframe}{no points defined for \exf at subproblemname}%
    \fi%
   \fi%
@@ -4039,19 +5131,15 @@
 %    \end{macrocode}
 % Disable points display if desired:
 %    \begin{macrocode}
-  \exf at subpointsatis{off}{\let\exf at subproblem@points\@undefined}%
+  \exf at ifis\exf at subpointsat{off}{\let\exf at subproblem@points\@undefined}%
 %    \end{macrocode}
 % Display points in opening line if desired;
 % expand points into argument and remove points:
 %    \begin{macrocode}
-  \exf at subpointsatis{start}{\ifdefined\exf at subproblem@points%
-   \exf at exptwo\exf at append@intro{\expandafter%
-    \exf at config@composepointsstart\expandafter{\exf at subproblem@points}}%
-   \let\exf at subproblem@points\@undefined\fi}%
-  \exf at subpointsatis{start*}{\ifdefined\exf at subproblem@points%
-   \exf at exptwo\exf at prepend@intro{\expandafter%
-    \exf at config@composepointsstart\expandafter{\exf at subproblem@points}}%
-   \let\exf at subproblem@points\@undefined\fi}%
+  \exf at ifis\exf at subpointsat{start}{\exf at outpoints{\exf at append@intro}%
+   {\exf at config@composepointspairstart}{\exf at subproblem@points}}%
+  \exf at ifis\exf at subpointsat{start*}{\exf at outpoints{\exf at prepend@intro}%
+   {\exf at config@composepointspairstart}{\exf at subproblem@points}}%
 %    \end{macrocode}
 % Insert hook code:
 %    \begin{macrocode}
@@ -4089,12 +5177,9 @@
 % Write points into margin if desired;
 % expand points into argument and remove points:
 %    \begin{macrocode}
-  \exf at subpointsatis{margin}{\ifdefined\exf at subproblem@points%
-   \expandafter\exf at prepend@def\expandafter\exf at intro\expandafter%
-    {\expandafter\protect\expandafter%
-     \exf at config@insertpointsmargin\expandafter{\expandafter%
-      \exf at config@composepointsmargin\expandafter{\exf at subproblem@points}}}%
-   \let\exf at subproblem@points\@undefined\fi}%
+  \exf at ifis\exf at subpointsat{margin}{%
+   \exf at outpoints{\exf at prepend@def\exf at introitem}%
+   {\exf at makepointsmargin}{\exf at subproblem@points}}%
 %    \end{macrocode}
 % Write out opening line:
 %    \begin{macrocode}
@@ -4106,7 +5191,7 @@
 %    \end{macrocode}
 % End environment, show points if desired:
 %    \begin{macrocode}
- {\exf at subpointsatis{end}{\showpoints}%
+ {\exf at ifis\exf at subpointsat{end}{\showpoints}%
 %    \end{macrocode}
 % End paragraph and block:
 %    \begin{macrocode}
@@ -4114,7 +5199,7 @@
 %    \end{macrocode}
 % Display solution if desired:
 %    \begin{macrocode}
-  \exf at solbelowis{subproblem*}{%
+  \exf at ifis\exf at solutionbelow{subproblem*}{%
    \exf at config@insertsubproblemsolution%
    \exf at showsolutions{\exf at config@composetitlesolutionsingle}{}}%
 %    \end{macrocode}
@@ -4129,7 +5214,7 @@
 %    \end{macrocode}
 % Display solution if desired:
 %    \begin{macrocode}
-  \exf at solbelowis{subproblem}{%
+  \exf at ifis\exf at solutionbelow{subproblem}{%
    \exf at showsolutions{\exf at config@composetitlesolutionsingle}{}}%
 %    \end{macrocode}
 % Done:
@@ -4149,7 +5234,7 @@
 \define at key{exf at solution}{sheettag}{\def\sheettag{#1}}
 \define at key{exf at solution}{href}{\def\exf at solhref{#1}}
 \define at key{exf at solution}{label}{\def\exf at label{#1}}
-\define at key{exf at solution}{points}{\def\exf at solution@points{#1}}
+\define at key{exf at solution}{points}{\exf at scanpoints\exf at solution@points#1++&}
 \define at key{exf at solution}{probtitle}{\def\exf at solprobtitle{#1}}
 %    \end{macrocode}
 
@@ -4171,7 +5256,7 @@
 % Use equation counter for solutions:
 %    \begin{macrocode}
   \ifexf at style@solutionequation%
-   \exf at eqsav\value{equation}%
+   \exf at eqsav\value{equation}\relax%
    \setcounter{equation}{\value{exf at solutionequation}}%
    \let\theequation\theexf at solutionequation%
    \let\theHequation\theHexf at solutionequation%
@@ -4183,7 +5268,7 @@
   \def\exf at solprob{}%
   \def\exf at solsubprob{}%
   \let\exf at label\@undefined%
-  \setlength{\exf at solution@points at dim}{0pt}%
+  \let\exf at solution@points at total\@undefined%
   \def\exf at solhref{}%
   \exf at init@block{\exf at config@skipsolutioninfo}%
   \setkeys{exf at solution,exf at probleminfo}{#1}%
@@ -4191,7 +5276,7 @@
 % Set solution counter to reflect associated problem:
 %    \begin{macrocode}
   \exf at csdo\def{the\exf at solutioncounter}%
-   {\exf at config@composeitemsolution{\exf at solprob}{\exf at solsubprob}}%
+   {\exf at config@composeitemsolutionlabel{\exf at solprob}{\exf at solsubprob}}%
   \refstepcounter{\exf at solutioncounter}%
 %    \end{macrocode}
 % Set label:
@@ -4269,12 +5354,8 @@
 %    \end{macrocode}
 % End environment, show points if desired, perform sanity check:
 %    \begin{macrocode}
- {\ifdefined\exf at solution@points\ifdim\exf at solution@points at dim=0pt\else%
-   \ifdim\exf at solution@points at dim=\exf at solution@points pt\else%
-    \PackageWarning{exframe}{points mismatch in \exf at solutionname}%
-    \ifexf at warntext\exf at config@insertwarnpoints{\exf at solutionname}%
-     {\strip at pt\exf at solution@points at dim}{\exf at solution@points}\fi%
-  \fi\fi\fi%
+ {\exf at warnmismatch{\exf at solutionname}{\exf at solutioncounter}%
+   {\exf at solution@points at total}{\exf at solution@points}%
 %    \end{macrocode}
 % End paragraph and block:
 %    \begin{macrocode}
@@ -4321,9 +5402,9 @@
   \let\exf at composetitle\exf at config@composetitlesolutionsproblemmulti%
   \def\exf at solutionstoc{\exf at addcontentsline{\exf at config@toclevelsolution}%
     {\exf at config@composetocsolution{\exf at solprob}{\exf at solprobtitle}}}%
-  \exf at solbelowis{problem}{\let\exf at composetitle%
+  \exf at ifis\exf at solutionbelow{problem}{\let\exf at composetitle%
     \exf at config@composetitlesolutionsproblemsingle}%
-  \exf at solbelowis{problem*}{\let\exf at composetitle%
+  \exf at ifis\exf at solutionbelow{problem*}{\let\exf at composetitle%
     \exf at config@composetitlesolutionsproblemsingle}%
 %    \end{macrocode}
 % Write section line:
@@ -4340,11 +5421,15 @@
 %
 % \macro{solution}
 % Define |solution| environment (potentially using custom name);
-% pass on to |exf at scansolution| environment via
-% |\exf at scanblock| mechanism:
+% pass to |exf at scansolution| environment via
+% |\exf at scanblock| mechanism;
+% redefine |\exf at scanblock| in |solutionbelow=here*| mode:
 %    \begin{macrocode}
 \newenvironment{\exf at solutionname}%
-  {\exf at scanblock{\exf at scansolution}}{\endexf at scansolution}%
+  {\exf at ifis\exf at solutionbelow{here*}{%
+    \newcommand{\exf at scanblockplain}[1][]{\exf at scansolution{##1}{}}%
+    \def\exf at scanblock##1{\exf at scanblockplain}}%
+   \exf at scanblock{\exf at scansolution}}{\endexf at scansolution}%
 %    \end{macrocode}
 
 % \macro{exf at scansolution}
@@ -4355,7 +5440,8 @@
 % If solution is to be displayed immediately,
 % make sure to display points first:
 %    \begin{macrocode}
-  \exf at solbelowis{here}{\showpoints}%
+  \exf at ifis\exf at solutionbelow{here}{\showpoints}%
+  \exf at ifis\exf at solutionbelow{here*}{\showpoints}%
   \global\exf at bufcleanfalse%
 %    \end{macrocode}
 % If this is the first solution within a new section,
@@ -4366,9 +5452,10 @@
     \ifdefined\exf at prevprobtitle,probtitle={\exf at prevprobtitle}\fi%
     \ifdefined\exf at prevprobhref,href={\exf at prevprobhref}\fi%
     \ifdefined\exf at sollabel,label={\exf at sollabel}\fi}%
-   \exf at solbelowis{here}{\let\exf at probarg\@undefined}%
-   \exf at solbelowis{subproblem}{\let\exf at probarg\@undefined}%
-   \exf at solbelowis{subproblem*}{\let\exf at probarg\@undefined}%
+   \exf at ifis\exf at solutionbelow{here}{\let\exf at probarg\@undefined}%
+   \exf at ifis\exf at solutionbelow{here*}{\let\exf at probarg\@undefined}%
+   \exf at ifis\exf at solutionbelow{subproblem}{\let\exf at probarg\@undefined}%
+   \exf at ifis\exf at solutionbelow{subproblem*}{\let\exf at probarg\@undefined}%
    \ifdefined\exf at probarg%
     \ifexf at lineno\exf at addbufline{\exf at linesep}\exf at addbufline{\exf at lineno}\fi%
     \exf at addbufline{\@backslashchar solutionssection{\exf at probarg}}%
@@ -4386,13 +5473,13 @@
 %    \begin{macrocode}
   \def\exf at subprobarg{%
     \ifdefined\exf at prevprob prob={\exf at prevprob},\fi%
-    \ifdefined\exf at prevsubprob%
-     subprob={\exf at prevsubprob},%
+    \ifdefined\exf at prevsubprob subprob={\exf at prevsubprob},%
      \ifdefined\exf at prevsubprobhref href={\exf at prevsubprobhref},\fi%
     \else%
      \ifdefined\exf at prevprobhref href={\exf at prevprobhref},\fi%
     \fi%
-    \ifdefined\exf at prevpoints points={\exf at prevpoints},\fi%
+    \ifdefined\exf at prevpoints points=%
+     {\expandafter\exf at formatpoints\exf at prevpoints},\fi%
     \ifdefined\sheettag sheettag={\sheettag},\fi%
     \ifdefined\problemtag problemtag={\problemtag},\fi}%
 %    \end{macrocode}
@@ -4406,6 +5493,16 @@
   \global\let\exf at prevsubprobhref\@undefined%
   \global\let\exf at prevpoints\@undefined%
 %    \end{macrocode}
+% In |here*| mode, output solution immediately;
+% overwrite verbatim macros to display solution:
+%    \begin{macrocode}
+  \exf at ifis\exf at solutionbelow{here*}{%
+   \def\exf at verbatim{\exf at clearbuf\begingroup%
+    \edef\exf at subprobarg{\exf at subprobarg}%
+    \exf at showsolutionsin{\exf at config@composetitlesolutionsingle}%
+    \exf at exptwo\printsolution{\exf at subprobarg#1}}%
+   \def\exf at endverbatim{\endprintsolution\exf at showsolutionsout\endgroup}}%
+%    \end{macrocode}
 % Verbatim read block to buffer:
 %    \begin{macrocode}
   \exf at verbatim#2}%
@@ -4431,17 +5528,17 @@
 %    \end{macrocode}
 % Display solution immediately in various cases:
 %    \begin{macrocode}
-  \exf at solbelowis{here}{\exf at showsolutions%
+  \exf at ifis\exf at solutionbelow{here}{\exf at showsolutions%
    {\exf at config@composetitlesolutionsingle}{}}%
   \ifdefined\exf at in@subproblem\else%
-   \exf at solbelowis{subproblem}{%
+   \exf at ifis\exf at solutionbelow{subproblem}{%
     \exf at showsolutions{\exf at config@composetitlesolutionsingle}{}}%
-   \exf at solbelowis{subproblem*}{%
+   \exf at ifis\exf at solutionbelow{subproblem*}{%
     \exf at showsolutions{\exf at config@composetitlesolutionsingle}{}}\fi%
   \ifdefined\exf at in@problem\else%
-   \exf at solbelowis{problem}{%
+   \exf at ifis\exf at solutionbelow{problem}{%
     \exf at showsolutions{\exf at config@composetitlesolutionmulti}{}}%
-   \exf at solbelowis{problem*}{%
+   \exf at ifis\exf at solutionbelow{problem*}{%
     \exf at showsolutions{\exf at config@composetitlesolutionmulti}{}}\fi%
 %    \end{macrocode}
 % Done:
@@ -4466,7 +5563,7 @@
 %    \begin{macrocode}
    \ifdefined#5%
     \exf at csdo\def{the\exf at solutioncounter}%
-     {\exf at config@composeitemsolution{\exf at solprob}{\exf at solsubprob}}%
+     {\exf at config@composeitemsolutionlabel{\exf at solprob}{\exf at solsubprob}}%
     \refstepcounter{\exf at solutioncounter}\label{#5}%
    \fi%
 %    \end{macrocode}
@@ -4488,6 +5585,32 @@
     {\exf at config@composetocsolutions}}{\@undefined}{\@undefined}}
 %    \end{macrocode}
 
+% \macro{\exf at showsolutionsin}
+% Output solutions intro:
+%    \begin{macrocode}
+\newcommand{\exf at showsolutionsin}[1]{%
+%    \end{macrocode}
+% Set solution body style; add vertical space; insert hook code:
+%    \begin{macrocode}
+  \par\exf at config@styletext\addvspace{\exf at config@skipsolutionsabove}%
+  \exf at config@styletextsolution%
+  \exf at config@insertsolutionsbefore%
+  \let\exf at composetitle#1}
+%    \end{macrocode}
+
+% \macro{\exf at showsolutionsout}
+% Output solutions outro:
+%    \begin{macrocode}
+\newcommand{\exf at showsolutionsout}{%
+%    \end{macrocode}
+% Ignore most recent skip; insert hook code;
+% close paragraph; add vertical space:
+%    \begin{macrocode}
+  \removelastskip%
+  \exf at config@insertsolutionsafter%
+  \par\exf at config@styletext\addvspace{\exf at config@skipsolutionbelow}}
+%    \end{macrocode}
+
 % \macro{\exf at showsolutions}
 % Output solutions in buffer:
 %    \begin{macrocode}
@@ -4497,12 +5620,9 @@
 %    \begin{macrocode}
   \ifexf at bufclean\else\begingroup%
 %    \end{macrocode}
-% Set solution body style; add vertical space; insert hook code:
+% Execute output solutions intro:
 %    \begin{macrocode}
-   \par\exf at config@styletext\addvspace{\exf at config@skipsolutionsabove}%
-   \exf at config@styletextsolution%
-   \exf at config@insertsolutionsbefore%
-   \let\exf at composetitle#1%
+   \exf at showsolutionsin{#1}%
    #2%
 %    \end{macrocode}
 % Source and clear buffer:
@@ -4510,12 +5630,9 @@
    \exf at sourcebuf%
    \exf at clearbuf%
 %    \end{macrocode}
-% Ignore most recent skip; insert hook code;
-% close paragraph; add vertical space:
+% Execute output solutions outro:
 %    \begin{macrocode}
-   \removelastskip%
-   \exf at config@insertsolutionsafter%
-   \par\exf at config@styletext\addvspace{\exf at config@skipsolutionbelow}%
+   \exf at showsolutionsout%
   \endgroup\fi}
 %    \end{macrocode}
 

Modified: trunk/Master/texmf-dist/source/latex/exframe/exframe.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/exframe/exframe.ins	2019-05-01 21:03:02 UTC (rev 50919)
+++ trunk/Master/texmf-dist/source/latex/exframe/exframe.ins	2019-05-01 22:50:55 UTC (rev 50920)
@@ -2,16 +2,6 @@
 \input docstrip.tex
 
 \keepsilent
-% exframe.ins Copyright (C) 2011-2019 Niklas Beisert
-%
-% 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.
-
 \preamble
 
 Copyright (C) 2011-2019 Niklas Beisert
@@ -29,8 +19,17 @@
 % the style and sample files
 \generate{\askforoverwritefalse
 \file{exframe.sty}{\from{exframe.dtx}{package}}
-\file{exfsmp1.tex}{\from{exframe.dtx}{sample1}}
+\file{exfsamp.tex}{\from{exframe.dtx}{samplesingle}}
+\file{exfserm.tex}{\from{exframe.dtx}{samplemultimain}}
+\file{exfser01.tex}{\from{exframe.dtx}{samplemultisheet1}}
+\file{exfser02.tex}{\from{exframe.dtx}{samplemultisheet2}}
+\file{exfser03.tex}{\from{exframe.dtx}{samplemultisheet3}}
+\file{exfseraa.tex}{\from{exframe.dtx}{samplemultisheeta}}
+\file{exfserpe.tex}{\from{exframe.dtx}{samplemultiprobleme}}
+\file{exfserpf.tex}{\from{exframe.dtx}{samplemultiproblemf}}
 \nopreamble\nopostamble
+\file{exfsermk.sh}{\from{exframe.dtx}{samplemultiscript}}
+\catcode9=12\file{exfsermk.mak}{\from{exframe.dtx}{samplemultimake}}
 }
 
 \Msg{***********************************************************************}

Modified: trunk/Master/texmf-dist/tex/latex/exframe/exframe.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exframe/exframe.sty	2019-05-01 21:03:02 UTC (rev 50919)
+++ trunk/Master/texmf-dist/tex/latex/exframe/exframe.sty	2019-05-01 22:50:55 UTC (rev 50920)
@@ -17,7 +17,7 @@
 %% version 2005/12/01 or later.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1996/12/01]
-\ProvidesPackage{exframe}[2019/01/21 v3.1 Framework for Exercise Problems]
+\ProvidesPackage{exframe}[2019/05/01 v3.2 Framework for Exercise Problems]
 
 \RequirePackage{verbatim}
 \RequirePackage{xkeyval}
@@ -39,6 +39,9 @@
 \newcommand{\exf at expsetkeys}[2]{\edef\exf at tmp{#2}%
   \exf at exparg{\setkeys{#1}}{\exf at tmp}}
 
+\newcommand{\exf at ifis}[3]%
+  {\def\exf at tmp{#2}\ifx#1\exf at tmp#3\fi}
+
 \newcommand{\exf at href}[2]{%
   \ifdefined#1\ifx#1\exf at empty#2\else%
    \ifdefined\hyperlink\protect\hyperlink{#1}{#2}\else#2\fi\fi\else#2\fi}
@@ -201,7 +204,7 @@
   {\getexerciseconfig{termsolution}}
 \exerciseconfig{composetitlesolutionsproblemmulti}[2]%
   {\exerciseifempty{#2}{\getexerciseconfig{termproblem} #1}{#1. #2}}
-\exerciseconfig{composeitemsolution}[2]{#1#2}
+\exerciseconfig{composeitemsolutionlabel}[2]{#1#2}
 
 \exerciseconfig{composepointsnum}[1]{#1}
 \exerciseconfig{composepoints}[1]{\getexerciseconfig{composepointsnum}{#1}~%
@@ -217,10 +220,43 @@
 \exerciseconfig{composepointsawardalt}[2]%
   {(\getexerciseconfig{composepoints}{#1}*\exerciseifnotempty{#2}{; #2})}
 
+\exerciseconfig{composepointspair}[2]{%
+  \ifdim#2pt=0pt%
+   \getexerciseconfig{composepoints}{#1}%
+  \else\ifdim#1pt=0pt%
+   +\getexerciseconfig{composepoints}{#2}%
+  \else%
+   \getexerciseconfig{composepointsnum}{#1}+%
+   \getexerciseconfig{composepointsnum}{#2}~%
+   \getexerciseconfig{termpoints}%
+  \fi\fi}
+\exerciseconfig{composepointspairbody}[2]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsbody}{#1}\else%
+  (\getexerciseconfig{composepointspair}{#1}{#2})\fi}
+\exerciseconfig{composepointspairstart}[2]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsstart}{#1}\else%
+  (\getexerciseconfig{composepointspair}{#1}{#2})\fi}
+\exerciseconfig{composepointspairmargin}[2]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsmargin}{#1}\else%
+  \getexerciseconfig{composepointspair}{#1}{#2}\fi}
+\exerciseconfig{composepointspairsheet}[2]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointssheet}{#1}\else%
+  \getexerciseconfig{composepointspair}{#1}{#2}\fi}
+\exerciseconfig{composepointspairaward}[3]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsaward}{#1}{#3}\else%
+  (\getexerciseconfig{composepointspair}{#1}{#2}%
+   \exerciseifnotempty{#3}{; #3})\fi}
+\exerciseconfig{composepointspairawardalt}[3]{%
+  \ifdim#2pt=0pt\getexerciseconfig{composepointsawardalt}{#1}{#3}\else%
+  (\getexerciseconfig{composepointspair}{#1}{#2}*%
+   \exerciseifnotempty{#3}{; #3})\fi}
+
 \exerciseconfig{insertpointsmargin}[1]{\marginpar{\footnotesize #1}}
 
 \exerciseconfig{insertwarnpoints}[3]
   {\textbf{points mismatch for #1 (#2 determined vs.\ #3 given)}}
+\exerciseconfig{insertwarnpointsrerun}[1]
+  {\textbf{points changed for #1 (please recompile)}}
 
 \exerciseconfig{countersheet}{\arabic{\exf at sheetcounter}}
 \exerciseconfig{counterproblem}{\arabic{\exf at problemcounter}}
@@ -251,10 +287,8 @@
 
 \def\exf at solutionbelow{subproblem}
 \define at choicekey{exf at style}{solutionbelow}%
-  {here,subproblem,subproblem*,problem,problem*,sheet,manual}%
-  {\def\exf at solutionbelow{#1}}
-\newcommand{\exf at solbelowis}[2]%
-  {\def\exf at tmp{#1}\ifx\exf at solutionbelow\exf at tmp#2\fi}
+  {here,here*,subproblem,subproblem*,problem,problem*,sheet,manual}%
+  {\ifexf at infile\else\def\exf at solutionbelow{#1}\fi}
 \defexercisestyle{sheetequation}{}
 \defexercisestyle{problemequation}{}
 \defexercisestyle{solutionequation}{}
@@ -265,10 +299,6 @@
 \def\exf at subpointsat{end}
 \define at choicekey{exf at style}{subpointsat}%
   {start,start*,margin,end,manual,off}{\def\exf at subpointsat{#1}}
-\newcommand{\exf at pointsatis}[2]%
-  {\def\exf at tmp{#1}\ifx\exf at pointsat\exf at tmp#2\fi}
-\newcommand{\exf at subpointsatis}[2]%
-  {\def\exf at tmp{#1}\ifx\exf at subpointsat\exf at tmp#2\fi}
 \defexercisestylearg{problemby}{\exf at numberproblemwithin{#1}}
 \defexercisestylearg{equationby}{\exf at numberequationwithin{#1}}
 \defexercisestyle{pagebysheet}{%
@@ -280,7 +310,7 @@
 \defexercisestyle{equationbysheet}%
   {\exf at numberequationwithin{\exf at sheetcounter}}
 \defexercisestyle{fracpoints}%
-  {\exerciseconfig{composepointsnum}[1]{\exf at nicefrac{##1}}}
+  {\exerciseconfig{composepointsnum}[1]{\protect\exf at nicefrac{##1}}}
 \defexercisestylearg[true]{twoside}{\exercisesetup{twoside={#1}}}
 
 \ifexf at extstyle
@@ -370,9 +400,8 @@
 \define at key{exf at sheet}{title}{\def\exf at data@sheet at rawtitle{#1}}
 \def\exf at data@sheet at title{\exf at config@composetitlesheet%
   {\csname the\exf at sheetcounter\endcsname}{\exf at data@sheet at rawtitle}}%
-\def\exf at data@sheet at rawpoints{}
-\def\exf at data@sheet at points{\exf at config@composepointssheet%
-  {\exf at data@sheet at rawpoints}}%
+\def\exf at data@sheet at points{\ifdefined\exf at sheet@points%
+   \expandafter\exf at config@composepointspairsheet\exf at sheet@points\fi}%
 
 \newcommand{\defproblemdata}[1]{%
   \exf at csdo\def{exf at data@problem@#1}{}%
@@ -469,11 +498,10 @@
   \fi%
   \gdef\exf at metadata{off}}
 
-\AtBeginDocument{\def\exf at tmp{auto}\ifx\exf at metadata\exf at tmp%
-  \exf at writemetadata{}\fi}
+\AtBeginDocument{\exf at ifis\exf at metadata{auto}{\exf at writemetadata{}}}
 
-\newcommand{\writeexercisedata}{\def\exf at tmp{manual}\ifx\exf at metadata\exf at tmp%
-  \exf at writemetadata{}\fi}
+\newcommand{\writeexercisedata}{%
+  \exf at ifis\exf at metadata{manual}{\exf at writemetadata{}}}
 
 \newcounter{\exf at sheetcounter}
 \newcounter{\exf at problemcounter}
@@ -584,6 +612,61 @@
 \def\exf at scanblock@noopt#1#2{#1{}{\scantokens#2}}
 \def\exf at scanblock@opt#1[#2]{#1{#2}{}}
 
+\newcommand{\exf at addtopoints}[3]{%
+  \ifdefined#1\else\def#1{{0}{0}}\fi%
+  \setlength\exf at tmpdim{\expandafter\@firstoftwo#1pt}%
+  \addtolength\exf at tmpdim{#2pt}%
+  \edef\exf at tmp{\strip at pt\exf at tmpdim}%
+  \setlength\exf at tmpdim{\expandafter\@secondoftwo#1pt}%
+  \addtolength\exf at tmpdim{#3pt}%
+  \xdef#1{{\exf at tmp}{\strip at pt\exf at tmpdim}}}
+\newcommand{\exf at pointsmismatch}[3]{%
+  \let\exf at tmp\@undefined%
+  \ifdim\expandafter\@firstoftwo#1pt=\expandafter\@firstoftwo#2pt\else%
+   \def\exf at tmp{}\fi%
+  \ifdim\expandafter\@secondoftwo#1pt=\expandafter\@secondoftwo#2pt\else%
+   \def\exf at tmp{}\fi%
+  \ifdefined\exf at tmp#3\fi}
+
+\def\exf at outpoints#1#2#3{\ifdefined#3%
+   \exf at exptwo\exf at outpoints@switch{#3}{#1}{#2}%
+   \global\let#3\@undefined\fi}
+\def\exf at outpoints@switch#1#2#3{#2{\protect#3#1}}
+
+\def\exf at scanpoints#1#2+#3+#4&{%
+  \edef#1{\if&#2&0\else#2\fi}%
+  \edef#1{{#1}{\if&#3&0\else#3\fi}}}
+\def\exf at formatpoints#1#2{\ifdim#2pt=0pt#1\else%
+  \ifdim#1pt=0pt+#2\else#1+#2\fi\fi}
+
+\newcommand{\extractpoints}{\@ifstar{\exf at extractpoints\@secondoftwo}%
+  {\exf at extractpoints\@firstoftwo}}
+\newcommand{\exf at extractpoints}[2]{\edef\exf at tmp{#2}%
+  \exf at exptwo\exf at scanpoints\exf at tmp\exf at tmp++&%
+  \expandafter#1\exf at tmp}
+
+\newcommand{\exf at makepointsmargin}[2]{%
+  \exf at config@insertpointsmargin{\exf at config@composepointspairmargin{#1}{#2}}}
+
+\newcommand{\exf at warnmismatch}[4]{%
+  \ifdefined#4\ifdefined#3\exf at pointsmismatch#3#4{%
+   \let\exf at tmp\PackageWarning%
+   \ifx#1\exf at solutionname\let\exf at tmp\PackageWarningNoLine\fi%
+   \exf at tmp{exframe}{points mismatch %
+    (\expandafter\exf at formatpoints#3 determined %
+    vs. \expandafter\exf at formatpoints#4 given) %
+    for #1 \csname the#2\endcsname}%
+   \ifexf at warntext\edef\exf at tmp{%
+    {\expandafter\exf at formatpoints#3}{\expandafter\exf at formatpoints#4}}%
+    \exf at exptwo\exf at config@insertwarnpoints#1\exf at tmp\fi}%
+  \fi\fi}
+\newcommand{\exf at warnrerun}[4]{%
+  \ifdefined#4\ifdefined#3\exf at pointsmismatch#3#4{%
+   \PackageWarning{exframe}{points changed %
+    for #1 \csname the#2\endcsname; rerun to fix}%
+   \ifexf at warntext\exf at config@insertwarnpointsrerun#1\fi}%
+  \fi\fi}
+
 \def\exf at splitsign#1-#2-#3&{\def\exf at splitnum{#1#2}\def\exf at splitminus{#3}}
 \def\exf at splitdecimal#1.#2.#3&{\def\exf at splitint{#1}\def\exf at splitdec{#2}}
 
@@ -612,49 +695,44 @@
    \mskip-4mu/\mskip-2mu%
    _{\exf at text{#3}}$\fi}
 
-\newlength{\exf at sheet@points at dim}
 \newcommand{\exf at notesheetpoints}[2]{%
   \exf at csdo\gdef{exf at sheetpoints@#1}{#2}}
 \AtBeginDocument{\immediate\write\@auxout{%
   \string\providecommand{\string\exf at notesheetpoints}[2]{}}}
-\newcommand{\exf at writesheetpoints}[1]%
-  {\immediate\write\@auxout{\string\exf at notesheetpoints{\sheettag}{#1}}}
+\newcommand{\exf at writesheetpoints}[2]%
+  {\immediate\write\@auxout{\string\exf at notesheetpoints{\sheettag}%
+   {\exf at formatpoints{#1}{#2}}}}
 \newcommand{\getsheetpoints}[1]{\ifcsname exf at sheetpoints@#1\endcsname%
   \csname exf at sheetpoints@#1\endcsname\else 0\fi}
 
-\newlength{\exf at problem@points at dim}
 \newcommand{\exf at noteproblempoints}[2]{%
   \exf at csdo\gdef{exf at problempoints@#1}{#2}}
 \AtBeginDocument{\immediate\write\@auxout{%
   \string\providecommand{\string\exf at noteproblempoints}[2]{}}}
-\newcommand{\exf at writeproblempoints}[1]%
-  {\immediate\write\@auxout{\string\exf at noteproblempoints{\problemtag}{#1}}}
+\newcommand{\exf at writeproblempoints}[2]%
+  {\immediate\write\@auxout{\string\exf at noteproblempoints{\problemtag}%
+   {\exf at formatpoints{#1}{#2}}}}
 \newcommand{\getproblempoints}[1]{\ifcsname exf at problempoints@#1\endcsname%
   \csname exf at problempoints@#1\endcsname\else 0\fi}
 
 \newcommand{\showpoints}{%
-  \ifdefined\exf at in@subproblem%
-   \ifdefined\exf at subproblem@points%
-    \exf at ensuretext{\exf at config@composepointsbody{\exf at subproblem@points}}%
-    \global\let\exf at subproblem@points\@undefined%
-   \fi%
-  \else\ifdefined\exf at in@problem%
-   \ifdefined\exf at problem@pointsshow%
-    \exf at ensuretext{\exf at config@composepointsbody{\exf at problem@pointsshow}}%
-    \global\let\exf at problem@pointsshow\@undefined%
-   \fi%
+  \ifdefined\exf at in@subproblem\exf at outpoints{\exf at ensuretext}%
+   {\exf at config@composepointspairbody}{\exf at subproblem@points}%
+  \else\ifdefined\exf at in@problem\exf at outpoints{\exf at ensuretext}%
+   {\exf at config@composepointspairbody}{\exf at problem@points at show}%
   \fi\fi}
 
-\newlength{\exf at solution@points at dim}
-
-\newcommand{\exf at awardpointsalt}[2][]{%
-  \exf at ensuretext{\exf at config@composepointsawardalt{#2}{#1}}}
-\newcommand{\exf at awardpointsreg}[2][]{%
-  \global\addtolength{\exf at solution@points at dim}{#2 pt}%
-  \exf at ensuretext{\exf at config@composepointsaward{#2}{#1}}}
+\newcommand{\exf at awardpointsalt}[2][]{\exf at scanpoints\exf at tmp#2++&%
+  \exf at exptwo\exf at ensuretext{%
+   \expandafter\exf at config@composepointspairawardalt\exf at tmp{#1}}}
+\newcommand{\exf at awardpointsreg}[2][]{\exf at scanpoints\exf at tmp#2++&%
+  \exf at exptwo\exf at addtopoints\exf at solution@points at total\exf at tmp%
+  \exf at scanpoints\exf at tmp#2++&%
+  \exf at exptwo\exf at ensuretext{%
+   \expandafter\exf at config@composepointspairaward\exf at tmp{#1}}}
 \newcommand{\awardpoints}{\@ifstar\exf at awardpointsalt\exf at awardpointsreg}
 
-\define at key{exf at sheet}{points}{\def\exf at points@given{#1}}
+\define at key{exf at sheet}{points}{\exf at scanpoints\exf at points@given#1++&}
 \define at key{exf at sheet}{number}{\setcounter{\exf at sheetcounter}{#1}}
 \define at key{exf at sheet}{label}{\def\exf at label{#1}}
 \define at key{exf at sheet}{tag}{\def\sheettag{#1}}
@@ -663,7 +741,7 @@
   \exf at config@insertsheetclearpage%
   \refstepcounter{\exf at sheetcounter}%
   \ifexf at style@sheetequation%
-   \exf at eqsav\value{equation}%
+   \exf at eqsav\value{equation}\relax%
    \setcounter{equation}{\value{exf at sheetequation}}%
    \let\theequation\theexf at sheetequation%
    \let\theHequation\theHexf at sheetequation%
@@ -670,18 +748,19 @@
   \fi%
   \let\exf at points@given\@undefined%
   \def\sheettag{\csname the\exf at sheetcounter\endcsname}%
-  \setlength{\exf at sheet@points at dim}{0pt}%
+  \let\exf at sheet@points at total\@undefined%
   \let\exf at label\@undefined%
   \setkeys{exf at sheet}{#1}%
   \ifexf at autolabelsheet\label{\exf at config@labelsheet{\sheettag}}\fi%
   \ifdefined\exf at label\label{\exf at label}\fi%
+  \let\exf at sheet@points\@undefined%
   \ifdefined\exf at points@given%
-   \let\exf at data@sheet at rawpoints\exf at points@given%
+   \let\exf at sheet@points\exf at points@given%
   \else\ifcsname exf at sheetpoints@\sheettag\endcsname%
-   \exf at csdotwo\let\exf at data@sheet at rawpoints{exf at sheetpoints@\sheettag}%
+   \exf at csdotwo\let\exf at tmp{exf at sheetpoints@\sheettag}%
+   \exf at exptwo\exf at scanpoints\exf at sheet@points\exf at tmp++&%
   \fi\fi%
-  \def\exf at tmp{sheet}\ifx\exf at metadata\exf at tmp%
-   \exf at writemetadata{sheet}\fi%
+  \exf at ifis\exf at metadata{sheet}{\exf at writemetadata{sheet}}%
   \exf at config@insertsheetbefore%
   \ifx\exf at config@toclevelsheet\exf at empty\else%
    \ifdefined\phantomsection\phantomsection\fi\fi%
@@ -690,32 +769,17 @@
     {\exf at data@sheet at rawtitle}}%
   \exf at config@insertsheettitle}%
  {\ifdefined\exf at points@given%
-   \ifdim\exf at sheet@points at dim=0pt\else%
-    \ifdim\exf at sheet@points at dim=\exf at data@sheet at rawpoints pt\else%
-     \PackageWarning{exframe}{points mismatch for %
-      \exf at sheetname\space\csname the\exf at sheetcounter\endcsname}%
-     \ifexf at warntext\exf at config@insertwarnpoints{\exf at sheetname}%
-      {\strip at pt\exf at sheet@points at dim}{\exf at data@sheet at rawpoints}\fi%
-   \fi\fi%
+   \exf at warnmismatch{\exf at sheetname}{\exf at sheetcounter}%
+    {\exf at sheet@points at total}{\exf at sheet@points}%
   \else%
-   \ifx\exf at data@sheet at rawpoints\exf at empty\else%
-    \ifdim\exf at sheet@points at dim=\exf at data@sheet at rawpoints pt\else%
-     \PackageWarning{exframe}{points changed for %
-      \exf at sheetname\space\csname the\exf at sheetcounter\endcsname;
-      rerun to fix}%
-     \ifexf at warntext\exf at config@insertwarnpoints{\exf at sheetname}%
-      {\strip at pt\exf at sheet@points at dim}{\exf at data@sheet at rawpoints}\fi%
-   \fi\fi%
-   \ifdim\exf at sheet@points at dim=0pt%
-    \def\exf at data@sheet at rawpoints{}%
-   \else%
-    \edef\exf at data@sheet at rawpoints{\strip at pt\exf at sheet@points at dim}%
-   \fi%
+   \exf at warnrerun{\exf at sheetname}{\exf at sheetcounter}%
+    {\exf at sheet@points at total}{\exf at sheet@points}%
+   \let\exf at sheet@points\exf at sheet@points at total%
   \fi%
-  \ifx\exf at data@sheet at rawpoints\exf at empty\else%
-   \exf at writesheetpoints{\exf at data@sheet at rawpoints}%
+  \ifdefined\exf at sheet@points%
+   \expandafter\exf at writesheetpoints\exf at sheet@points%
   \fi%
-  \exf at solbelowis{sheet}{\insertsolutions}%
+  \exf at ifis\exf at solutionbelow{sheet}{\insertsolutions}%
   \exf at config@insertsheetafter%
   \exf at config@insertsheetclearpage%
   \ifexf at style@sheetequation%
@@ -728,7 +792,7 @@
   \clearpage\ifexf at twoside\ifodd\value{page}\else%
   \thispagestyle{empty}\hbox{}\newpage\fi\fi}
 
-\define at key{exf at problem}{points}{\def\exf at points@given{#1}}
+\define at key{exf at problem}{points}{\exf at scanpoints\exf at points@given#1++&}
 \define at key{exf at problem}{label}{\def\exf at label{#1}}
 \define at key{exf at problem}{tag}{\def\problemtag{#1}}
 \define at key{exf at problem}{sollabel}{\xdef\exf at sollabel{#1}}
@@ -740,7 +804,7 @@
   \begingroup%
   \def\exf at in@problem{}%
   \ifexf at style@problemequation%
-   \exf at eqsav\value{equation}%
+   \exf at eqsav\value{equation}\relax%
    \setcounter{equation}{\value{exf at problemequation}}%
    \let\theequation\theexf at problemequation%
    \let\theHequation\theHexf at problemequation%
@@ -750,7 +814,7 @@
   \let\exf at points@given\@undefined%
   \let\exf at label\@undefined%
   \global\let\exf at sollabel\@undefined%
-  \setlength{\exf at problem@points at dim}{0pt}%
+  \let\exf at problem@points at total\@undefined%
   \setkeys{exf at problem,exf at probleminfo}{#1}%
   \ifexf at autolabelproblem\label{\exf at config@labelproblem{\problemtag}}\fi%
   \ifdefined\exf at label\label{\exf at label}\fi%
@@ -761,9 +825,9 @@
     \csname theH\exf at problemcounter\endcsname}%
   \fi%
   \ifx\exf at data@problem at rawtitle\exf at empty%
-    \global\let\exf at prevprobtitle\@undefined%
+   \global\let\exf at prevprobtitle\@undefined%
   \else%
-    \protected at xdef\exf at prevprobtitle{\exf at data@problem at rawtitle}%
+   \protected at xdef\exf at prevprobtitle{\exf at data@problem at rawtitle}%
   \fi%
   \global\let\exf at prevsubprob\@undefined%
   \global\let\exf at prevsubprobhref\@undefined%
@@ -770,24 +834,20 @@
   \let\exf at problem@points\@undefined%
   \ifdefined\exf at points@given%
    \let\exf at problem@points\exf at points@given%
-  \else%
-   \ifcsname exf at problempoints@\problemtag\endcsname%
-    \exf at csdotwo\let\exf at problem@points{exf at problempoints@\problemtag}%
+  \else\ifcsname exf at problempoints@\problemtag\endcsname%
+   \exf at csdotwo\let\exf at tmp{exf at problempoints@\problemtag}%
+   \exf at exptwo\exf at scanpoints\exf at problem@points\exf at tmp++&%
   \fi\fi%
   \global\let\exf at prevpoints\exf at problem@points%
-  \let\exf at problem@pointsshow\@undefined%
-  \ifdefined\exf at problem@points\ifdim\exf at problem@points pt=0pt\else%
-   \let\exf at problem@pointsshow\exf at problem@points%
-  \fi\fi%
-  \exf at pointsatis{off}{\let\exf at problem@pointsshow\@undefined}%
-  \exf at pointsatis{start}{\ifdefined\exf at problem@pointsshow%
-   \exf at exptwo\exf at append@intro{\expandafter%
-    \exf at config@composepointsstart\expandafter{\exf at problem@pointsshow}}%
-   \let\exf at problem@pointsshow\@undefined\fi}%
-  \exf at pointsatis{start*}{\ifdefined\exf at problem@pointsshow%
-   \exf at exptwo\exf at prepend@intro{\expandafter%
-    \exf at config@composepointsstart\expandafter{\exf at problem@pointsshow}}%
-   \let\exf at problem@pointsshow\@undefined\fi}%
+  \let\exf at problem@points at show\@undefined%
+  \ifdefined\exf at problem@points%
+   \let\exf at problem@points at show\exf at problem@points%
+  \fi%
+  \exf at ifis\exf at pointsat{off}{\let\exf at problem@points at show\@undefined}%
+  \exf at ifis\exf at pointsat{start}{\exf at outpoints{\exf at append@intro}%
+   {\exf at config@composepointspairstart}{\exf at problem@points at show}}%
+  \exf at ifis\exf at pointsat{start*}{\exf at outpoints{\exf at prepend@intro}%
+   {\exf at config@composepointspairstart}{\exf at problem@points at show}}%
   \exf at config@insertprobleminfo%
   \exf at config@styletextproblem%
   \ifdim\exf at config@skipproblemitem=0pt%
@@ -814,52 +874,34 @@
      \exf at config@composetitleproblem{\exf at empty}{\exf at data@problem at rawtitle}}}%
    \fi%
   \fi%
-  \exf at pointsatis{margin}{\ifdefined\exf at problem@pointsshow%
-   \expandafter\exf at prepend@def\expandafter\exf at intro\expandafter%
-    {\expandafter\protect\expandafter%
-     \exf at config@insertpointsmargin\expandafter{\expandafter%
-      \exf at config@composepointsmargin\expandafter{\exf at problem@pointsshow}}}%
-   \let\exf at problem@pointsshow\@undefined\fi}%
+  \exf at ifis\exf at pointsat{margin}{%
+   \exf at outpoints{\exf at prepend@def\exf at introitem}%
+   {\exf at makepointsmargin}{\exf at problem@points at show}}%
   \exf at open@block{\exf at config@skipproblemtitle}%
   \exf at addcontentsline{\exf at config@toclevelproblem}%
    {\exf at config@composetocproblem{\csname the\exf at problemcounter\endcsname}%
     {\exf at data@problem at rawtitle}}%
   \@afterindentfalse}%
- {\exf at pointsatis{end}{\showpoints}%
+ {\exf at ifis\exf at pointsat{end}{\showpoints}%
   \ifdefined\exf at points@given%
-   \ifdim\exf at problem@points at dim=0pt\else%
-    \ifdim\exf at problem@points at dim=\exf at problem@points pt\else%
-     \PackageWarning{exframe}{points mismatch for %
-      \exf at problemname\space\csname the\exf at problemcounter\endcsname}%
-     \ifexf at warntext\exf at config@insertwarnpoints{\exf at problemname}%
-      {\strip at pt\exf at problem@points at dim}{\exf at problem@points}\fi%
-   \fi\fi%
+   \exf at warnmismatch{\exf at problemname}{\exf at problemcounter}%
+    {\exf at problem@points at total}{\exf at problem@points}%
   \else%
-   \ifdefined\exf at problem@points%
-    \ifdim\exf at problem@points at dim=\exf at problem@points pt\else%
-     \PackageWarning{exframe}{points changed for %
-      \exf at problemname\space\csname the\exf at problemcounter\endcsname;
-      rerun to fix}%
-     \ifexf at warntext\exf at config@insertwarnpoints{\exf at problemname}%
-      {\strip at pt\exf at problem@points at dim}{\exf at problem@points}\fi%
-   \fi\fi%
-   \ifdim\exf at problem@points at dim=0pt%
-    \let\exf at problem@points\@undefined%
-   \else%
-    \edef\exf at problem@points{\strip at pt\exf at problem@points at dim}%
-   \fi%
+   \exf at warnrerun{\exf at problemname}{\exf at problemcounter}%
+    {\exf at problem@points at total}{\exf at problem@points}%
+   \let\exf at problem@points\exf at problem@points at total%
   \fi%
   \ifdefined\exf at problem@points%
-   \exf at writeproblempoints{\exf at problem@points}%
-   \global\addtolength{\exf at sheet@points at dim}{\exf at problem@points pt}%
+   \expandafter\exf at writeproblempoints\exf at problem@points%
+   \exf at exptwo\exf at addtopoints\exf at sheet@points at total\exf at problem@points%
   \fi%
-  \ifdefined\exf at problem@points\else\ifdim\exf at sheet@points at dim=0pt\else%
+  \ifdefined\exf at problem@points\else\ifdefined\exf at sheet@points at total%
    \PackageWarning{exframe}{no points defined for \exf at problemname}%
   \fi\fi%
   \global\let\exf at prevsubprob\@undefined%
   \global\let\exf at prevsubprobhref\@undefined%
   \par\exf at close@block%
-  \exf at solbelowis{problem}{%
+  \exf at ifis\exf at solutionbelow{problem}{%
    \exf at config@insertproblemsolution%
    \exf at showsolutions{\exf at config@composetitlesolutionmulti}{}}%
   \ifexf at style@problemequation%
@@ -869,11 +911,11 @@
   \endgroup%
   \exf at config@insertproblemafter%
   \addvspace{\exf at config@skipproblembelow}%
-  \exf at solbelowis{problem*}{%
+  \exf at ifis\exf at solutionbelow{problem*}{%
    \exf at showsolutions{\exf at config@composetitlesolutionmulti}{}}%
   \ignorespacesafterend}
 
-\define at key{exf at subproblem}{points}{\def\exf at subproblem@points{#1}}
+\define at key{exf at subproblem}{points}{\exf at scanpoints\exf at subproblem@points#1++&}
 \define at key{exf at subproblem}{label}{\def\exf at label{#1}}
 
 \newenvironment{\exf at subproblemname}[1][]{%
@@ -894,21 +936,17 @@
   \fi%
   \ifdefined\exf at subproblem@points%
    \global\let\exf at prevpoints\exf at subproblem@points%
-   \global\addtolength{\exf at problem@points at dim}{\exf at subproblem@points pt}%
+   \exf at exptwo\exf at addtopoints\exf at problem@points at total\exf at subproblem@points%
   \else%
-   \ifdim\exf at problem@points at dim=0pt\else%
+   \ifdefined\exf at problem@points at total%
     \PackageWarning{exframe}{no points defined for \exf at subproblemname}%
    \fi%
   \fi%
-  \exf at subpointsatis{off}{\let\exf at subproblem@points\@undefined}%
-  \exf at subpointsatis{start}{\ifdefined\exf at subproblem@points%
-   \exf at exptwo\exf at append@intro{\expandafter%
-    \exf at config@composepointsstart\expandafter{\exf at subproblem@points}}%
-   \let\exf at subproblem@points\@undefined\fi}%
-  \exf at subpointsatis{start*}{\ifdefined\exf at subproblem@points%
-   \exf at exptwo\exf at prepend@intro{\expandafter%
-    \exf at config@composepointsstart\expandafter{\exf at subproblem@points}}%
-   \let\exf at subproblem@points\@undefined\fi}%
+  \exf at ifis\exf at subpointsat{off}{\let\exf at subproblem@points\@undefined}%
+  \exf at ifis\exf at subpointsat{start}{\exf at outpoints{\exf at append@intro}%
+   {\exf at config@composepointspairstart}{\exf at subproblem@points}}%
+  \exf at ifis\exf at subpointsat{start*}{\exf at outpoints{\exf at prepend@intro}%
+   {\exf at config@composepointspairstart}{\exf at subproblem@points}}%
   \exf at config@insertsubprobleminfo%
   \ifdim\exf at config@skipsubproblemitem=0pt%
    \exf at prepend@intro{{%
@@ -930,23 +968,20 @@
      {\csname the\exf at subproblemcounter\endcsname}%
     \exf at config@composeitemsubproblemsep}}%
   \fi%
-  \exf at subpointsatis{margin}{\ifdefined\exf at subproblem@points%
-   \expandafter\exf at prepend@def\expandafter\exf at intro\expandafter%
-    {\expandafter\protect\expandafter%
-     \exf at config@insertpointsmargin\expandafter{\expandafter%
-      \exf at config@composepointsmargin\expandafter{\exf at subproblem@points}}}%
-   \let\exf at subproblem@points\@undefined\fi}%
+  \exf at ifis\exf at subpointsat{margin}{%
+   \exf at outpoints{\exf at prepend@def\exf at introitem}%
+   {\exf at makepointsmargin}{\exf at subproblem@points}}%
   \exf at open@block{\exf at config@skipsubproblemtitle}%
   \@afterindentfalse}%
- {\exf at subpointsatis{end}{\showpoints}%
+ {\exf at ifis\exf at subpointsat{end}{\showpoints}%
   \par\exf at close@block%
-  \exf at solbelowis{subproblem*}{%
+  \exf at ifis\exf at solutionbelow{subproblem*}{%
    \exf at config@insertsubproblemsolution%
    \exf at showsolutions{\exf at config@composetitlesolutionsingle}{}}%
   \endgroup%
   \exf at config@insertsubproblemafter%
   {\exf at config@styletext\addvspace{\exf at config@skipsubproblembelow}}%
-  \exf at solbelowis{subproblem}{%
+  \exf at ifis\exf at solutionbelow{subproblem}{%
    \exf at showsolutions{\exf at config@composetitlesolutionsingle}{}}%
   \ignorespacesafterend}
 
@@ -956,7 +991,7 @@
 \define at key{exf at solution}{sheettag}{\def\sheettag{#1}}
 \define at key{exf at solution}{href}{\def\exf at solhref{#1}}
 \define at key{exf at solution}{label}{\def\exf at label{#1}}
-\define at key{exf at solution}{points}{\def\exf at solution@points{#1}}
+\define at key{exf at solution}{points}{\exf at scanpoints\exf at solution@points#1++&}
 \define at key{exf at solution}{probtitle}{\def\exf at solprobtitle{#1}}
 
 \newenvironment{printsolution}[1]{%
@@ -963,7 +998,7 @@
   \par{\exf at config@styletext\addvspace{\exf at config@skipsolutionabove}}%
   \exf at config@insertsolutionbefore%
   \ifexf at style@solutionequation%
-   \exf at eqsav\value{equation}%
+   \exf at eqsav\value{equation}\relax%
    \setcounter{equation}{\value{exf at solutionequation}}%
    \let\theequation\theexf at solutionequation%
    \let\theHequation\theHexf at solutionequation%
@@ -972,12 +1007,12 @@
   \def\exf at solprob{}%
   \def\exf at solsubprob{}%
   \let\exf at label\@undefined%
-  \setlength{\exf at solution@points at dim}{0pt}%
+  \let\exf at solution@points at total\@undefined%
   \def\exf at solhref{}%
   \exf at init@block{\exf at config@skipsolutioninfo}%
   \setkeys{exf at solution,exf at probleminfo}{#1}%
   \exf at csdo\def{the\exf at solutioncounter}%
-   {\exf at config@composeitemsolution{\exf at solprob}{\exf at solsubprob}}%
+   {\exf at config@composeitemsolutionlabel{\exf at solprob}{\exf at solsubprob}}%
   \refstepcounter{\exf at solutioncounter}%
   \ifdefined\exf at label\label{\exf at label}\fi%
   \exf at config@insertsolutioninfo%
@@ -1025,12 +1060,8 @@
   \fi%
   \exf at open@block{\exf at config@skipsolutiontitle}%
   \@afterindentfalse}%
- {\ifdefined\exf at solution@points\ifdim\exf at solution@points at dim=0pt\else%
-   \ifdim\exf at solution@points at dim=\exf at solution@points pt\else%
-    \PackageWarning{exframe}{points mismatch in \exf at solutionname}%
-    \ifexf at warntext\exf at config@insertwarnpoints{\exf at solutionname}%
-     {\strip at pt\exf at solution@points at dim}{\exf at solution@points}\fi%
-  \fi\fi\fi%
+ {\exf at warnmismatch{\exf at solutionname}{\exf at solutioncounter}%
+   {\exf at solution@points at total}{\exf at solution@points}%
   \par\exf at close@block%
   \ifexf at style@solutionequation%
    \setcounter{exf at solutionequation}{\value{equation}}%
@@ -1051,9 +1082,9 @@
   \let\exf at composetitle\exf at config@composetitlesolutionsproblemmulti%
   \def\exf at solutionstoc{\exf at addcontentsline{\exf at config@toclevelsolution}%
     {\exf at config@composetocsolution{\exf at solprob}{\exf at solprobtitle}}}%
-  \exf at solbelowis{problem}{\let\exf at composetitle%
+  \exf at ifis\exf at solutionbelow{problem}{\let\exf at composetitle%
     \exf at config@composetitlesolutionsproblemsingle}%
-  \exf at solbelowis{problem*}{\let\exf at composetitle%
+  \exf at ifis\exf at solutionbelow{problem*}{\let\exf at composetitle%
     \exf at config@composetitlesolutionsproblemsingle}%
   \exf at solutionssection{\exf at config@styletitlesolutionsproblem}%
    {\exf at composetitle{\exf at solprob}{\exf at solprobtitle}}%
@@ -1062,10 +1093,14 @@
   \endgroup}
 
 \newenvironment{\exf at solutionname}%
-  {\exf at scanblock{\exf at scansolution}}{\endexf at scansolution}%
+  {\exf at ifis\exf at solutionbelow{here*}{%
+    \newcommand{\exf at scanblockplain}[1][]{\exf at scansolution{##1}{}}%
+    \def\exf at scanblock##1{\exf at scanblockplain}}%
+   \exf at scanblock{\exf at scansolution}}{\endexf at scansolution}%
 
 \newenvironment{exf at scansolution}[2]{%
-  \exf at solbelowis{here}{\showpoints}%
+  \exf at ifis\exf at solutionbelow{here}{\showpoints}%
+  \exf at ifis\exf at solutionbelow{here*}{\showpoints}%
   \global\exf at bufcleanfalse%
   \ifdefined\exf at problem@solnewsec%
    \def\exf at probarg{\ifdefined\exf at prevprob prob={\exf at prevprob}\fi%
@@ -1072,9 +1107,10 @@
     \ifdefined\exf at prevprobtitle,probtitle={\exf at prevprobtitle}\fi%
     \ifdefined\exf at prevprobhref,href={\exf at prevprobhref}\fi%
     \ifdefined\exf at sollabel,label={\exf at sollabel}\fi}%
-   \exf at solbelowis{here}{\let\exf at probarg\@undefined}%
-   \exf at solbelowis{subproblem}{\let\exf at probarg\@undefined}%
-   \exf at solbelowis{subproblem*}{\let\exf at probarg\@undefined}%
+   \exf at ifis\exf at solutionbelow{here}{\let\exf at probarg\@undefined}%
+   \exf at ifis\exf at solutionbelow{here*}{\let\exf at probarg\@undefined}%
+   \exf at ifis\exf at solutionbelow{subproblem}{\let\exf at probarg\@undefined}%
+   \exf at ifis\exf at solutionbelow{subproblem*}{\let\exf at probarg\@undefined}%
    \ifdefined\exf at probarg%
     \ifexf at lineno\exf at addbufline{\exf at linesep}\exf at addbufline{\exf at lineno}\fi%
     \exf at addbufline{\@backslashchar solutionssection{\exf at probarg}}%
@@ -1085,13 +1121,13 @@
   \ifexf at lineno\exf at addbufline{\exf at linesep}\exf at addbufline{\exf at lineno}\fi%
   \def\exf at subprobarg{%
     \ifdefined\exf at prevprob prob={\exf at prevprob},\fi%
-    \ifdefined\exf at prevsubprob%
-     subprob={\exf at prevsubprob},%
+    \ifdefined\exf at prevsubprob subprob={\exf at prevsubprob},%
      \ifdefined\exf at prevsubprobhref href={\exf at prevsubprobhref},\fi%
     \else%
      \ifdefined\exf at prevprobhref href={\exf at prevprobhref},\fi%
     \fi%
-    \ifdefined\exf at prevpoints points={\exf at prevpoints},\fi%
+    \ifdefined\exf at prevpoints points=%
+     {\expandafter\exf at formatpoints\exf at prevpoints},\fi%
     \ifdefined\sheettag sheettag={\sheettag},\fi%
     \ifdefined\problemtag problemtag={\problemtag},\fi}%
   \exf at addbufline{\@backslashchar begin{printsolution}{\exf at subprobarg#1}}%
@@ -1098,6 +1134,12 @@
   \global\let\exf at prevsubprob\@undefined%
   \global\let\exf at prevsubprobhref\@undefined%
   \global\let\exf at prevpoints\@undefined%
+  \exf at ifis\exf at solutionbelow{here*}{%
+   \def\exf at verbatim{\exf at clearbuf\begingroup%
+    \edef\exf at subprobarg{\exf at subprobarg}%
+    \exf at showsolutionsin{\exf at config@composetitlesolutionsingle}%
+    \exf at exptwo\printsolution{\exf at subprobarg#1}}%
+   \def\exf at endverbatim{\endprintsolution\exf at showsolutionsout\endgroup}}%
   \exf at verbatim#2}%
  {\exf at endverbatim%
   \exf at addbufline{\@backslashchar end{printsolution}}%
@@ -1106,17 +1148,17 @@
    \exf at clearbuf%
   \fi%
   \ifsolutions\else\exf at clearbuf\fi%
-  \exf at solbelowis{here}{\exf at showsolutions%
+  \exf at ifis\exf at solutionbelow{here}{\exf at showsolutions%
    {\exf at config@composetitlesolutionsingle}{}}%
   \ifdefined\exf at in@subproblem\else%
-   \exf at solbelowis{subproblem}{%
+   \exf at ifis\exf at solutionbelow{subproblem}{%
     \exf at showsolutions{\exf at config@composetitlesolutionsingle}{}}%
-   \exf at solbelowis{subproblem*}{%
+   \exf at ifis\exf at solutionbelow{subproblem*}{%
     \exf at showsolutions{\exf at config@composetitlesolutionsingle}{}}\fi%
   \ifdefined\exf at in@problem\else%
-   \exf at solbelowis{problem}{%
+   \exf at ifis\exf at solutionbelow{problem}{%
     \exf at showsolutions{\exf at config@composetitlesolutionmulti}{}}%
-   \exf at solbelowis{problem*}{%
+   \exf at ifis\exf at solutionbelow{problem*}{%
     \exf at showsolutions{\exf at config@composetitlesolutionmulti}{}}\fi%
   \ignorespacesafterend}
 
@@ -1125,7 +1167,7 @@
   \ifx\exf at solutionstitleexp\exf at empty\else%
    \ifdefined#5%
     \exf at csdo\def{the\exf at solutioncounter}%
-     {\exf at config@composeitemsolution{\exf at solprob}{\exf at solsubprob}}%
+     {\exf at config@composeitemsolutionlabel{\exf at solprob}{\exf at solsubprob}}%
     \refstepcounter{\exf at solutioncounter}\label{#5}%
    \fi%
    \exf at section{#3}{\exf at config@styletitle\exf at config@styletitlesolution#1%
@@ -1139,18 +1181,24 @@
    {\exf at addcontentsline{\exf at config@toclevelsolutions}%
     {\exf at config@composetocsolutions}}{\@undefined}{\@undefined}}
 
+\newcommand{\exf at showsolutionsin}[1]{%
+  \par\exf at config@styletext\addvspace{\exf at config@skipsolutionsabove}%
+  \exf at config@styletextsolution%
+  \exf at config@insertsolutionsbefore%
+  \let\exf at composetitle#1}
+
+\newcommand{\exf at showsolutionsout}{%
+  \removelastskip%
+  \exf at config@insertsolutionsafter%
+  \par\exf at config@styletext\addvspace{\exf at config@skipsolutionbelow}}
+
 \newcommand{\exf at showsolutions}[2]{%
   \ifexf at bufclean\else\begingroup%
-   \par\exf at config@styletext\addvspace{\exf at config@skipsolutionsabove}%
-   \exf at config@styletextsolution%
-   \exf at config@insertsolutionsbefore%
-   \let\exf at composetitle#1%
+   \exf at showsolutionsin{#1}%
    #2%
    \exf at sourcebuf%
    \exf at clearbuf%
-   \removelastskip%
-   \exf at config@insertsolutionsafter%
-   \par\exf at config@styletext\addvspace{\exf at config@skipsolutionbelow}%
+   \exf at showsolutionsout%
   \endgroup\fi}
 
 \newcommand{\writesolutions}[1][\jobname]{\exf at closefile\exf at startfile{#1}}



More information about the tex-live-commits mailing list