From b8c13ba6c360bd132dc4693ce4ecd8b95fe3115a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 11 Mar 2022 22:02:15 +0000 Subject: verifiche (11mar22) git-svn-id: svn://tug.org/texlive/trunk@62634 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/verifiche/verifiche-example.pdf | Bin 175815 -> 190102 bytes .../texmf-dist/doc/latex/verifiche/verifiche.pdf | Bin 523647 -> 551397 bytes .../source/latex/verifiche/verifiche.dtx | 120 +++++++++++++-------- .../texmf-dist/tex/latex/verifiche/verifiche.sty | 109 ++++++++++++------- 4 files changed, 146 insertions(+), 83 deletions(-) diff --git a/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf b/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf index 8200bf65e71..72d381a5b3e 100644 Binary files a/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf and b/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf differ diff --git a/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf b/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf index 78fa0d6757c..584d9276edc 100644 Binary files a/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf and b/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf differ diff --git a/Master/texmf-dist/source/latex/verifiche/verifiche.dtx b/Master/texmf-dist/source/latex/verifiche/verifiche.dtx index a17c5361433..4172a0771ff 100644 --- a/Master/texmf-dist/source/latex/verifiche/verifiche.dtx +++ b/Master/texmf-dist/source/latex/verifiche/verifiche.dtx @@ -16,7 +16,7 @@ % % \iffalse %\NeedsTeXFormat{LaTeX2e} -%\ProvidesPackage{verifiche} [2022/02/10 v4.3 .dtx verifiche file] +%\ProvidesPackage{verifiche} [2022/03/10 v4.4 .dtx verifiche file] %<*driver> \documentclass{ltxdoc} \usepackage[utf8]{inputenc} @@ -66,7 +66,7 @@ % % \fi % -% \CheckSum{801} +% \CheckSum{820} % \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.} @@ -76,6 +76,7 @@ % \changes{v4.1}{2021/02/16}{Introduce ptrulerlength to change the aspect of the exercise score.} % \changes{v4.2}{2021/08/18}{Solved truefalse issue in solutionsmode. Add noexercisept global option to hide the score of each exercise.} % \changes{v4.3}{2022/02/10}{Move |parindent{0pt}| inside the environment.} +% \changes{v4.4}{2022/03/10}{Minor update. Fixed labels issues.} % \GetFileInfo{verifiche.sty} % \DoNotIndex{\newcommand,\newenvironment,\def,\begin,\end,\par} % \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions,\RequirePackage} @@ -1067,40 +1068,50 @@ dell'esercizio somministrato % \end{macrocode} % %\subsection{Labels} +%\iffalse +%%labels +%\fi %Some labels are define as a variable in order to leave the user the possibility of customization the predefine texts. -% \begin{macrocode} -\newcommand{\@durationlabeldefault}{Time:}% -\newcommand{\@asyearlabeldefault}{School year}% -\newcommand{\headercandidatenamelabel}{Student name}% -\newcommand{\headerclasslabel}{Class}% -\newcommand{\headerdatelabel}{Date}% -\newcommand{\exerciselabel}{Exercise}% -\newcommand{\solutionlabel}{Solution}% -% \end{macrocode} %If the package \textsf{babel} or \textsf{polyglossia} is loaded with the italian language specify, than the predefine labels are redefine: % \begin{macrocode} \@ifpackageloaded{babel}{% \addto\captionsitalian{% - \renewcommand{\@durationlabeldefault}{Tempo della prova:}% - \renewcommand{\@asyearlabeldefault}{Anno scolastico}% - \renewcommand{\headercandidatenamelabel}{Nome e Cognome}% - \renewcommand{\headerclasslabel}{Classe}% - \renewcommand{\headerdatelabel}{Data}% - \renewcommand{\exerciselabel}{Quesito}% - \renewcommand{\solutionlabel}{Soluzione}% + \def\@verifiche@durationlabeldefault{Tempo della prova:}% + \def\@verifiche@asyearlabeldefault{Anno scolastico}% + \def\@verifiche@headercandidatenamelabel{Nome e Cognome}% + \def\@verifiche@headerclasslabel{Classe}% + \def\@verifichhe@headerdatelabel{Data}% + \def\@verifiche@exerciselabel{Quesito}% + \def\@verifiche@solutionlabel{Soluzione}% }}{% \@ifpackageloaded{polyglossia}{% \addto\captionsitalian{% - \renewcommand{\@durationlabeldefault}{Tempo della prova:}% - \renewcommand{\@asyearlabeldefault}{Anno scolastico}% - \renewcommand{\headercandidatenamelabel}{Nome e Cognome}% - \renewcommand{\headerclasslabel}{Classe}% - \renewcommand{\headerdatelabel}{Data}% - \renewcommand{\exerciselabel}{Quesito}% - \renewcommand{\solutionlabel}{Soluzione}% - }}{} - }% + \def\@verifiche@durationlabeldefault{Tempo della prova:}% + \def\@verifiche@asyearlabeldefault{Anno scolastico}% + \def\@verifiche@headercandidatenamelabel{Nome e Cognome}% + \def\@verifiche@headerclasslabel{Classe}% + \def\@verifichhe@headerdatelabel{Data}% + \def\@verifiche@exerciselabel{Quesito}% + \def\@verifiche@solutionlabel{Soluzione}% + }}{ + \def\@verifiche@durationlabeldefault{Time:}% + \def\@verifiche@asyearlabeldefault{School year}% + \def\@verifiche@headercandidatenamelabel{Name and Surname}% + \def\@verifiche@headerclasslabel{Class}% + \def\@verifichhe@headerdatelabel{Date}% + \def\@verifiche@exerciselabel{Exercise}% + \def\@verifiche@solutionlabel{Solution}% + }}% % \end{macrocode} +% \begin{macrocode} +\newcommand{\@durationlabeldefault}{\@verifiche@durationlabeldefault}% +\newcommand{\@asyearlabeldefault}{\@verifiche@asyearlabeldefault}% +\newcommand{\headercandidatenamelabel}{\@verifiche@headercandidatenamelabel}% +\newcommand{\headerclasslabel}{\@verifiche@headerclasslabel}% +\newcommand{\headerdatelabel}{\@verifichhe@headerdatelabel}% +\newcommand{\exerciselabel}{\@verifiche@exerciselabel}% +\newcommand{\solutionlabel}{\@verifiche@solutionlabel}% +% \end{macrocode} %\subsection{Macro and environment} %\iffalse %%macro and environment @@ -1156,18 +1167,23 @@ dell'esercizio somministrato \hspace*{\fill}\@durationpreamble\space\bfseries #1\hspace*{\fill}} % \end{macrocode} % \begin{macrocode} -\newcommand{\@header@candidatename}{\noindent\headercandidatenamelabel\space\underline{\hspace{\candidatenamerulerlength}}} -\newcommand{\@header@class}{\headerclasslabel\space\underline{\hspace{\classrulerlength}}} -\newcommand{\@header@date}{\headerdatelabel\space\underline{\hspace{\daterulerlength}}} -\newcommand{\@header}{\@header@candidatename\hfill\@header@class\hfill\@header@date} -% \end{macrocode} -% \begin{macrocode} -\newcommand{\eserciziolabel}{% - Quesito} +\newcommand{\@header@candidatename}{% + \noindent\headercandidatenamelabel% + \space\underline{\hspace{\candidatenamerulerlength}}} +\newcommand{\@header@class}{% + \headerclasslabel\space% + \underline{\hspace{\classrulerlength}}} +\newcommand{\@header@date}{% + \headerdatelabel\space% + \underline{\hspace{\daterulerlength}}} +\newcommand{\@header}{% + \@header@candidatename\hfill\@header@class\hfill\@header@date} % \end{macrocode} % \begin{macrocode} \newcommand{\solutionfont}{% - \footnotesize\ifsolutionscolor\color{\solutionscolor}\fi\itshape} + \footnotesize% + \ifsolutionscolor\color{\solutionscolor}\fi% + \itshape} % \end{macrocode} % \begin{macrocode} \newcommand{\diffsymb}{% @@ -1181,7 +1197,8 @@ dell'esercizio somministrato %%pt prefix %\fi % \begin{macrocode} -\newcommand{\@ptprefix}{\underline{\hspace{\ptrulerlength}}/} +\newcommand{\@ptprefix}{% + \underline{\hspace{\ptrulerlength}}/} \newcommand{\ptprefix}[1]{% \renewcommand{\@ptprefix}{#1}} % \end{macrocode} @@ -1307,13 +1324,19 @@ dell'esercizio somministrato \define@key{esercizio}{pt}[none]{ \ifshowexercisept% \def\pointes{#1}% - \def\espoint{\hfill\@ptprefix\@lpt@delimiter\pointes\space\@useptlabel{\pointes}\@rpt@delimiter} + \def\espoint{% + \hfill\@ptprefix\@lpt@delimiter% + \pointes\space\@useptlabel{\pointes}% + \@rpt@delimiter} \showmarginexercisetrue \fi}% \define@key{esercizio}{partialpt}[none]{% \ifshowexercisept% \def\@totalpartialpt{\convertreftonum{ptes@\theexercisenumber}}% - \def\sumpartialpt{\@ptprefix\@lpt@delimiter\@totalpartialpt\space\@useptlabel{\@totalpartialpt}\@rpt@delimiter}% + \def\sumpartialpt{% + \@ptprefix\@lpt@delimiter% + \@totalpartialpt\space\@useptlabel{\@totalpartialpt}% + \@rpt@delimiter}% \showmarginexercisetrue \fi}% % \end{macrocode} @@ -1402,7 +1425,9 @@ dell'esercizio somministrato \NewDocumentCommand{\partialpt}{m}{% \ifshowexercisept% \leavevmode\reversemarginpar\marginpar{% - \hfill\@partialptprefix\@lpartialpt@delimiter#1\space\@usepartialptlabel{#1}\@rpartialpt@delimiter% + \hfill\@partialptprefix% + \@lpartialpt@delimiter#1\space\@usepartialptlabel{#1}% + \@rpartialpt@delimiter% \addtocounter{partialpoints}{#1}}% \fi}% % \end{macrocode} @@ -1537,8 +1562,12 @@ dell'esercizio somministrato \begin{tikzpicture}% \draw[step=\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}]% + \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}; \end{tikzpicture}% \else% if lined open question @@ -1546,8 +1575,11 @@ dell'esercizio somministrato \pgfmathparse{int(\openquestionheight/\spacedim)}% \foreach \y in {1, ..., \pgfmathresult}% \draw[\openquestionlinecolor] (0, -\y*\spacedim) -- +(\openquestionwidth,0);% - \node[anchor=base west,align=left, text width=\openquestionwidth,% - inner sep=0cm, font=\solutionfont, execute at begin node=\setlength{\baselineskip}{\spacedim}]% + \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};% \end{tikzpicture}% \fi% diff --git a/Master/texmf-dist/tex/latex/verifiche/verifiche.sty b/Master/texmf-dist/tex/latex/verifiche/verifiche.sty index dd6f1d5212a..d9de04d0226 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/02/10 v4.3 .dtx verifiche file] +\ProvidesPackage{verifiche} [2022/03/10 v4.4 .dtx verifiche file] \RequirePackage{xparse} \RequirePackage{xkeyval} \RequirePackage{amsmath} @@ -79,34 +79,42 @@ \setlength{\classrulerlength}{.1\textwidth} \setlength{\daterulerlength}{.15\textwidth} \setlength{\ptrulerlength}{1cm} -\newcommand{\@durationlabeldefault}{Time:}% -\newcommand{\@asyearlabeldefault}{School year}% -\newcommand{\headercandidatenamelabel}{Student name}% -\newcommand{\headerclasslabel}{Class}% -\newcommand{\headerdatelabel}{Date}% -\newcommand{\exerciselabel}{Exercise}% -\newcommand{\solutionlabel}{Solution}% +%%labels \@ifpackageloaded{babel}{% \addto\captionsitalian{% - \renewcommand{\@durationlabeldefault}{Tempo della prova:}% - \renewcommand{\@asyearlabeldefault}{Anno scolastico}% - \renewcommand{\headercandidatenamelabel}{Nome e Cognome}% - \renewcommand{\headerclasslabel}{Classe}% - \renewcommand{\headerdatelabel}{Data}% - \renewcommand{\exerciselabel}{Quesito}% - \renewcommand{\solutionlabel}{Soluzione}% + \def\@verifiche@durationlabeldefault{Tempo della prova:}% + \def\@verifiche@asyearlabeldefault{Anno scolastico}% + \def\@verifiche@headercandidatenamelabel{Nome e Cognome}% + \def\@verifiche@headerclasslabel{Classe}% + \def\@verifichhe@headerdatelabel{Data}% + \def\@verifiche@exerciselabel{Quesito}% + \def\@verifiche@solutionlabel{Soluzione}% }}{% \@ifpackageloaded{polyglossia}{% \addto\captionsitalian{% - \renewcommand{\@durationlabeldefault}{Tempo della prova:}% - \renewcommand{\@asyearlabeldefault}{Anno scolastico}% - \renewcommand{\headercandidatenamelabel}{Nome e Cognome}% - \renewcommand{\headerclasslabel}{Classe}% - \renewcommand{\headerdatelabel}{Data}% - \renewcommand{\exerciselabel}{Quesito}% - \renewcommand{\solutionlabel}{Soluzione}% - }}{} - }% + \def\@verifiche@durationlabeldefault{Tempo della prova:}% + \def\@verifiche@asyearlabeldefault{Anno scolastico}% + \def\@verifiche@headercandidatenamelabel{Nome e Cognome}% + \def\@verifiche@headerclasslabel{Classe}% + \def\@verifichhe@headerdatelabel{Data}% + \def\@verifiche@exerciselabel{Quesito}% + \def\@verifiche@solutionlabel{Soluzione}% + }}{ + \def\@verifiche@durationlabeldefault{Time:}% + \def\@verifiche@asyearlabeldefault{School year}% + \def\@verifiche@headercandidatenamelabel{Name and Surname}% + \def\@verifiche@headerclasslabel{Class}% + \def\@verifichhe@headerdatelabel{Date}% + \def\@verifiche@exerciselabel{Exercise}% + \def\@verifiche@solutionlabel{Solution}% + }}% +\newcommand{\@durationlabeldefault}{\@verifiche@durationlabeldefault}% +\newcommand{\@asyearlabeldefault}{\@verifiche@asyearlabeldefault}% +\newcommand{\headercandidatenamelabel}{\@verifiche@headercandidatenamelabel}% +\newcommand{\headerclasslabel}{\@verifiche@headerclasslabel}% +\newcommand{\headerdatelabel}{\@verifichhe@headerdatelabel}% +\newcommand{\exerciselabel}{\@verifiche@exerciselabel}% +\newcommand{\solutionlabel}{\@verifiche@solutionlabel}% %%macro and environment %%global variable \newcommand{\institute}[1]{% @@ -134,20 +142,28 @@ \sffamily#1} \newcommand{\durationfont}[1]{% \hspace*{\fill}\@durationpreamble\space\bfseries #1\hspace*{\fill}} -\newcommand{\@header@candidatename}{\noindent\headercandidatenamelabel\space\underline{\hspace{\candidatenamerulerlength}}} -\newcommand{\@header@class}{\headerclasslabel\space\underline{\hspace{\classrulerlength}}} -\newcommand{\@header@date}{\headerdatelabel\space\underline{\hspace{\daterulerlength}}} -\newcommand{\@header}{\@header@candidatename\hfill\@header@class\hfill\@header@date} -\newcommand{\eserciziolabel}{% - Quesito} +\newcommand{\@header@candidatename}{% + \noindent\headercandidatenamelabel% + \space\underline{\hspace{\candidatenamerulerlength}}} +\newcommand{\@header@class}{% + \headerclasslabel\space% + \underline{\hspace{\classrulerlength}}} +\newcommand{\@header@date}{% + \headerdatelabel\space% + \underline{\hspace{\daterulerlength}}} +\newcommand{\@header}{% + \@header@candidatename\hfill\@header@class\hfill\@header@date} \newcommand{\solutionfont}{% - \footnotesize\ifsolutionscolor\color{\solutionscolor}\fi\itshape} + \footnotesize% + \ifsolutionscolor\color{\solutionscolor}\fi% + \itshape} \newcommand{\diffsymb}{% $\bigstar$} \newcommand{\closedquestionitem}{% $\square$} %%pt prefix -\newcommand{\@ptprefix}{\underline{\hspace{\ptrulerlength}}/} +\newcommand{\@ptprefix}{% + \underline{\hspace{\ptrulerlength}}/} \newcommand{\ptprefix}[1]{% \renewcommand{\@ptprefix}{#1}} %%partialpt prefix @@ -231,13 +247,19 @@ \define@key{esercizio}{pt}[none]{ \ifshowexercisept% \def\pointes{#1}% - \def\espoint{\hfill\@ptprefix\@lpt@delimiter\pointes\space\@useptlabel{\pointes}\@rpt@delimiter} + \def\espoint{% + \hfill\@ptprefix\@lpt@delimiter% + \pointes\space\@useptlabel{\pointes}% + \@rpt@delimiter} \showmarginexercisetrue \fi}% \define@key{esercizio}{partialpt}[none]{% \ifshowexercisept% \def\@totalpartialpt{\convertreftonum{ptes@\theexercisenumber}}% - \def\sumpartialpt{\@ptprefix\@lpt@delimiter\@totalpartialpt\space\@useptlabel{\@totalpartialpt}\@rpt@delimiter}% + \def\sumpartialpt{% + \@ptprefix\@lpt@delimiter% + \@totalpartialpt\space\@useptlabel{\@totalpartialpt}% + \@rpt@delimiter}% \showmarginexercisetrue \fi}% \newcommand{\exercisetitle}{% @@ -293,7 +315,9 @@ \NewDocumentCommand{\partialpt}{m}{% \ifshowexercisept% \leavevmode\reversemarginpar\marginpar{% - \hfill\@partialptprefix\@lpartialpt@delimiter#1\space\@usepartialptlabel{#1}\@rpartialpt@delimiter% + \hfill\@partialptprefix% + \@lpartialpt@delimiter#1\space\@usepartialptlabel{#1}% + \@rpartialpt@delimiter% \addtocounter{partialpoints}{#1}}% \fi}% \NewDocumentEnvironment{soluzione}{+b}{% @@ -379,8 +403,12 @@ \begin{tikzpicture}% \draw[step=\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}]% + \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}; \end{tikzpicture}% \else% if lined open question @@ -388,8 +416,11 @@ \pgfmathparse{int(\openquestionheight/\spacedim)}% \foreach \y in {1, ..., \pgfmathresult}% \draw[\openquestionlinecolor] (0, -\y*\spacedim) -- +(\openquestionwidth,0);% - \node[anchor=base west,align=left, text width=\openquestionwidth,% - inner sep=0cm, font=\solutionfont, execute at begin node=\setlength{\baselineskip}{\spacedim}]% + \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};% \end{tikzpicture}% \fi% -- cgit v1.2.3