texlive[68023] Master/texmf-dist: verifiche (23aug23)

commits+karl at tug.org commits+karl at tug.org
Wed Aug 23 00:46:39 CEST 2023


Revision: 68023
          http://tug.org/svn/texlive?view=revision&revision=68023
Author:   karl
Date:     2023-08-23 00:46:39 +0200 (Wed, 23 Aug 2023)
Log Message:
-----------
verifiche (23aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/verifiche/verifiche-example.pdf
    trunk/Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex
    trunk/Master/texmf-dist/doc/latex/verifiche/verifiche.pdf
    trunk/Master/texmf-dist/source/latex/verifiche/verifiche.dtx
    trunk/Master/texmf-dist/source/latex/verifiche/verifiche.ins
    trunk/Master/texmf-dist/tex/latex/verifiche/verifiche.sty

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

Modified: trunk/Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex	2023-08-22 22:46:29 UTC (rev 68022)
+++ trunk/Master/texmf-dist/doc/latex/verifiche/verifiche-example.tex	2023-08-22 22:46:39 UTC (rev 68023)
@@ -7,6 +7,7 @@
 		    ]{verifiche}
 \usepackage[margin=3cm]{geometry}
 \usepackage{lipsum}
+\usepackage{siunitx}
 
 
 \begin{document}
@@ -271,7 +272,7 @@
 
 \begin{multitest}[4]
 %\pgfmathsetseed{\themultitestcounter*42}
-%\subtitle{Test \Alph{multitestcounter}}
+\subtitle{Test \Alph{multitestcounter}}
 \printheading
 \pgfmathrandominteger{\ax}{-2}{2}
 \pgfmathrandominteger{\ay}{-2}{2}

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

Modified: trunk/Master/texmf-dist/source/latex/verifiche/verifiche.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/verifiche/verifiche.dtx	2023-08-22 22:46:29 UTC (rev 68022)
+++ trunk/Master/texmf-dist/source/latex/verifiche/verifiche.dtx	2023-08-22 22:46:39 UTC (rev 68023)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-%  Copyright (LPPL) 2020 - 2022 by Francesco Raccanello
+%  Copyright (LPPL) 2020 - 2023 by Francesco Raccanello
 %
 % This file may be distributed and/or modified under the 
 % conditions of the LaTeX Project Public License, either
@@ -16,7 +16,7 @@
 %
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{verifiche} [2022/09/17 v6.0 .dtx verifiche file]
+%<package>\ProvidesPackage{verifiche} [2023/08/22 v7.0 .dtx verifiche file]
 %<*driver>
 \documentclass{ltxdoc}
 \usepackage[utf8]{inputenc}
@@ -32,7 +32,7 @@
 				 \inlinesol, \completetext, \truefalse, \openquestion, \linedopenquestion, \squaredopenquestion, 
 				 \headercandidatenamelabel, \checked, \finderror, \textandimage, \partialpt, \ptprefix, \ptlabel, 
 				 \partialptlabel, \partialptdelimiters, \ptdelimiters, \partialptprefix, \checkmaker, \ref, \tikz, \makecolumn,
-				 \columnseparation, \subtitle, \subtitlefont},
+				 \columnseparation, \subtitle, \subtitlefont, \ptfont, \defineheadingstyle, \headingstyle},
 	keywordstyle=\color{blue},
 	escapeinside={*@}{@*},
 	inputencoding=utf8,
@@ -71,7 +71,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{997}
+% \CheckSum{1210}
 % \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.}
@@ -85,6 +85,7 @@
 % \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.}
 % \changes{v5.2}{2022/06/21}{Minor update. Resolve bugs in printheading command.}
+% \changes{v7.0}{2023/08/22}{Major update. Remove some unnecessary packages. Add ptfont command to manage points font. Modify environments to avoid page break after the name of the environment. Adding the possibility to define own heading aspect. Define three types of headings: galilei, einstein and cattaneo.}
 % \GetFileInfo{verifiche.sty}
 % \DoNotIndex{\newcommand,\newenvironment,\def,\begin,\end,\par}
 % \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions,\RequirePackage}
@@ -156,14 +157,14 @@
 %
 %Per quanto riguarda le soluzioni, ogni elemento di test presenta la possibilità di mostrare la soluzione corretta, qualora venga venga inserita una specifica opzione del pacchetto che attivi la così detta  in "modalità \texttt{solutions}" indicata nel seguito anche con "modalità soluzioni".
 %
-%Infine, il codice carica alcuni pacchetti necessari per la gestioni dei comandi implementati, ma anche
-% per rendere fruibili da subito comandi utili soprattutto per la gestione della matematica, le unità di misura,
-% e la parte grafica. Nel seguito si riportano i pacchetti principali:
+%Infine, il codice carica alcuni pacchetti necessari per la gestioni dei comandi implementati.
 %\begin{itemize}
+%\item |xparse| e  |xkeyval| per la gestione dei comandi e degli ambienti del pacchetto;
 %\item |enumitem| per la gestione avanzata degli elenchi puntati e numerati (sono attivate le opzioni |shortlabels| e |inline|
-%\item  |amsmath|, |amssymb| per la gestione della matematica;
-%\item |siunitx| per la gestione delle unità di misura;
-%\item |graphicx|, |xcolor| e |tikz| per la gestione grafica;
+%\item |pgffor| e per la gestione dei cicli for;
+%\item |amssymb| per la gestione dei simboli matematici;
+%\item |tikz| per la gestione di alcuni aspetti grafici avanzati;
+%\item |ulem| per la gestione della formattazione avanzata del testo.
 %\end{itemize}
 %
 %\section{Come usare il pacchetto \textsf{verifiche} e le sue opzioni}
@@ -307,6 +308,19 @@
 %\end{tabular}
 %\end{center}
 %
+%\subsection*{Stili di intestazione}
+% Il pacchetto definisce tre tipi di intestazioni, la prima (di default) è definita |galilei| stampa, in sequenza, l'intestazione per il nome del candidato, la classe e la data, l'anno scolastico, il tipo di test, l'eventuale sottotitolo e le istruzioni col tempo della prova. La seconda versione, analoga alla prima, è detta |cattaneo|. La terza, nominata |einstein|, pone su due colonne le informazioni del candidato ed il tipo di prova. Il tipo di intestazione può essere variata tramite il comando:
+%\iffalse
+%<*example>
+%\fi
+\begin{lstlisting}
+\headingstyle{einstein}
+\end{lstlisting}
+%\iffalse
+%</example>
+%\fi
+%Il pacchetto permette di definire nuovi stili di intestazione tramite il comando |\defineheadingstyle| (si veda \pageref{par:headingstyle}).
+
 %\subsection*{Stili di pagina}
 % Il pacchetto definisce due stili di pagina \emph{ad hoc}: |mainverifiche| e |verifiche|. Il primo è evocato quando si definisce il comando |\institute| e stampa sulla prima pagina l'argomento di questo comando. \DescribeMacro{verifiche}Il secondo, invece, può essere utilizzato dall'utente tramite il comando:
 %\iffalse
@@ -343,7 +357,7 @@
 %\begin{center}
 %\begin{tabular}{ll}
 %|label|=\meta{label}	&	 definisce il titolo del quesito\\
-%|diff|=\meta{number}	&	 definisce la difficoltà sotto forma di stelle\\
+%|diff|=\meta{number}	&	 definisce la difficoltà sotto forma di punti\\
 %|pt|=\meta{number}	&	 definisce il punteggio della prova\\
 %|partialpt|			&	 somma in automatico i punteggi parziali\\
 %\end{tabular}
@@ -393,7 +407,7 @@
 che voglio somministrare
 \end{esercizio}}
 {\begin{minipage}{.2\linewidth}
-\hfill$\bigstar\bigstar$
+\hfill$\bullet\bullet$
 \end{minipage}
 \raisebox{-1.3\baselineskip}{
 \begin{minipage}{.7\linewidth}
@@ -437,7 +451,7 @@
 che voglio somministrare
 \end{esercizio}}
 {\begin{minipage}{.4\linewidth}
-\hfill$\bigstar\bigstar$\newline
+\hfill$\bullet\bullet$\newline
 \underline{\phantom{1cm}}/ 2 pt
 \end{minipage}
 \raisebox{-1.3\baselineskip}{
@@ -631,7 +645,7 @@
 % \iffalse
 %</example>
 % \fi
-%che produce uno spazio vuoto largo \meta{dim} (che di default è di \SI{4.5}{cm}) e che in modalità "soluzioni" riproduce il \meta{testo}.
+%che produce uno spazio vuoto largo \meta{dim} (che di default è di 4.5 cm) e che in modalità "soluzioni" riproduce il \meta{testo}.
 %
 % \iffalse
 %<*example>
@@ -929,6 +943,17 @@
 %</example>
 %\fi
 %
+%\DescribeMacro{\ptfont} Il font dei punteggi è controllato del comando |\ptfont|. Per modificare l'aspetto di questo elemento è necessario ridefinire il comando.
+%\iffalse
+%<*example>
+%\fi
+\begin{lstlisting}
+\renewcommand{\ptfont}*@\marg{...}@*
+\end{lstlisting}
+%\iffalse
+%</example>
+%\fi
+%
 %\DescribeMacro{\solutionfont}Le soluzioni degli esercizi vengono stampate, quando viene esplicitata l'opzione |solutions| quando viene caricato il pacchetto, con un font più piccolo e in corsivo. Per modificare il font delle soluzioni è sufficiente ridefinire il comando |\solutionfont|:
 %\iffalse
 %<*example>
@@ -975,6 +1000,29 @@
 %\fi
 %Attraverso questi comandi è possibile anche rimuovere una (o più) delle tre voci. Se ad esempio non si vuole visualizzare la classe d'appartenenza del candidato, sarà sufficiente ridefinire gli opportuni comandi nel seguente modo: |\renewcommand{\headerclasslabel}{}|, così da non visualizzare alcuna scritta, e |\setlength{\classrulerlength}{0pt}| per rimuovere la riga associata.
 %
+% \bigskip Il pacchetto permette\label{par:headingstyle} di definire nuovi modi di visualizzare l'intestazione (oltre a quelle predefinite |galilei|, |einstein| e |cattaneo|) tramite il comando:
+%\iffalse
+%<*example>
+%\fi
+\begin{lstlisting}
+\defineheadingstyle*@\marg{nome dello stile}\marg{\dots}@*
+\end{lstlisting}
+%\iffalse
+%</example>
+%\fi
+% Il secondo argomento obbligatorio raccoglie le istruzioni per comporre tutta l'intestazione, compreso anche lo stile di pagina.
+% Lo stile così definito dev'essere caricato tramite il comando
+%\iffalse
+%<*example>
+%\fi
+\begin{lstlisting}
+\headingstyle*@\marg{nome dello stile}@*
+\end{lstlisting}
+%\iffalse
+%</example>
+%\fi
+%seguito dal comando |\printheading|.
+%
 %\subsection*{Ambiente \texttt{esercizio}}
 %\DescribeMacro{\exerciselabel}Gli esercizi vengono inseriti anteponendo al loro testo la dicitura ‘‘Quesito’’ seguito (eventualmente) da un numero. Per cambiare questa dicitura, a livello globale, ovvero per ogni esercizio, è sufficiente ridefinire il comando |\exerciselabel|.
 %\iffalse
@@ -1029,7 +1077,7 @@
 %\iffalse
 %</example>
 %\fi
-%\DescribeMacro{\diffsymb}L'ambiente esercizi prevede di poter descrivere la difficoltà tramite un simbolo grafico. Di default questo è una stella ($\bigstar$), tuttavia è possibile cambiare il tipo di simbolo ridefinendo il comando |\diffsymb|:
+%\DescribeMacro{\diffsymb}L'ambiente esercizi prevede di poter descrivere la difficoltà tramite un simbolo grafico. Di default questo è punto ($\bullet$), tuttavia è possibile cambiare il tipo di simbolo ridefinendo il comando |\diffsymb|:
 %\iffalse
 %<*example>
 %\fi
@@ -1166,35 +1214,14 @@
 %    \begin{macrocode}
 \RequirePackage{xparse}
 \RequirePackage{xkeyval}	
-\RequirePackage{amsmath}
+\RequirePackage{pgffor}
 \RequirePackage{amssymb}
-\RequirePackage{pgffor}
 \RequirePackage[shortlabels, inline]{enumitem}
-\RequirePackage{siunitx}
-\RequirePackage{graphicx}
-\RequirePackage{xcolor}
 \RequirePackage{tikz}
-\RequirePackage{booktabs}
 \RequirePackage[normalem]{ulem}
 %    \end{macrocode}
 %
 %
-%\subsection{Packages and library options}
-%The package loads |tikz| and some useful library. 
-%The |siunitx| package is tuned in order to be used for the Italian math document.
-%\iffalse
-%%Forse si può cancellare questo
-%\fi
-%    \begin{macrocode}
-\usetikzlibrary{calc,shapes.geometric,patterns,positioning,angles,quotes}
-\sisetup{
-    output-decimal-marker = {,},
-    exponent-product = \cdot,
-    per-mode=symbol-or-fraction,
-    separate-uncertainty
-}
-%    \end{macrocode}
-%
 %\subsection{newif}
 %Some conditionals are defined and initiated:
 %\iffalse
@@ -1358,15 +1385,15 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand{\asyearfont}[1]{%
-    \hspace*{\fill} #1\hspace*{\fill}}
+    #1}
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand{\testtypefont}[1]{%
-    \bgroup\hspace*{\fill}\scshape\huge#1\hspace*{\fill}\egroup}
+    \bgroup\scshape\huge#1\egroup}
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand{\subtitlefont}[1]{%
-    \bgroup\hspace*{\fill}\Large\scshape#1\hspace*{\fill}\egroup}%
+    \bgroup\Large\scshape#1\egroup}%
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand{\instructiondelimiter}{%
@@ -1401,12 +1428,15 @@
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand{\diffsymb}{%
-    $\bigstar$}
+    $\bullet$}
 %    \end{macrocode}
 %    \begin{macrocode}
 \newcommand{\closedquestionitem}{%
     $\square$}
 %    \end{macrocode}
+%    \begin{macrocode}
+\newcommand{\ptfont}{\normalsize}%
+%    \end{macrocode}
 %\iffalse
 %%pt prefix
 %\fi
@@ -1541,24 +1571,101 @@
 }
 %    \end{macrocode}
 %
-%\paragraph{Print the heading}The purpose of |\printheading| macro is to typeset the headings of the page, printing the name of the institute (if included), the type of the test (if included) and so on.
+%\paragraph{Heading styles}The purpose of |\printheading| macro is to typeset the headings of the page, printing the name of the institute (if included), the type of the test (if included) and so on. 
 %\iffalse
-%%print headings
+%%define the heading style command
 %\fi
 %    \begin{macrocode}
-\newcommand{\printheading}{%
-    {\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{plain}\fi}%
+\newcommand{\defineheadingstyle}[2]{
+    \expandafter\newcommand\csname @verifichehdgsty#1\endcsname{%
+        \gdef\printheading{#2}}
+}
+%    \end{macrocode}
+%\iffalse
+%%use the heading style
+%\fi
+%    \begin{macrocode}
+\newcommand{\headingstyle}[1]{
+    \ifcsname @verifichehdgsty#1\endcsname{%
+        \csname @verifichehdgsty#1\endcsname%
+    }%
+    \else%
+        \PackageError{verifiche}{%
+            Headings style "#1" is not define.
+        }{%
+        Headings style "#1" is not define.
+        Use \noexpand\defineheadingstyle to define a new ones before use it.%
+        }%
+    \fi%
+}%
+%    \end{macrocode}
+%\iffalse
+%%define "einstein" style
+%\fi
+%    \begin{macrocode}
+\defineheadingstyle{einstein}{%
+        {\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{empty}\fi}%
+        {\ifcandidatename%
+        \noindent%
+        \begin{minipage}[t]{.5\textwidth}%
+            \vspace{0mm}%
+            \headerfont{\@header at candidatename\\[.5em]%
+                                \@header at class\\[.5em]%
+                                \@header at date}%
+        \end{minipage}}\fi%
+        \begin{minipage}[t]{.5\textwidth}%
+            \vspace{0mm}%
+            {\ifdefined\@asyear\ifasyear\hspace*{\fill}\asyearfont{\@asyearpreamble\space\@asyear}\hspace*{\fill}\par\vspace{\baselineskip}\fi\fi}%
+            {\ifdefined\@testtype\iftesttype\makebox[\linewidth][s]{\testtypefont{\@testtype}}\par\fi\fi}%
+            {\ifdefined\@subtitle\ifsubtitle\vspace{\baselineskip}\hspace*{\fill}\subtitlefont{\@subtitle}\hspace*{\fill}\par\fi\fi}%
+        \end{minipage}%
+        \par\vspace{\baselineskip}%
+        {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
+        {\ifdefined\@instruction\ifinstruction\instrunctionfont{\noindent\@instruction}}\par\fi\fi%
+        {\ifdefined\@duration\ifduration\hspace*{\fill}\durationfont\@duration\hspace*{\fill}\par\fi\fi}%
+        {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
+}%
+%    \end{macrocode}
+%\iffalse
+%%define "cattaneo" style
+%\fi
+%    \begin{macrocode}
+\defineheadingstyle{cattaneo}{%
+    {\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{empty}\fi}%
+    {\ifdefined\@asyear\ifasyear\hspace*{\fill}\asyearfont{\@asyearpreamble\space\@asyear}\hspace*{\fill}\par\vspace{\baselineskip}\fi\fi}%
+    {\ifdefined\@testtype\iftesttype\hspace*{\fill}\testtypefont{\@testtype}\hspace*{\fill}\par\fi\fi}%
+    {\ifdefined\@subtitle\ifsubtitle\vspace{\baselineskip}\hspace*{\fill}\subtitlefont{\@subtitle}\hspace*{\fill}\par\vspace{\baselineskip}
+    \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}%
-    {\ifdefined\@subtitle\ifsubtitle\vspace{\baselineskip}\subtitlefont{\@subtitle}\par\fi\fi}%
     {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
     {\ifdefined\@instruction\ifinstruction\instrunctionfont{\noindent\@instruction}}\par\fi\fi%
-    {\ifdefined\@duration\ifduration\durationfont\@duration\par\fi\fi}%
+    {\ifdefined\@duration\ifduration\hspace*{\fill}\durationfont\@duration\hspace*{\fill}\par\fi\fi}%
     {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
 }
 %    \end{macrocode}
-
+%\iffalse
+%%define "galilei" style
+%\fi
+%    \begin{macrocode}
+\defineheadingstyle{galilei}{%
+    {\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{empty}\fi}%
+    {\ifcandidatename\@header\par\vspace{\baselineskip}\fi}%
+    {\ifdefined\@asyear\ifasyear\hspace*{\fill}\asyearfont{\@asyearpreamble\space\@asyear}\hspace*{\fill}\par\vspace{\baselineskip}\fi\fi}%
+    {\ifdefined\@testtype\iftesttype\hspace*{\fill}\testtypefont{\@testtype}\hspace*{\fill}\par\fi\fi}%
+    {\ifdefined\@subtitle\ifsubtitle\vspace{\baselineskip}\hspace*{\fill}\subtitlefont{\@subtitle}\hspace*{\fill}\par\fi\fi}%
+    {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
+    {\ifdefined\@instruction\ifinstruction\instrunctionfont{\noindent\@instruction}}\par\fi\fi%
+    {\ifdefined\@duration\ifduration\hspace*{\fill}\durationfont\@duration\hspace*{\fill}\par\fi\fi}%
+    {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
+}
+%    \end{macrocode}
+%\iffalse
+%% default style: "galilei"
+%\fi
+%    \begin{macrocode}
+\headingstyle{galilei}
+%    \end{macrocode}
+%
 %\paragraph{Esercizio.} The main element of the package is the |esericizio| environment. 
 %It accepts some options define via |xkeyval| package. The element that are reproduced in the left margin are stored into a box and produce if |showmargin| boolean variable is switch to \textit{true}.\par
 %\iffalse
@@ -1574,6 +1681,7 @@
     \ifshowexercisept%
     \def\pointes{#1}%
     \def\espoint{%
+        \ptfont%
         \hfill\@ptprefix\@lpt at delimiter%
         \pointes\space\@useptlabel{\pointes}%
         \@rpt at delimiter}
@@ -1583,6 +1691,7 @@
     \ifshowexercisept%
     \def\@totalpartialpt{\convertreftonum{ptes@\theexercisenumber}}%
     \def\sumpartialpt{%
+        \ptfont%
         \@ptprefix\@lpt at delimiter%
         \@totalpartialpt\space\@useptlabel{\@totalpartialpt}%
         \@rpt at delimiter}%
@@ -1638,9 +1747,9 @@
     \par\addvspace{\baselineskip}%
     {\noindent\bfseries\exercisetitle\ifexercisesnumbered\space\theexercisenumber\fi}%
     \ifshowmarginexercise\exercisemargin\fi%
-    \par% newline after label
+    \par\nopagebreak\@nobreaktrue\ignorespaces% newline after label
     \setlength\parindent{0pt}%no parindent
-    \nobreak\ignorespaces#2%body of the environment
+    #2%body of the environment
 }{% 
    \par%
    \ignorespacesafterend%
@@ -1658,9 +1767,9 @@
     \IfValueT{#1}{\setkeys{esercizio}{#1}}%
     \par\addvspace{\baselineskip}{\noindent\bfseries\exercisetitle}%
     \ifshowmarginexercise\exercisemargin\fi%
-    \par% newline after label
+    \par\nopagebreak\@nobreaktrue\ignorespaces% newline after label
     \setlength\parindent{0pt}%no parindent
-    \nobreak\ignorespaces#2% body of the environment
+    #2%body of the environment
 }{%
     \par%
     \ignorespacesafterend
@@ -1699,7 +1808,7 @@
         {\noindent\bfseries%
         \ifsolutionscolor\color{\solutionscolor}\fi%
         \verifiche at solutionlabel}%
-        \par\nobreak\noindent\ignorespaces%
+        \par\nopagebreak\@nobreaktrue\noindent\ignorespaces%
         \setlength\parindent{0pt}%no parindent
         \solutionfont #2%
     \fi%
@@ -1732,11 +1841,8 @@
 %The |\completetext| print a horizontal line on which write the solution if the "solutions" mode is active.
 %    \begin{macrocode}
 \newcommand{\completetext}[2][4.5cm]{%
-    \ifsol%
-        $\overset{\displaystyle\text{\solutionfont#2}}{\underline{\hspace{#1}}}$%
-    \else%
-        $\overset{\relax}{\underline{\hspace{#1}}}$%
-    \fi}%
+    \underline{\makebox[#1][c]{\ifsol\solutionfont#2\else\relax\fi}}
+}%
 %    \end{macrocode}
 %\end{macro}
 %
@@ -1768,12 +1874,11 @@
 %The |\finderror| write the wrong text in "test mode" and than superimpose some mark (thanks to \textsf{ulem} package) and the correct text in "solutions mode".
 %    \begin{macrocode}
 \newcommand{\finderror}[2]{%
-    \ifsol%
-        $\overset{\text{{\solutionfont#2}}}{\text{\xout{#1}}}$%
-    \else%
-        #1%
-    \fi%
-}
+    \tikz[baseline=(error.base)]{%
+    \node[inner sep=0pt](error){\ifsol\xout{#1}\else#1\fi};%
+    \node[anchor=south, inner sep=2pt] at (error.north){\ifsol\solutionfont#2\else\relax\fi};%
+    }%
+}%
 %    \end{macrocode}
 %\end{macro}
 %

Modified: trunk/Master/texmf-dist/source/latex/verifiche/verifiche.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/verifiche/verifiche.ins	2023-08-22 22:46:29 UTC (rev 68022)
+++ trunk/Master/texmf-dist/source/latex/verifiche/verifiche.ins	2023-08-22 22:46:39 UTC (rev 68023)
@@ -1,5 +1,5 @@
 %%
-%% Copyright (C) 2020 - 2022 i by Francesco Raccanello
+%% Copyright (C) 2020 - 2023 i by Francesco Raccanello
 %%
 %% This file may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either
@@ -16,7 +16,7 @@
 \usedir{tex/latex/verifiche}
 \preamble
 This is a generated file.
-Copyright (C) 2020 - 2022 by Francesco Raccanello
+Copyright (C) 2020 - 2023 by Francesco Raccanello
 This file 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

Modified: trunk/Master/texmf-dist/tex/latex/verifiche/verifiche.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/verifiche/verifiche.sty	2023-08-22 22:46:29 UTC (rev 68022)
+++ trunk/Master/texmf-dist/tex/latex/verifiche/verifiche.sty	2023-08-22 22:46:39 UTC (rev 68023)
@@ -6,7 +6,7 @@
 %%
 %% verifiche.dtx  (with options: `package')
 %% This is a generated file.
-%% Copyright (C) 2020 - 2022 by Francesco Raccanello
+%% Copyright (C) 2020 - 2023 by Francesco Raccanello
 %% This file 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
@@ -15,28 +15,16 @@
 %% and version 1.3 or later is part of all distributions of
 %% LaTeX version 2005/12/01 or later.
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{verifiche} [2022/09/17 v6.0 .dtx verifiche file]
+\ProvidesPackage{verifiche} [2023/08/22 v7.0 .dtx verifiche file]
 
+
 \RequirePackage{xparse}
 \RequirePackage{xkeyval} 
-\RequirePackage{amsmath}
+\RequirePackage{pgffor}
 \RequirePackage{amssymb}
-\RequirePackage{pgffor}
 \RequirePackage[shortlabels, inline]{enumitem}
-\RequirePackage{siunitx}
-\RequirePackage{graphicx}
-\RequirePackage{xcolor}
 \RequirePackage{tikz}
-\RequirePackage{booktabs}
 \RequirePackage[normalem]{ulem}
-%%Forse si può cancellare questo
-\usetikzlibrary{calc,shapes.geometric,patterns,positioning,angles,quotes}
-\sisetup{
-    output-decimal-marker = {,},
-    exponent-product = \cdot,
-    per-mode=symbol-or-fraction,
-    separate-uncertainty
-}
 %%newif
 \newif\ifsol
 \newif\ifinstitute\institutetrue
@@ -146,11 +134,11 @@
 \newcommand{\institutefont}[1]{%
     \large \sffamily\color{darkgray}#1}
 \newcommand{\asyearfont}[1]{%
-    \hspace*{\fill} #1\hspace*{\fill}}
+    #1}
 \newcommand{\testtypefont}[1]{%
-    \bgroup\hspace*{\fill}\scshape\huge#1\hspace*{\fill}\egroup}
+    \bgroup\scshape\huge#1\egroup}
 \newcommand{\subtitlefont}[1]{%
-    \bgroup\hspace*{\fill}\Large\scshape#1\hspace*{\fill}\egroup}%
+    \bgroup\Large\scshape#1\egroup}%
 \newcommand{\instructiondelimiter}{%
    \hrulefill}
 \newcommand{\instrunctionfont}[1]{%
@@ -173,9 +161,10 @@
     \ifsolutionscolor\color{\solutionscolor}\fi%
     \itshape}
 \newcommand{\diffsymb}{%
-    $\bigstar$}
+    $\bullet$}
 \newcommand{\closedquestionitem}{%
     $\square$}
+\newcommand{\ptfont}{\normalsize}%
 %%pt prefix
 \newcommand{\@ptprefix}{%
     \underline{\hspace{\ptrulerlength}}/}
@@ -267,19 +256,75 @@
     \renewcommand{\@oddfoot}{\hfill\normalfont\textrm\thepage\hfill}%
     \let\evenfoot\@oddfoot%
 }
-%%print headings
-\newcommand{\printheading}{%
-    {\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{plain}\fi}%
+%%define the heading style command
+\newcommand{\defineheadingstyle}[2]{
+    \expandafter\newcommand\csname @verifichehdgsty#1\endcsname{%
+        \gdef\printheading{#2}}
+}
+%%use the heading style
+\newcommand{\headingstyle}[1]{
+    \ifcsname @verifichehdgsty#1\endcsname{%
+        \csname @verifichehdgsty#1\endcsname%
+    }%
+    \else%
+        \PackageError{verifiche}{%
+            Headings style "#1" is not define.
+        }{%
+        Headings style "#1" is not define.
+        Use \noexpand\defineheadingstyle to define a new ones before use it.%
+        }%
+    \fi%
+}%
+%%define "einstein" style
+\defineheadingstyle{einstein}{%
+        {\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{empty}\fi}%
+        {\ifcandidatename%
+        \noindent%
+        \begin{minipage}[t]{.5\textwidth}%
+            \vspace{0mm}%
+            \headerfont{\@header at candidatename\\[.5em]%
+                                \@header at class\\[.5em]%
+                                \@header at date}%
+        \end{minipage}}\fi%
+        \begin{minipage}[t]{.5\textwidth}%
+            \vspace{0mm}%
+            {\ifdefined\@asyear\ifasyear\hspace*{\fill}\asyearfont{\@asyearpreamble\space\@asyear}\hspace*{\fill}\par\vspace{\baselineskip}\fi\fi}%
+            {\ifdefined\@testtype\iftesttype\makebox[\linewidth][s]{\testtypefont{\@testtype}}\par\fi\fi}%
+            {\ifdefined\@subtitle\ifsubtitle\vspace{\baselineskip}\hspace*{\fill}\subtitlefont{\@subtitle}\hspace*{\fill}\par\fi\fi}%
+        \end{minipage}%
+        \par\vspace{\baselineskip}%
+        {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
+        {\ifdefined\@instruction\ifinstruction\instrunctionfont{\noindent\@instruction}}\par\fi\fi%
+        {\ifdefined\@duration\ifduration\hspace*{\fill}\durationfont\@duration\hspace*{\fill}\par\fi\fi}%
+        {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
+}%
+%%define "cattaneo" style
+\defineheadingstyle{cattaneo}{%
+    {\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{empty}\fi}%
+    {\ifdefined\@asyear\ifasyear\hspace*{\fill}\asyearfont{\@asyearpreamble\space\@asyear}\hspace*{\fill}\par\vspace{\baselineskip}\fi\fi}%
+    {\ifdefined\@testtype\iftesttype\hspace*{\fill}\testtypefont{\@testtype}\hspace*{\fill}\par\fi\fi}%
+    {\ifdefined\@subtitle\ifsubtitle\vspace{\baselineskip}\hspace*{\fill}\subtitlefont{\@subtitle}\hspace*{\fill}\par\vspace{\baselineskip}
+    \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}%
-    {\ifdefined\@subtitle\ifsubtitle\vspace{\baselineskip}\subtitlefont{\@subtitle}\par\fi\fi}%
     {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
     {\ifdefined\@instruction\ifinstruction\instrunctionfont{\noindent\@instruction}}\par\fi\fi%
-    {\ifdefined\@duration\ifduration\durationfont\@duration\par\fi\fi}%
+    {\ifdefined\@duration\ifduration\hspace*{\fill}\durationfont\@duration\hspace*{\fill}\par\fi\fi}%
     {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
 }
-
+%%define "galilei" style
+\defineheadingstyle{galilei}{%
+    {\ifdefined\@institute\ifinstitute\thispagestyle{mainverifiche}\fi\else\thispagestyle{empty}\fi}%
+    {\ifcandidatename\@header\par\vspace{\baselineskip}\fi}%
+    {\ifdefined\@asyear\ifasyear\hspace*{\fill}\asyearfont{\@asyearpreamble\space\@asyear}\hspace*{\fill}\par\vspace{\baselineskip}\fi\fi}%
+    {\ifdefined\@testtype\iftesttype\hspace*{\fill}\testtypefont{\@testtype}\hspace*{\fill}\par\fi\fi}%
+    {\ifdefined\@subtitle\ifsubtitle\vspace{\baselineskip}\hspace*{\fill}\subtitlefont{\@subtitle}\hspace*{\fill}\par\fi\fi}%
+    {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
+    {\ifdefined\@instruction\ifinstruction\instrunctionfont{\noindent\@instruction}}\par\fi\fi%
+    {\ifdefined\@duration\ifduration\hspace*{\fill}\durationfont\@duration\hspace*{\fill}\par\fi\fi}%
+    {\ifshowinstructiondelimiter\noindent\instructiondelimiter\par\fi}%
+}
+%% default style: "galilei"
+\headingstyle{galilei}
 %%ambiente esercizio
 \define at key{esercizio}{label}[\exerciselabel]{%
     \def\tempeserciziolabel{#1}}%
@@ -290,6 +335,7 @@
     \ifshowexercisept%
     \def\pointes{#1}%
     \def\espoint{%
+        \ptfont%
         \hfill\@ptprefix\@lpt at delimiter%
         \pointes\space\@useptlabel{\pointes}%
         \@rpt at delimiter}
@@ -299,6 +345,7 @@
     \ifshowexercisept%
     \def\@totalpartialpt{\convertreftonum{ptes@\theexercisenumber}}%
     \def\sumpartialpt{%
+        \ptfont%
         \@ptprefix\@lpt at delimiter%
         \@totalpartialpt\space\@useptlabel{\@totalpartialpt}%
         \@rpt at delimiter}%
@@ -333,9 +380,9 @@
     \par\addvspace{\baselineskip}%
     {\noindent\bfseries\exercisetitle\ifexercisesnumbered\space\theexercisenumber\fi}%
     \ifshowmarginexercise\exercisemargin\fi%
-    \par% newline after label
+    \par\nopagebreak\@nobreaktrue\ignorespaces% newline after label
     \setlength\parindent{0pt}%no parindent
-    \nobreak\ignorespaces#2%body of the environment
+    #2%body of the environment
 }{%
    \par%
    \ignorespacesafterend%
@@ -346,9 +393,9 @@
     \IfValueT{#1}{\setkeys{esercizio}{#1}}%
     \par\addvspace{\baselineskip}{\noindent\bfseries\exercisetitle}%
     \ifshowmarginexercise\exercisemargin\fi%
-    \par% newline after label
+    \par\nopagebreak\@nobreaktrue\ignorespaces% newline after label
     \setlength\parindent{0pt}%no parindent
-    \nobreak\ignorespaces#2% body of the environment
+    #2%body of the environment
 }{%
     \par%
     \ignorespacesafterend
@@ -376,7 +423,7 @@
         {\noindent\bfseries%
         \ifsolutionscolor\color{\solutionscolor}\fi%
         \verifiche at solutionlabel}%
-        \par\nobreak\noindent\ignorespaces%
+        \par\nopagebreak\@nobreaktrue\noindent\ignorespaces%
         \setlength\parindent{0pt}%no parindent
         \solutionfont #2%
     \fi%
@@ -396,11 +443,8 @@
     \fi%
 }
 \newcommand{\completetext}[2][4.5cm]{%
-    \ifsol%
-        $\overset{\displaystyle\text{\solutionfont#2}}{\underline{\hspace{#1}}}$%
-    \else%
-        $\overset{\relax}{\underline{\hspace{#1}}}$%
-    \fi}%
+    \underline{\makebox[#1][c]{\ifsol\solutionfont#2\else\relax\fi}}
+}%
 \newcommand{\truefalse}[1]{%
     %True
     \framebox{\parbox[c][\verifiche at truefalsesquares]{\verifiche at truefalsesquares}{\centering\@verifiche at Tletter}}%
@@ -419,12 +463,11 @@
      \fi%% 
 }
 \newcommand{\finderror}[2]{%
-    \ifsol%
-        $\overset{\text{{\solutionfont#2}}}{\text{\xout{#1}}}$%
-    \else%
-        #1%
-    \fi%
-}
+    \tikz[baseline=(error.base)]{%
+    \node[inner sep=0pt](error){\ifsol\xout{#1}\else#1\fi};%
+    \node[anchor=south, inner sep=2pt] at (error.north){\ifsol\solutionfont#2\else\relax\fi};%
+    }%
+}%
 \newlist{crocette}{itemize}{1}%
 \newlist{crocette*}{itemize*}{1}%
 \setlist[crocette]{label=\closedquestionitem, leftmargin=*, parsep=0pt }%



More information about the tex-live-commits mailing list.