summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/problem/problem.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/problem/problem.sty')
-rw-r--r--Master/texmf-dist/tex/latex/stex/problem/problem.sty27
1 files changed, 14 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/problem/problem.sty b/Master/texmf-dist/tex/latex/stex/problem/problem.sty
index aec05910e0e..2a69e3f75e6 100644
--- a/Master/texmf-dist/tex/latex/stex/problem/problem.sty
+++ b/Master/texmf-dist/tex/latex/stex/problem/problem.sty
@@ -8,6 +8,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{problem}[2010/06/25 v0.9c Semantic Markup for Problems]
+\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}}
\newif\ifexnotes\exnotesfalse\DeclareOption{notes}{\exnotestrue}
\newif\ifhints\hintsfalse\DeclareOption{hints}{\hintstrue}
\newif\ifsolutions\solutionsfalse\DeclareOption{solutions}{\solutionstrue}
@@ -20,10 +21,10 @@
\RequirePackage{xcomment}
\RequirePackage{sref}
\srefaddidkey[prefix=prob.]{problem}
-\omdaddkey{problem}{pts}
-\omdaddkey{problem}{min}
-\omdaddkey{problem}{title}
-\omdaddkey{problem}{refnum}
+\addmetakey{problem}{pts}
+\addmetakey{problem}{min}
+\addmetakey*{problem}{title}
+\addmetakey{problem}{refnum}
\newsavebox{\probbox}
\newcounter{problem}[section]
\def\prob@number{\ifx\inclprob@refnum\@empty
@@ -35,18 +36,18 @@
\ifx\problem@title\@empty{:\quad}\else{\quad(\problem@title)\hfill\\}\fi
\else\quad(\inclprob@title)\hfill\\\fi}% else show the outside title
\ifboxed
-\newenvironment{problem}[1][]{\omdsetkeys{problem}{#1}\sref@target%
+\newenvironment{problem}[1][]{\metasetkeys{problem}{#1}\sref@target%
\stepcounter{problem}\show@pts\show@min\record@problem%
-\begin{lrbox}{\probbox}\begin{minipage}{.9\textwidth}}
+\begin{lrbox}{\probbox}\begin{minipage}{.9\textwidth}\ignorespaces}
{\end{minipage}\end{lrbox}
\setbox0=\hbox{\begin{minipage}{.9\textwidth}%
\noindent\textbf\prob@heading\rm%
\end{minipage}}
\smallskip\noindent\fbox{\vbox{\box0\vspace*{.2em}\usebox\probbox}}\smallskip}
\else
-\newenvironment{problem}[1][]{\omdsetkeys{problem}{#1}\sref@target%
+\newenvironment{problem}[1][]{\metasetkeys{problem}{#1}\sref@target%
\stepcounter{problem}\show@pts\show@min\record@problem%
-\par\noindent\textbf\prob@heading\rm}
+\par\noindent\textbf\prob@heading\rm\ignorespaces}
{\smallskip}
\fi%boxed
\def\record@problem{\protected@write\@auxout{}%
@@ -81,13 +82,13 @@
\immediate\openout\problem@file=\jobname-problems.tex
\AtEndDocument{\closeout\problem@file}
\fi
-\omdaddkey{inclprob}{pts}
-\omdaddkey{inclprob}{min}
-\omdaddkey{inclprob}{title}
-\omdaddkey{inclprob}{refnum}
+\addmetakey{inclprob}{pts}
+\addmetakey{inclprob}{min}
+\addmetakey*{inclprob}{title}
+\addmetakey{inclprob}{refnum}
\clear@inclprob@keys
\newcommand{\includeproblem}[2][]{%
-\bgroup\omdsetkeys{inclprob}{#1}\input{#2}\ifsolutions\newpage\fi\egroup
+\bgroup\metasetkeys{inclprob}{#1}\input{#2}\ifsolutions\newpage\fi\egroup
\ifextract\def\@test{#1}
\def\prob@num{\ifx\inclprob@refnum\@empty\thesection.\theproblem\else\inclprob@refnum\fi}
\def\inclprob@keys{#1\ifx\@test\@empty\else,\fi refnum=\prob@num}