summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/exframe
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-02-25 22:03:03 +0000
committerKarl Berry <karl@freefriends.org>2020-02-25 22:03:03 +0000
commitec44a8cec262bd339e0632be731402e9ebaa3992 (patch)
tree33e0ae8f16d9376e3db863683aafc699ac52025a /Master/texmf-dist/tex/latex/exframe
parent072492d86e05a2508a21d958e5a3045f32a77cae (diff)
exframe (25feb20)
git-svn-id: svn://tug.org/texlive/trunk@53911 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/exframe')
-rw-r--r--Master/texmf-dist/tex/latex/exframe/exframe.sty290
1 files changed, 231 insertions, 59 deletions
diff --git a/Master/texmf-dist/tex/latex/exframe/exframe.sty b/Master/texmf-dist/tex/latex/exframe/exframe.sty
index 73653578da3..0ca87f18430 100644
--- a/Master/texmf-dist/tex/latex/exframe/exframe.sty
+++ b/Master/texmf-dist/tex/latex/exframe/exframe.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-\ProvidesPackage{exframe}[2020/01/11 v3.31 Framework for Exercise Problems]
+\ProvidesPackage{exframe}[2020/02/24 v3.4 Framework for Exercise Problems]
\RequirePackage{verbatim}
\RequirePackage{xkeyval}
@@ -31,6 +31,7 @@
\long\def\exf@exparg#1#2{\exf@exptwo\exf@expswitch{#2}{#1}}
\def\exf@csdo#1#2{\expandafter#1\csname#2\endcsname}
\def\exf@csdotwo#1#2#3{\exf@exptwo#1#2\csname#3\endcsname}
+\def\exf@csor#1#2{\ifcsname#1\endcsname\csname#1\endcsname\else#2\fi}
\long\def\exf@append@def#1#2{\exf@exptwo\def#1\expandafter{#1#2}}
\long\def\exf@prepend@switch#1#2#3{#2{#3#1}}
@@ -52,6 +53,12 @@
\newcommand{\exf@addcontentsline}[2]{%
\ifx#1\exf@empty\else\addcontentsline{toc}{#1}{#2}\fi}
+\newcommand{\exf@notedata}[3]{\csname exf@notedata@#1\endcsname{#2}{#3}}
+\AtBeginDocument{\immediate\write\@auxout{%
+ \string\providecommand{\string\exf@notedata}[3]{}}}
+\newcommand{\exf@writedata}[3]%
+ {\immediate\write\@auxout{\string\exf@notedata{#1}{#2}{#3}}}
+
\def\exf@problemname{problem}
\def\exf@subproblemname{sub\exf@problemname}
\def\exf@solutionname{solution}
@@ -72,6 +79,8 @@
\define@boolkey{exframe.sty}[exf@]{extdata}[true]{}
\define@boolkey{exframe.sty}[exf@]{extstyle}[true]{}
+\define@boolkey{exframe.sty}[exf@]{metastr}[true]{}
+
\define@boolkey{exf@setup}[]{solutions}[true]{}
\define@choicekey{exf@setup}{pdfdata}%
{auto,manual,sheet,off}[auto]{\def\exf@metadata{#1}}
@@ -86,11 +95,18 @@
\define@boolkey{exf@setup}[exf@]{solutionbuf}[true]{}
\exf@solutionbuftrue
\define@boolkey{exf@setup}[exf@]{problembuf}[true]{}
+\def\exf@emptytestchar{&}
+\define@key{exf@setup}{emptytestchar}{\def\exf@emptytestchar{#1}}
\ProcessOptionsX<exframe.sty,exf@setup>
\newcommand{\exercisesetup}[1]{\exf@expsetkeys{exf@setup}{#1}}
+\ifexf@metastr
+\PassOptionsToPackage{course=true}{metastr}
+\RequirePackage{metastr}
+\fi
+
\newenvironment{onlysolutions}%
{\ifsolutions\else%
\let\endonlysolutions\endcomment%
@@ -111,8 +127,10 @@
\newcommand{\exerciseconfigempty}[3]{\exf@csdo\ifx{exf@config@#1}\exf@empty%
#2\else#3\fi}
-\long\def\exerciseifempty#1#2#3{\if&#1&#2\else#3\fi}
-\long\def\exerciseifnotempty#1#2{\if&#1&\else#2\fi}
+\long\def\exerciseifempty#1#2#3{%
+ \if\exf@emptytestchar#1\exf@emptytestchar#2\else#3\fi}
+\long\def\exerciseifnotempty#1#2{%
+ \if\exf@emptytestchar#1\exf@emptytestchar\else#2\fi}
\exerciseconfig{termsheet}{Sheet}
\exerciseconfig{termsheets}{Sheets}
@@ -302,8 +320,13 @@
\exerciseconfig{counterproblemequation}{P\arabic{equation}}
\exerciseconfig{countersolutionequation}{S\arabic{equation}}
+\exerciseconfig{tagsheet}{\arabic{\exf@sheetcounter}}
+\exerciseconfig{tagproblem}{\csname the\exf@problemcounter\endcsname}
+\exerciseconfig{tagsubproblem}{\problemtag-\arabic{\exf@subproblemcounter}}
+
\exerciseconfig{labelsheet}[1]{sheet:#1}
\exerciseconfig{labelproblem}[1]{prob:#1}
+\exerciseconfig{labelsubproblem}[1]{\getexerciseconfig{labelproblem}{#1}}
\exerciseconfig{toclevelsheet}{}
\exerciseconfig{toclevelproblem}{}
@@ -539,13 +562,13 @@
\hypersetup{pdfsubject={\exf@data@subject}}\fi%
\ifx\exf@data@keyword\exf@empty\else%
\hypersetup{pdfkeywords={\exf@data@keyword}}\fi%
- \fi%
- \gdef\exf@metadata{off}}
+ \fi}
-\AtBeginDocument{\exf@ifis\exf@metadata{auto}{\exf@writemetadata}}
+\AtBeginDocument{\exf@ifis\exf@metadata{auto}%
+ {\exf@writemetadata\gdef\exf@metadata{off}}}
-\newcommand{\writeexercisedata}{%
- \exf@ifis\exf@metadata{manual}{\exf@writemetadata}}
+\newcommand{\writeexercisedata}{\exf@ifis\exf@metadata{manual}%
+ {\exf@writemetadata\gdef\exf@metadata{off}}}
\newcounter{\exf@sheetcounter}
\newcounter{\exf@problemcounter}
@@ -569,7 +592,15 @@
\newcommand{\exf@numberproblemwithin}[1]{%
\@addtoreset{\exf@problemcounter}{#1}%
\exf@csdo\def{the\exf@problemcounter}%
- {\csname the#1\endcsname.\exf@config@counterproblem}}
+ {\csname the#1\endcsname.\exf@config@counterproblem}%
+ \edef\exf@tmp{#1}%
+ \ifx\exf@tmp\exf@sheetcounter%
+ \exerciseconfig{tagproblem}{\ifdefined\sheettag\sheettag-\fi%
+ \arabic{\exf@problemcounter}}%
+ \else%
+ \exerciseconfig{tagproblem}{\csname the#1\endcsname-%
+ \arabic{\exf@problemcounter}}%
+ \fi}
\newcommand{\exf@numberequationwithin}[1]{%
\@addtoreset{exf@sheetequation}{#1}%
@@ -702,20 +733,20 @@
\global\let#3\@undefined\fi}
\def\exf@outpoints@switch#1#2#3{#2{\protect#3#1}}
-\def\exf@scanpoints#1#2+#3+#4&{%
- \edef#1{\if&#2&0\else#2\fi}%
- \edef#1{{#1}{\if&#3&0\else#3\fi}}}
+\def\exf@scanpoints#1#2+#3+#4@{%
+ \edef#1{\if @#2@0\else#2\fi}%
+ \edef#1{{#1}{\if @#3@0\else#3\fi}}}
\def\exf@formatpoints#1#2{\ifdim#2pt=0pt#1\else%
\ifdim#1pt=0pt+#2\else#1+#2\fi\fi}
\newcommand{\extractpoints}{\@ifstar{\exf@extractpoints\@secondoftwo}%
{\exf@extractpoints\@firstoftwo}}
\newcommand{\exf@extractpoints}[2]{\edef\exf@tmp{#2}%
- \exf@exptwo\exf@scanpoints\exf@tmp\exf@tmp++&%
+ \exf@exptwo\exf@scanpoints\exf@tmp\exf@tmp++@%
\expandafter#1\exf@tmp}
\newcommand{\switchpoints}[5]{\edef\exf@tmp{#5}%
- \exf@exptwo\exf@scanpoints\exf@tmp\exf@tmp++&%
+ \exf@exptwo\exf@scanpoints\exf@tmp\exf@tmp++@%
\expandafter\exf@switchpoints\exf@tmp{#1}{#2}{#3}{#4}}
\newcommand{\exf@switchpoints}[6]{%
\ifdim#2pt=0pt\ifdim#1pt=0pt\def\exf@tmp##1##2{#6}%
@@ -752,8 +783,8 @@
\edef\exf@tmp{#1}%
\expandafter\exf@splitsign\exf@tmp--&%
\expandafter\exf@splitdecimal\exf@splitnum..&%
- \if&\exf@splitint&\def\exf@splitint{0}\fi%
- \if&\exf@splitdec&\def\exf@splitdec{0}\fi%
+ \if @\exf@splitint @\def\exf@splitint{0}\fi%
+ \if @\exf@splitdec @\def\exf@splitdec{0}\fi%
\def\exf@tmp{\exf@splitint.\exf@splitdec}%
\ifnum\exf@splitdec=0\def\exf@tmp{\exf@splitint}\fi%
\ifnum\exf@splitdec=5\def\exf@tmp{\exf@config@frac{\exf@splitint}{1}{2}}\fi%
@@ -767,41 +798,29 @@
}
\newcommand{\exf@config@frac}[3]{%
- \ifnum#1=0\else#1\fi%
- \ifnum#2=0\else$%
+ \ifnum#1=0\relax\else#1\fi%
+ \ifnum#2=0\relax\else$%
^{\exf@text{#2}}%
\mskip-4mu/\mskip-2mu%
_{\exf@text{#3}}$\fi}
-\newcommand{\exf@notesheetpoints}[2]{%
+\newcommand{\exf@notedata@sheetpoints}[2]{%
\exf@csdo\gdef{exf@sheetpoints@#1}{#2}}
-\AtBeginDocument{\immediate\write\@auxout{%
- \string\providecommand{\string\exf@notesheetpoints}[2]{}}}
\newcommand{\exf@writesheetpoints}[2]%
- {\immediate\write\@auxout{\string\exf@notesheetpoints{\sheettag}%
- {\exf@formatpoints{#1}{#2}}}}
-\newcommand{\getsheetpoints}[1]{\if&#1&%
+ {\exf@writedata{sheetpoints}{\sheettag}{\exf@formatpoints{#1}{#2}}}
+\newcommand{\getsheetpoints}[1]{\if @#1@%
\ifdefined\exf@sheet@points%
\expandafter\exf@formatpoints\exf@sheet@points\else 0\fi%
- \else\ifcsname exf@sheetpoints@#1\endcsname%
- \csname exf@sheetpoints@#1\endcsname\else 0\fi\fi}
+ \else\exf@csor{exf@sheetpoints@#1}{0}\fi}
-\newcommand{\exf@noteproblempoints}[2]{%
+\newcommand{\exf@notedata@problempoints}[2]{%
\exf@csdo\gdef{exf@problempoints@#1}{#2}}
-\AtBeginDocument{\immediate\write\@auxout{%
- \string\providecommand{\string\exf@noteproblempoints}[2]{}}}
\newcommand{\exf@writeproblempoints}[2]%
- {\immediate\write\@auxout{\string\exf@noteproblempoints{\problemtag}%
- {\exf@formatpoints{#1}{#2}}}}
-\newcommand{\getproblempoints}[1]{\if&#1&%
+ {\exf@writedata{problempoints}{\problemtag}{\exf@formatpoints{#1}{#2}}}
+\newcommand{\getproblempoints}[1]{\if @#1@%
\ifdefined\exf@problem@points%
\expandafter\exf@formatpoints\exf@problem@points\else 0\fi%
- \else\ifcsname exf@problempoints@#1\endcsname%
- \csname exf@problempoints@#1\endcsname\else 0\fi\fi}
-\newcommand{\getsubproblempoints}[1]{\if&#1&%
- \ifdefined\exf@subproblem@points%
- \expandafter\exf@formatpoints\exf@subproblem@points\else 0\fi%
- \else 0\fi}
+ \else\exf@csor{exf@problempoints@#1}{0}\fi}
\newcommand{\showpoints}{%
\ifdefined\exf@in@solution\exf@outpoints{\exf@ensuretext}%
@@ -812,23 +831,80 @@
{\exf@config@composepointspairbodyproblem}{\exf@problem@points@show}%
\fi\fi\fi}
-\newcommand{\exf@awardpointsalt}[2][]{\exf@scanpoints\exf@tmp#2++&%
+\newcommand{\exf@notedata@subproblempoints}[2]{%
+ \exf@csdo\gdef{exf@subproblempoints@#1}{#2}}
+\newcommand{\exf@writesubproblempoints}[2]%
+ {\exf@writedata{subproblempoints}%
+ {\subproblemtag}{\exf@formatpoints{#1}{#2}}}
+\newcommand{\getsubproblempoints}[1]{\if @#1@%
+ \ifdefined\exf@subproblem@points%
+ \expandafter\exf@formatpoints\exf@subproblem@points\else 0\fi%
+ \else\exf@csor{exf@subproblempoints@#1}{0}\fi}
+
+\newcommand{\exf@awardpointsalt}[2][]{\exf@scanpoints\exf@tmp#2++@%
\exf@exptwo\exf@ensuretext{%
\expandafter\exf@config@composepointspairawardalt\exf@tmp{#1}}}
-\newcommand{\exf@awardpointsreg}[2][]{\exf@scanpoints\exf@tmp#2++&%
+\newcommand{\exf@awardpointsreg}[2][]{\exf@scanpoints\exf@tmp#2++@%
\exf@exptwo\exf@addtopoints\exf@solution@points@total\exf@tmp%
- \exf@scanpoints\exf@tmp#2++&%
+ \exf@scanpoints\exf@tmp#2++@%
\exf@exptwo\exf@ensuretext{%
\expandafter\exf@config@composepointspairaward\exf@tmp{#1}}}
\newcommand{\awardpoints}{\@ifstar\exf@awardpointsalt\exf@awardpointsreg}
-\newcommand{\getsolutionpoints}[1]{\if&#1&%
+\newcommand{\getsolutionpoints}[1]{\if @#1@%
\ifdefined\exf@solution@points%
\expandafter\exf@formatpoints\exf@solution@points\else 0\fi%
\else 0\fi}
-\define@key{exf@sheet}{points}{\exf@scanpoints\exf@sheet@points#1++&}
-\define@key{exf@sheet}{number}{\setcounter{\exf@sheetcounter}{#1}}
+\newcounter{exerciseloop}
+\newcounter{exf@loopdepth}
+
+\def\exf@listwalk#1#2{\if @#2@\def\exf@tmp{}\else%
+ \def\exf@tmp{#1{#2}\exf@listwalk#1}\fi\exf@tmp}
+
+\newcommand{\exerciseloop}[2]{\addtocounter{exf@loopdepth}{1}%
+ \setcounter{exerciseloop}{0}%
+ \exf@csdo\gdef{exf@listcallback@\roman{exf@loopdepth}}##1%
+ {\stepcounter{exerciseloop}#2}%
+ \edef\exf@tmp{#1}%
+ \exf@csdotwo\exf@exptwo\exf@listwalk%
+ {exf@listcallback@\roman{exf@loopdepth}}\exf@tmp{}%
+ \addtocounter{exf@loopdepth}{-1}}
+\newcommand{\exerciseloopstr}[3][\exerciseloopret]{%
+ \def#1{}\exerciseloop{#2}{\protected@edef#1{#1#3}}}
+
+\def\exf@sheetlist{}
+\newcommand{\exf@notedata@sheet}[2]{%
+ \xdef\exf@sheetlist{\exf@sheetlist{#1}}}
+\def\exf@problemlist{}
+\newcommand{\exf@notedata@problem}[2]{%
+ \xdef\exf@problemlist{\exf@problemlist{#1}}%
+ \if @#2@\else%
+ \ifcsname exf@problemlist@#2\endcsname\else%
+ \exf@csdo\gdef{exf@problemlist@#2}{}\fi%
+ \exf@csdo\xdef{exf@problemlist@#2}%
+ {\csname exf@problemlist@#2\endcsname{#1}}%
+ \fi}
+\newcommand{\exf@notedata@subproblem}[2]{%
+ \ifcsname exf@subproblemlist@#2\endcsname\else%
+ \exf@csdo\gdef{exf@subproblemlist@#2}{}\fi%
+ \exf@csdo\xdef{exf@subproblemlist@#2}%
+ {\csname exf@subproblemlist@#2\endcsname{#1}}}
+
+\newcommand{\getsheetlist}[1]{\exf@sheetlist}
+\newcommand{\getproblemlist}[1]{\if @#1@%
+ \ifdefined\sheettag\exf@csor{exf@problemlist@\sheettag}{}%
+ \else\exf@problemlist\fi%
+ \else%
+ \if *#1\exf@problemlist\else\exf@csor{exf@problemlist@#1}{}\fi%
+ \fi}
+\newcommand{\getsubproblemlist}[1]{\if @#1@%
+ \exf@csor{exf@subproblemlist@\problemtag}{}\else%
+ \exf@csor{exf@subproblemlist@#1}{}\fi}
+
+\define@key{exf@sheet}{points}{\exf@scanpoints\exf@sheet@points#1++@}
+\define@key{exf@sheet}{number}{\setcounter{\exf@sheetcounter}{#1}%
+ \addtocounter{\exf@sheetcounter}{-1}\refstepcounter{\exf@sheetcounter}}
\define@key{exf@sheet}{label}{\def\exf@label{#1}}
\define@key{exf@sheet}{tag}{\def\sheettag{#1}}
@@ -842,26 +918,27 @@
\let\theHequation\theHexf@sheetequation%
\fi%
\let\exf@sheet@points\@undefined%
- \def\sheettag{\csname the\exf@sheetcounter\endcsname}%
+ \def\sheettag{\getexerciseconfig{tagsheet}}%
\let\exf@sheet@points@total\@undefined%
\let\exf@label\@undefined%
\setkeys{exf@sheet}{#1}%
\ifexf@autolabelsheet\label{\exf@config@labelsheet{\sheettag}}\fi%
\ifdefined\exf@label\label{\exf@label}\fi%
+ \exf@writedata{sheet}{\sheettag}{}%
\ifdefined\exf@sheet@points%
\let\exf@sheet@points@given\exf@empty%
\else%
\let\exf@sheet@points@given\@undefined%
\ifcsname exf@sheetpoints@\sheettag\endcsname%
\exf@csdotwo\let\exf@tmp{exf@sheetpoints@\sheettag}%
- \exf@exptwo\exf@scanpoints\exf@sheet@points\exf@tmp++&%
+ \exf@exptwo\exf@scanpoints\exf@sheet@points\exf@tmp++@%
\fi\fi%
\exf@ifis\exf@metadata{sheet}{{%
\ifx\exf@data@sheet@author\exf@empty\else%
\let\exf@data@author\exf@data@sheet@author\fi%
\def\exf@data@title{\exf@config@composemetasheet%
{\csname the\exf@sheetcounter\endcsname}{\exf@data@sheet@rawtitle}}%
- \exf@writemetadata}}%
+ \exf@writemetadata}\gdef\exf@metadata{off}}%
\exf@config@insertsheetbefore%
\ifx\exf@config@toclevelsheet\exf@empty\else%
\ifdefined\phantomsection\phantomsection\fi\fi%
@@ -893,7 +970,7 @@
\clearpage\ifexf@twoside\ifodd\value{page}\else%
\thispagestyle{empty}\hbox{}\newpage\fi\fi}
-\define@key{exf@problem}{points}{\exf@scanpoints\exf@problem@points#1++&}
+\define@key{exf@problem}{points}{\exf@scanpoints\exf@problem@points#1++@}
\define@key{exf@problem}{label}{\def\exf@label{#1}}
\define@key{exf@problem}{tag}{\def\problemtag{#1}}
\define@key{exf@problem}{sollabel}{\xdef\exf@sollabel{#1}}
@@ -911,7 +988,7 @@
\let\theHequation\theHexf@problemequation%
\fi%
\exf@init@block{\exf@config@skipprobleminfo}%
- \def\problemtag{\csname the\exf@problemcounter\endcsname}%
+ \def\problemtag{\getexerciseconfig{tagproblem}}%
\let\exf@problem@points\@undefined%
\let\exf@label\@undefined%
\global\let\exf@sollabel\@undefined%
@@ -919,6 +996,7 @@
\setkeys{exf@problem,exf@probleminfo,exf@scanproblem}{#1}%
\ifexf@autolabelproblem\label{\exf@config@labelproblem{\problemtag}}\fi%
\ifdefined\exf@label\label{\exf@label}\fi%
+ \exf@writedata{problem}{\problemtag}{\ifdefined\sheettag\sheettag\fi}%
\gdef\exf@problem@solnewsec{}%
\xdef\exf@prevprob{\csname the\exf@problemcounter\endcsname}%
\ifcsname theH\exf@problemcounter\endcsname%
@@ -938,7 +1016,7 @@
\let\exf@problem@points@given\@undefined%
\ifcsname exf@problempoints@\problemtag\endcsname%
\exf@csdotwo\let\exf@tmp{exf@problempoints@\problemtag}%
- \exf@exptwo\exf@scanpoints\exf@problem@points\exf@tmp++&%
+ \exf@exptwo\exf@scanpoints\exf@problem@points\exf@tmp++@%
\fi\fi%
\global\let\exf@prevpoints\exf@problem@points%
\let\exf@problem@points@show\@undefined%
@@ -996,8 +1074,7 @@
\ifdefined\exf@problem@points%
\expandafter\exf@writeproblempoints\exf@problem@points%
\exf@exptwo\exf@addtopoints\exf@sheet@points@total\exf@problem@points%
- \fi%
- \ifdefined\exf@problem@points\else\ifdefined\exf@sheet@points@total%
+ \else\ifdefined\exf@sheet@points@total%
\PackageWarning{exframe}{no points defined for \exf@problemname}%
\fi\fi%
\global\let\exf@prevsubprob\@undefined%
@@ -1102,8 +1179,9 @@
\newcommand{\insertproblems}{\exf@showproblems}
-\define@key{exf@subproblem}{points}{\exf@scanpoints\exf@subproblem@points#1++&}
+\define@key{exf@subproblem}{points}{\exf@scanpoints\exf@subproblem@points#1++@}
\define@key{exf@subproblem}{label}{\def\exf@label{#1}}
+\define@key{exf@subproblem}{tag}{\def\subproblemtag{#1}}
\newenvironment{\exf@subproblemname}[1][]{%
\par{\exf@config@styletext\addvspace{\exf@config@skipsubproblemabove}}%
@@ -1112,10 +1190,14 @@
\begingroup%
\def\exf@in@subproblem{}%
\exf@init@block{\exf@config@skipsubprobleminfo}%
+ \def\subproblemtag{\getexerciseconfig{tagsubproblem}}%
\let\exf@subproblem@points\@undefined%
\let\exf@label\@undefined%
\setkeys{exf@subproblem,exf@probleminfo}{#1}%
+ \ifexf@autolabelproblem\label{\exf@config@labelsubproblem%
+ {\subproblemtag}}\fi%
\ifdefined\exf@label\label{\exf@label}\fi%
+ \exf@writedata{subproblem}{\subproblemtag}{\problemtag}%
\xdef\exf@prevsubprob{\csname the\exf@subproblemcounter\endcsname}%
\ifcsname theH\exf@subproblemcounter\endcsname%
\xdef\exf@prevsubprobhref{\exf@subproblemcounter.%
@@ -1127,12 +1209,11 @@
\exf@ifis\exf@subpointsat{off}{\let\exf@subproblem@points@show\@undefined}%
\ifdefined\exf@subproblem@points%
\global\let\exf@prevpoints\exf@subproblem@points%
+ \expandafter\exf@writesubproblempoints\exf@subproblem@points%
\exf@exptwo\exf@addtopoints\exf@problem@points@total\exf@subproblem@points%
- \else%
- \ifdefined\exf@problem@points@total%
- \PackageWarning{exframe}{no points defined for \exf@subproblemname}%
- \fi%
- \fi%
+ \else\ifdefined\exf@problem@points@total%
+ \PackageWarning{exframe}{no points defined for \exf@subproblemname}%
+ \fi\fi%
\exf@ifis\exf@subpointsat{start}{\exf@outpoints{\exf@append@intro}%
{\exf@config@composepointspairstartsubproblem}{\exf@subproblem@points@show}}%
\exf@ifis\exf@subpointsat{start*}{\exf@outpoints{\exf@prepend@intro}%
@@ -1181,7 +1262,7 @@
\define@key{exf@solution}{sheettag}{\def\sheettag{#1}}
\define@key{exf@solution}{href}{\def\exf@solhref{#1}}
\define@key{exf@solution}{label}{\def\exf@label{#1}}
-\define@key{exf@solution}{points}{\exf@scanpoints\exf@solution@points#1++&}
+\define@key{exf@solution}{points}{\exf@scanpoints\exf@solution@points#1++@}
\define@key{exf@solution}{probtitle}{\def\exf@solprobtitle{#1}}
\newenvironment{printsolution}[1]{%
@@ -1438,6 +1519,97 @@
\newcommand{\insertsolutions}{\exf@showsolutions%
{\exf@config@composetitlesolutionmulti}{\exf@solutionstitle}}
+\ifdefined\metaset
+
+\exercisedata{author={\metapick[]{author}}}
+\exercisedata{title={\metapick[]{title}}}
+\exercisedata{subject={\metapick[]{subject}}}
+\exercisedata{keyword={\metapick[]{keyword}}}
+\exercisedata{date={\metapick[]{date}}}
+\ifdefined\mstr@def@course
+\exercisedata{course={\metapick[]{course}}}
+\exercisedata{instructor={\metapick[]{instructor}}}
+\exercisedata{institution={\metapick[]{institution}}}
+\exercisedata{period={\metapick[]{period}}}
+\exercisedata{material={\metapick[]{material}}}
+\fi
+
+\metadef{sheettitle}
+\metadef{sheetauthor}
+
+\metaunset[info]{writepdf}
+\def\exf@writemetadata{%
+ \exf@ifis\exf@metadata{sheet}{\metaset[use]{sheettitle}{}}%
+ \metawritepdfinfo%
+ \exf@ifis\exf@metadata{sheet}{\metaunset[use]{sheettitle}}}
+
+\metaset{sheetauthor}{\exerciseifempty{\getsheetdata{author}}%
+ {\metapick[#1]{instructor}}{\getsheetdata{author}}}
+\metaset{sheettitle}{\exerciseifempty{\getsheetdata{rawtitle}}%
+ {\metatranslate[#1]{sheet} \thesheet}%
+ {\getsheetdata{rawtitle}}}
+\metaset{author}{\exerciseifempty{\getsheetdata{author}}%
+ {\metapick[#1]{instructor}}{\metapick[#1]{sheetauthor}}}
+\metaset{subtitle}{%
+ \metaif[use]{sheettitle}
+ {\metapick[#1]{sheettitle}}
+ {\metapick[#1]{material}}}
+
+\exerciseconfig{termsheet}{\metaterm{sheet}}
+\exerciseconfig{termsheets}{\metaterm{sheets}}
+\exerciseconfig{termproblem}{\metaterm{problem}}
+\exerciseconfig{termproblems}{\metaterm{problems}}
+\exerciseconfig{termsolution}{\metaterm{solution}}
+\exerciseconfig{termsolutions}{\metaterm{solutions}}
+\exerciseconfig{termpoint}{\metaterm{point}}
+\exerciseconfig{termpoints}{\metaterm{points}}
+
+\ifdefined\mstr@lang@en
+\metasetterm[en]{sheet}{Sheet}
+\metasetterm[en]{sheets}{Sheets}
+\metasetterm[en]{problem}{Problem}
+\metasetterm[en]{problems}{Problems}
+\metasetterm[en]{solution}{Solution}
+\metasetterm[en]{solutions}{Solutions}
+\metasetterm[en]{point}{point}
+\metasetterm[en]{points}{points}
+\fi
+
+\ifdefined\mstr@lang@de
+\metasetterm[de]{sheet}{Blatt}
+\metasetterm[de]{sheets}{Blätter}
+\metasetterm[de]{problem}{Aufgabe}
+\metasetterm[de]{problems}{Aufgaben}
+\metasetterm[de]{solution}{L\"osung}
+\metasetterm[de]{solutions}{L\"osungen}
+\metasetterm[de]{point}{Punkt}
+\metasetterm[de]{points}{Punkte}
+\fi
+
+\ifdefined\mstr@lang@fr
+\metasetterm[fr]{sheet}{Feuille}
+\metasetterm[fr]{sheets}{Feuilles}
+\metasetterm[fr]{problem}{Probl\`eme}
+\metasetterm[fr]{problems}{Probl\`emes}
+\metasetterm[fr]{solution}{Solution}
+\metasetterm[fr]{solutions}{Solutions}
+\metasetterm[fr]{point}{point}
+\metasetterm[fr]{points}{points}
+\fi
+
+\ifdefined\mstr@lang@es
+\metasetterm[es]{sheet}{Hoja}
+\metasetterm[es]{sheets}{Hojas}
+\metasetterm[es]{problem}{Problema}
+\metasetterm[es]{problems}{Problemas}
+\metasetterm[es]{solution}{Solucion}
+\metasetterm[es]{solutions}{Soluciones}
+\metasetterm[es]{point}{punto}
+\metasetterm[es]{points}{puntos}
+\fi
+
+\fi
+
\endinput
%%
%% End of file `exframe.sty'.