summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-16 20:26:53 +0000
committerKarl Berry <karl@freefriends.org>2022-06-16 20:26:53 +0000
commit06d71f59abdcb8224d67e927c736128820fee886 (patch)
treea5622b5bcb9f4414f2fdfda8ee3da3e84c30bbcc /Master/texmf-dist
parenta3b8e59816f3d95cf22196e6bf3309c6d699a871 (diff)
verifiche (16jun22)
git-svn-id: svn://tug.org/texlive/trunk@63615 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdfbin191888 -> 192001 bytes
-rw-r--r--Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex2
-rw-r--r--Master/texmf-dist/doc/latex/verifiche/verifiche.pdfbin555223 -> 585018 bytes
-rw-r--r--Master/texmf-dist/source/latex/verifiche/verifiche.dtx92
-rw-r--r--Master/texmf-dist/tex/latex/verifiche/verifiche.sty74
5 files changed, 109 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf b/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf
index 191c0559354..b6ae252e2e5 100644
--- a/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf
+++ b/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex b/Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex
index ec32c5f405d..b399be3644c 100644
--- a/Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex
+++ b/Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex
@@ -167,7 +167,7 @@ Quali delle seguenti equazioni descrive il moto rettilineo uniforme?\par
\begin{esercizio}
\lipsum[2]\\[1em]
-\openquestion[type=squares, width=8cm, height=6cm, linecolor=orange]{\lipsum[2]}
+\openquestion[type=lines, width=8cm, height=6cm, linecolor=orange]{\lipsum[2]}
\end{esercizio}
diff --git a/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf b/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf
index 63cb42a4d14..47ae4949a2b 100644
--- a/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf
+++ b/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/verifiche/verifiche.dtx b/Master/texmf-dist/source/latex/verifiche/verifiche.dtx
index 90f9978a642..de03d7052ae 100644
--- a/Master/texmf-dist/source/latex/verifiche/verifiche.dtx
+++ b/Master/texmf-dist/source/latex/verifiche/verifiche.dtx
@@ -16,7 +16,7 @@
%
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{verifiche} [2022/03/10 v5.0 .dtx verifiche file]
+%<package>\ProvidesPackage{verifiche} [2022/06/16 v5.1 .dtx verifiche file]
%<*driver>
\documentclass{ltxdoc}
\usepackage[utf8]{inputenc}
@@ -70,7 +70,7 @@
%</driver>
% \fi
%
-% \CheckSum{863}
+% \CheckSum{914}
% \changes{v1.0}{2020/06/14}{Initial version.}
% \changes{v2.0}{2020/06/26}{Better performance in exercise environment.}
% \changes{v2.1}{2020/06/30}{Introduced closedquestionitem to control |item| symbol.}
@@ -82,6 +82,7 @@
% \changes{v4.3}{2022/02/10}{Move |parindent{0pt}| inside the environment.}
% \changes{v4.4}{2022/03/10}{Minor update. Fixed labels issues.}
% \changes{v5.0}{2022/05/18}{Major update. Remove some unnecessary packages. Remove spurious space in closedquestion environment. Add a starred version of closedquestion environment. Add the possibility to add local label to soluzione environment. Add a new command: makecolumn.}
+% \changes{v5.1}{2022/06/16}{Minor update. Clean the code for printheading command; better appearance for openquestion command.}
% \GetFileInfo{verifiche.sty}
% \DoNotIndex{\newcommand,\newenvironment,\def,\begin,\end,\par}
% \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions,\RequirePackage}
@@ -120,7 +121,8 @@
%
% \title{Il pacchetto \textsf{verifiche}
% \thanks{Questo documento corrisponde al pacchetto \textsf{verifiche}~\fileversion,
-% in data~\filedate.}}
+% in data~\filedate.}
+%\\ {\normalsize Version: \fileversion}}
% \author{Francesco Raccanello\\ \texttt{raccanello.francesco@gmail.com}}
%
% \maketitle
@@ -732,7 +734,7 @@ dell'esercizio somministrato
%Il comando gestisce alcune opzioni:\\
%
%\begin{tabular}{ll}
-%|type|  & accetta due valori: \texttt{lines} e \texttt{squares} (default: |lines|)\\
+%|type|  & accetta due valori: \texttt{lines} e \texttt{squares} (default: |squares|)\\
%|width| & gestisce la dimensione orizzontale del campo di testo (default: 12 cm)\\
%|height| & gestisce la dimensione verticale del campo di testo (default: 20 cm)\\
%|spacedim|& gestisce la dimensione dei quadretti o delle linee (default: 0.5 cm)\\
@@ -749,7 +751,7 @@ dell'esercizio somministrato
Prova del testo della soluzione
della domanda aperta
}}
-{\openquestion[width=4cm, height=2cm]{Prova del testo della soluzione della domanda aperta}}
+{\vspace*{1em}\openquestion[width=4cm, height=2cm]{Prova del testo della soluzione della domanda aperta}}
% \iffalse
%</example>
% \fi
@@ -758,11 +760,11 @@ dell'esercizio somministrato
%<*example>
% \fi
\example
-{\openquestion[type=squares]{
+{\openquestion[type=lines]{
Prova del testo della soluzione
della domanda aperta
}}
-{\openquestion[type=squares, width=4cm, height=2cm]{Prova del testo della soluzione della domanda aperta}}
+{\vspace*{1em}\openquestion[type=lines, width=4cm, height=2cm]{Prova del testo della soluzione della domanda aperta}}
% \iffalse
%</example>
% \fi
@@ -1094,6 +1096,7 @@ dell'esercizio somministrato
\newif\ifsolutionscolor\solutionscolorfalse
\newif\ifcandidatename\candidatenametrue
\newif\iftesttype\testtypetrue
+\newif\ifshowinstructiondelimiter\showinstructiondelimiterfalse
\newif\ifprintedheading\printedheadingfalse
\newif\ifexercisesnumbered\exercisesnumberedtrue
\newif\ifshowmarginexercise\showmarginexercisefalse
@@ -1147,6 +1150,9 @@ dell'esercizio somministrato
\setlength{\classrulerlength}{.1\textwidth}
\setlength{\daterulerlength}{.15\textwidth}
\setlength{\ptrulerlength}{1cm}
+\newlength{\verifiche@remainingvspace}
+\newlength{\verifiche@remaininghspace}
+\newlength{\spacedim}
\setlength{\columnseparation}{\fill}
% \end{macrocode}
%
@@ -1207,11 +1213,13 @@ dell'esercizio somministrato
\newcommand{\institute}[1]{%
\gdef\@institute{#1}}
\newcommand{\duration}[2][\@durationlabeldefault]{%
- \gdef\@durationpreamble{#1}\gdef\@duration{#2}}
+ \gdef\@durationpreamble{#1}\gdef\@duration{#2}%
+ \showinstructiondelimitertrue}%
\newcommand{\testtype}[1]{%
\gdef\@testtype{#1}}
\newcommand{\instruction}[1]{%
- \gdef\@instruction{#1}}
+ \gdef\@instruction{#1}%
+ \showinstructiondelimitertrue}
\newcommand{\asyear}[2][\@asyearlabeldefault]{%
\gdef\@asyearpreamble{#1}\gdef\@asyear{#2}}
% \end{macrocode}
@@ -1231,15 +1239,15 @@ dell'esercizio somministrato
% \end{macrocode}
% \begin{macrocode}
\newcommand{\asyearfont}[1]{%
- \hspace*{\fill} #1\hspace*{\fill}\\[.5em]}
+ \hspace*{\fill} #1\hspace*{\fill}}
% \end{macrocode}
% \begin{macrocode}
\newcommand{\testtypefont}[1]{%
- \hspace*{\fill}\scshape\huge#1\hspace*{\fill}}
+ \bgroup\hspace*{\fill}\scshape\huge#1\hspace*{\fill}\egroup}
% \end{macrocode}
% \begin{macrocode}
\newcommand{\instructiondelimiter}{%
- \rule{\textwidth}{.5pt}}
+ \hrulefill}
% \end{macrocode}
% \begin{macrocode}
\newcommand{\instrunctionfont}[1]{%
@@ -1247,7 +1255,7 @@ dell'esercizio somministrato
% \end{macrocode}
% \begin{macrocode}
\newcommand{\durationfont}[1]{%
- \hspace*{\fill}\@durationpreamble\space\bfseries #1\hspace*{\fill}}
+ \bgroup\hspace*{\fill}\@durationpreamble\space\bfseries #1\hspace*{\fill}\egroup}
% \end{macrocode}
% \begin{macrocode}
\newcommand{\@header@candidatename}{%
@@ -1368,6 +1376,21 @@ dell'esercizio somministrato
#2}
\chardef\ltx@zero=0%
% \end{macrocode}
+%\iffalse
+%% init vertical/horizontal remaining space
+%\fi
+% \begin{macrocode}
+\newcommand{\verifiche@initremainingvspace}{%
+ \pgfmathsetlength{\verifiche@remainingvspace}{%
+ floor((\dimexpr\pagegoal-\pagetotal-.5\baselineskip\relax)/\spacedim)*\spacedim%
+ }%
+}%
+\newcommand{\verifiche@initremaininghspace}{%
+ \pgfmathsetlength{\verifiche@remaininghspace}{%
+ floor(\linewidth/\spacedim)*\spacedim%
+ }%
+}%
+% \end{macrocode}
%\paragraph{Page styles}
%The package define two new pagestyle: \texttt{mainverifiche} and \texttt{verifiche}. The former is used if \verb|\@institute| is defined (or if \verb|noinstitute| is not declared) as \verb|\thispagestyle| mode. The latter can be used by the user and print, on the odd pages, the name, date and class of the candidate.
@@ -1392,11 +1415,13 @@ dell'esercizio somministrato
% \begin{macrocode}
\newcommand{\printheading}{%
{\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{plain}\fi}%
- {\ifcandidatename\@header\\[1em]\fi}%
- {\ifdefined\@asyear\ifasyear \asyearfont{\@asyearpreamble\space\@asyear}\fi\fi}%
- {\ifdefined\@testtype\iftesttype\testtypefont{\@testtype}\fi\fi}\\%
- {\ifdefined\@instruction\ifinstruction\instructiondelimiter\\{\instrunctionfont{\@instruction}}\\%
- \ifdefined\@duration\ifduration{\durationfont\@duration\\}\fi\fi\instructiondelimiter\fi\fi}%
+ {\ifcandidatename\@header\par\vspace{\baselineskip}\fi}%
+ {\ifdefined\@asyear\ifasyear\asyearfont{\@asyearpreamble\space\@asyear}\par\vspace{\baselineskip}\fi\fi}%
+ {\ifdefined\@testtype\iftesttype\testtypefont{\@testtype}\par\fi\fi}%
+ {\ifshowinstructiondelimiter\instructiondelimiter\par\fi}%
+ {\ifdefined\@instruction\ifinstruction\instrunctionfont{\@instruction}}\par\fi\fi%
+ {\ifdefined\@duration\ifduration\durationfont\@duration\par\fi\fi}%
+ {\ifshowinstructiondelimiter\instructiondelimiter\par\fi}%
}
% \end{macrocode}
@@ -1648,11 +1673,11 @@ dell'esercizio somministrato
%\begin{macro}{\openquestion}
%The |\openquestion| use key-value options defined as following presented.
% \begin{macrocode}
-\define@key{openquestion}{width}[\linewidth]{\def\openquestionwidth{#1}}
-\define@key{openquestion}{height}[19cm]{\def\openquestionheight{#1}}
-\define@key{openquestion}{spacedim}[0.5cm]{\def\spacedim{#1}}
-\define@key{openquestion}{linecolor}[gray]{\def\openquestionlinecolor{#1}}
-\define@choicekey*+{openquestion}{type}[\val\nr]{lines, squares}[lines]{%
+\define@key{openquestion}{spacedim}[0.5cm]{\setlength{\spacedim}{#1}\verifiche@initremainingvspace\verifiche@initremaininghspace}%
+\define@key{openquestion}{height}[\the\verifiche@remainingvspace]{\def\openquestionheight{#1}}%
+\define@key{openquestion}{width}[\the\verifiche@remaininghspace]{\def\openquestionwidth{#1}}%
+\define@key{openquestion}{linecolor}[gray]{\def\openquestionlinecolor{#1}}%
+\define@choicekey*+{openquestion}{type}[\val\nr]{lines, squares}[squares]{%
\ifcase\nr\relax%
% lines
\openquestionsquaredfalse\openquestionlinestrue%
@@ -1667,33 +1692,36 @@ dell'esercizio somministrato
%Depending on the |type| of the |\openquestion|, squared or ruled background is composed and in the foreground is reproduce the text of the argument of the command (in the "solutions mode").
% \begin{macrocode}
\NewDocumentCommand{\openquestion}{o m}{%
- \setkeys{openquestion}{type, width, height, linecolor, spacedim} %init
+ \setkeys{openquestion}{type, spacedim, width, height, linecolor} %init
\IfValueT{#1}{\setkeys{openquestion}{#1}}%
- \ifopenquestionsquared% if squared open question
+ \vspace{-\baselineskip}%
+ \begin{center}
+ \ifopenquestionsquared% if squared open question
\begin{tikzpicture}%
- \draw[step=\spacedim, \openquestionlinecolor]%
+ \draw[step=\the\spacedim, \openquestionlinecolor]%
(0,0) grid (\openquestionwidth,-\openquestionheight);%
\node[%
anchor=base west,%
align=left, text width=\openquestionwidth,%
inner sep=0cm,%
font=\solutionfont,%
- execute at begin node=\setlength{\baselineskip}{\spacedim}]%
- at (0, -\spacedim){\ifsol#2\fi};
+ execute at begin node=\setlength{\baselineskip}{\the\spacedim}]%
+ at (0, -\the\spacedim){\ifsol#2\fi};
\end{tikzpicture}%
\else% if lined open question
\begin{tikzpicture}%
- \pgfmathparse{int(\openquestionheight/\spacedim)}%
+ \pgfmathparse{int(\openquestionheight/\the\spacedim)}%
\foreach \y in {1, ..., \pgfmathresult}%
- \draw[\openquestionlinecolor] (0, -\y*\spacedim) -- +(\openquestionwidth,0);%
+ \draw[\openquestionlinecolor] (0, -\y*\the\spacedim) -- +(\openquestionwidth,0);%
\node[%
anchor=base west,align=left,%
text width=\openquestionwidth,%
inner sep=0cm, font=\solutionfont,%
- execute at begin node=\setlength{\baselineskip}{\spacedim}]%
- at (0, -\spacedim){\ifsol#2\fi};%
+ execute at begin node=\setlength{\baselineskip}{\the\spacedim}]%
+ at (0, -\the\spacedim){\ifsol#2\fi};%
\end{tikzpicture}%
\fi%
+ \end{center}%
}
% \end{macrocode}
%\end{macro}
diff --git a/Master/texmf-dist/tex/latex/verifiche/verifiche.sty b/Master/texmf-dist/tex/latex/verifiche/verifiche.sty
index 75dc2b2119a..6e45570d9f0 100644
--- a/Master/texmf-dist/tex/latex/verifiche/verifiche.sty
+++ b/Master/texmf-dist/tex/latex/verifiche/verifiche.sty
@@ -15,7 +15,7 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{verifiche} [2022/03/10 v5.0 .dtx verifiche file]
+\ProvidesPackage{verifiche} [2022/06/16 v5.1 .dtx verifiche file]
\RequirePackage{xparse}
\RequirePackage{xkeyval}
\RequirePackage{amsmath}
@@ -45,6 +45,7 @@
\newif\ifsolutionscolor\solutionscolorfalse
\newif\ifcandidatename\candidatenametrue
\newif\iftesttype\testtypetrue
+\newif\ifshowinstructiondelimiter\showinstructiondelimiterfalse
\newif\ifprintedheading\printedheadingfalse
\newif\ifexercisesnumbered\exercisesnumberedtrue
\newif\ifshowmarginexercise\showmarginexercisefalse
@@ -79,6 +80,9 @@
\setlength{\classrulerlength}{.1\textwidth}
\setlength{\daterulerlength}{.15\textwidth}
\setlength{\ptrulerlength}{1cm}
+\newlength{\verifiche@remainingvspace}
+\newlength{\verifiche@remaininghspace}
+\newlength{\spacedim}
\setlength{\columnseparation}{\fill}
%%labels
\newcommand{\@verifiche@durationlabeldefault}{Time:}%
@@ -120,11 +124,13 @@
\newcommand{\institute}[1]{%
\gdef\@institute{#1}}
\newcommand{\duration}[2][\@durationlabeldefault]{%
- \gdef\@durationpreamble{#1}\gdef\@duration{#2}}
+ \gdef\@durationpreamble{#1}\gdef\@duration{#2}%
+ \showinstructiondelimitertrue}%
\newcommand{\testtype}[1]{%
\gdef\@testtype{#1}}
\newcommand{\instruction}[1]{%
- \gdef\@instruction{#1}}
+ \gdef\@instruction{#1}%
+ \showinstructiondelimitertrue}
\newcommand{\asyear}[2][\@asyearlabeldefault]{%
\gdef\@asyearpreamble{#1}\gdef\@asyear{#2}}
%%fonts and aspects
@@ -133,15 +139,15 @@
\newcommand{\institutefont}[1]{%
\large \sffamily\color{darkgray}#1}
\newcommand{\asyearfont}[1]{%
- \hspace*{\fill} #1\hspace*{\fill}\\[.5em]}
+ \hspace*{\fill} #1\hspace*{\fill}}
\newcommand{\testtypefont}[1]{%
- \hspace*{\fill}\scshape\huge#1\hspace*{\fill}}
+ \bgroup\hspace*{\fill}\scshape\huge#1\hspace*{\fill}\egroup}
\newcommand{\instructiondelimiter}{%
- \rule{\textwidth}{.5pt}}
+ \hrulefill}
\newcommand{\instrunctionfont}[1]{%
\sffamily#1}
\newcommand{\durationfont}[1]{%
- \hspace*{\fill}\@durationpreamble\space\bfseries #1\hspace*{\fill}}
+ \bgroup\hspace*{\fill}\@durationpreamble\space\bfseries #1\hspace*{\fill}\egroup}
\newcommand{\@header@candidatename}{%
\noindent\headercandidatenamelabel%
\space\underline{\hspace{\candidatenamerulerlength}}}
@@ -221,6 +227,17 @@
\ltx@zero
#2}
\chardef\ltx@zero=0%
+%% init vertical/horizontal remaining space
+\newcommand{\verifiche@initremainingvspace}{%
+ \pgfmathsetlength{\verifiche@remainingvspace}{%
+ floor((\dimexpr\pagegoal-\pagetotal-.5\baselineskip\relax)/\spacedim)*\spacedim%
+ }%
+}%
+\newcommand{\verifiche@initremaininghspace}{%
+\pgfmathsetlength{\verifiche@remaininghspace}{%
+ floor(\linewidth/\spacedim)*\spacedim%
+}%
+}%
%%pagestyles
\newcommand{\ps@mainverifiche}{%
@@ -234,11 +251,13 @@
%%print headings
\newcommand{\printheading}{%
{\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{plain}\fi}%
- {\ifcandidatename\@header\\[1em]\fi}%
- {\ifdefined\@asyear\ifasyear \asyearfont{\@asyearpreamble\space\@asyear}\fi\fi}%
- {\ifdefined\@testtype\iftesttype\testtypefont{\@testtype}\fi\fi}\\%
- {\ifdefined\@instruction\ifinstruction\instructiondelimiter\\{\instrunctionfont{\@instruction}}\\%
- \ifdefined\@duration\ifduration{\durationfont\@duration\\}\fi\fi\instructiondelimiter\fi\fi}%
+ {\ifcandidatename\@header\par\vspace{\baselineskip}\fi}%
+ {\ifdefined\@asyear\ifasyear\asyearfont{\@asyearpreamble\space\@asyear}\par\vspace{\baselineskip}\fi\fi}%
+ {\ifdefined\@testtype\iftesttype\testtypefont{\@testtype}\par\fi\fi}%
+ {\ifshowinstructiondelimiter\instructiondelimiter\par\fi}%
+ {\ifdefined\@instruction\ifinstruction\instrunctionfont{\@instruction}}\par\fi\fi%
+ {\ifdefined\@duration\ifduration\durationfont\@duration\par\fi\fi}%
+ {\ifshowinstructiondelimiter\instructiondelimiter\par\fi}%
}
%%ambiente esercizio
@@ -407,11 +426,11 @@
\end{crocette*}%
}%
-\define@key{openquestion}{width}[\linewidth]{\def\openquestionwidth{#1}}
-\define@key{openquestion}{height}[19cm]{\def\openquestionheight{#1}}
-\define@key{openquestion}{spacedim}[0.5cm]{\def\spacedim{#1}}
-\define@key{openquestion}{linecolor}[gray]{\def\openquestionlinecolor{#1}}
-\define@choicekey*+{openquestion}{type}[\val\nr]{lines, squares}[lines]{%
+\define@key{openquestion}{spacedim}[0.5cm]{\setlength{\spacedim}{#1}\verifiche@initremainingvspace\verifiche@initremaininghspace}%
+\define@key{openquestion}{height}[\the\verifiche@remainingvspace]{\def\openquestionheight{#1}}%
+\define@key{openquestion}{width}[\the\verifiche@remaininghspace]{\def\openquestionwidth{#1}}%
+\define@key{openquestion}{linecolor}[gray]{\def\openquestionlinecolor{#1}}%
+\define@choicekey*+{openquestion}{type}[\val\nr]{lines, squares}[squares]{%
\ifcase\nr\relax%
% lines
\openquestionsquaredfalse\openquestionlinestrue%
@@ -421,33 +440,36 @@
\fi}%
{\PackageError{verifiche}{Errore nell'opzione openquestion}{Inserire lines o squares}}
\NewDocumentCommand{\openquestion}{o m}{%
- \setkeys{openquestion}{type, width, height, linecolor, spacedim} %init
+ \setkeys{openquestion}{type, spacedim, width, height, linecolor} %init
\IfValueT{#1}{\setkeys{openquestion}{#1}}%
- \ifopenquestionsquared% if squared open question
+ \vspace{-\baselineskip}%
+\begin{center}
+\ifopenquestionsquared% if squared open question
\begin{tikzpicture}%
- \draw[step=\spacedim, \openquestionlinecolor]%
+ \draw[step=\the\spacedim, \openquestionlinecolor]%
(0,0) grid (\openquestionwidth,-\openquestionheight);%
\node[%
anchor=base west,%
align=left, text width=\openquestionwidth,%
inner sep=0cm,%
font=\solutionfont,%
- execute at begin node=\setlength{\baselineskip}{\spacedim}]%
- at (0, -\spacedim){\ifsol#2\fi};
+ execute at begin node=\setlength{\baselineskip}{\the\spacedim}]%
+ at (0, -\the\spacedim){\ifsol#2\fi};
\end{tikzpicture}%
\else% if lined open question
\begin{tikzpicture}%
- \pgfmathparse{int(\openquestionheight/\spacedim)}%
+ \pgfmathparse{int(\openquestionheight/\the\spacedim)}%
\foreach \y in {1, ..., \pgfmathresult}%
- \draw[\openquestionlinecolor] (0, -\y*\spacedim) -- +(\openquestionwidth,0);%
+ \draw[\openquestionlinecolor] (0, -\y*\the\spacedim) -- +(\openquestionwidth,0);%
\node[%
anchor=base west,align=left,%
text width=\openquestionwidth,%
inner sep=0cm, font=\solutionfont,%
- execute at begin node=\setlength{\baselineskip}{\spacedim}]%
- at (0, -\spacedim){\ifsol#2\fi};%
+ execute at begin node=\setlength{\baselineskip}{\the\spacedim}]%
+ at (0, -\the\spacedim){\ifsol#2\fi};%
\end{tikzpicture}%
\fi%
+ \end{center}%
}
\NewDocumentCommand{\textandimage}{O{.7\textwidth} O{.3\textwidth} m m}{%
\begin{minipage}{#1}