texlive[60730] Master/texmf-dist: esami (11oct21)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 11 22:22:08 CEST 2021


Revision: 60730
          http://tug.org/svn/texlive?view=revision&revision=60730
Author:   karl
Date:     2021-10-11 22:22:08 +0200 (Mon, 11 Oct 2021)
Log Message:
-----------
esami (11oct21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/esami/README
    trunk/Master/texmf-dist/doc/latex/esami/VERSION
    trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.pdf
    trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex
    trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.pdf
    trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex
    trunk/Master/texmf-dist/doc/latex/esami/doc/esami.bib
    trunk/Master/texmf-dist/doc/latex/esami/doc/examples/test14.tex
    trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.pdf
    trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA.pdf
    trunk/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg
    trunk/Master/texmf-dist/tex/latex/esami/es-italian.lng
    trunk/Master/texmf-dist/tex/latex/esami/esami.sty

Modified: trunk/Master/texmf-dist/doc/latex/esami/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/README	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/doc/latex/esami/README	2021-10-11 20:22:08 UTC (rev 60730)
@@ -1,6 +1,6 @@
-The esami package v. 2.5
+The esami package v. 2.6
           For generation of texts and solutions  of exams in LaTeX
-2018/05/06
+2021/10/11
 
 File:       README
 Author:    Grazia Messineo and Salvatore Vassallo
@@ -14,7 +14,7 @@
 of each group are randomly scrambled across the exam and variants of each exercise are chosen
 randomly from a file which contains them all and.
 
-Copyright:  (C) 2008--2018 Grazia Messineo & Salvatore Vassallo
+Copyright:  (C) 2008--2021 Grazia Messineo & Salvatore Vassallo
 Licence:    LPPL
 
 FILES IN DISTRIBUTION
@@ -25,7 +25,7 @@
       VERSION 
       README        This file.
       esami.sty     The main file
-      xyz.cfg       A template of configuration file
+      esami-xyz.cfg       A template of configuration file
       es-*.lng      Localisation files
 
    DOCUMENTATION:
@@ -50,7 +50,7 @@
 		test4.tex
 		test5-fillin.tex
 		test9.tex
-                test11.tex
+        test11.tex
 		test12.tex
 		test13.tex
 		test14.tex
@@ -63,8 +63,8 @@
         problem4-fillin.tex
 
     Examples of an exam (and solutions) built using above exercises  using pdflatex, xelatex and lualatex
-                testA.pdf
-                testA.tex
+        testA.pdf
+        testA.tex
 		testA-luatex-sol.pdf
 		testA-luatex.pdf
 		testA-sol.pdf
@@ -85,7 +85,7 @@
 
      <texmf>/tex/latex/esami/
       esami.sty     The main file
-      xyz.cfg       A template of configuration file
+      esami-xyz.cfg       A template of configuration file
       es-*.lng      Localisation files
 
 
@@ -93,4 +93,4 @@
          README
          doc-esami-en.pdf  User manual in English
          doc-esami-it.pdf  User manual in Italian
-         doc-esami-*.tex   Sources for documentation 
\ No newline at end of file
+         doc-esami-*.tex   Sources for documentation 

Modified: trunk/Master/texmf-dist/doc/latex/esami/VERSION
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/VERSION	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/doc/latex/esami/VERSION	2021-10-11 20:22:08 UTC (rev 60730)
@@ -1 +1 @@
-VERSION 2.5 DATE=May 06, 2018
+VERSION 2.6 DATE=October 11, 2021

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

Modified: trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex	2021-10-11 20:22:08 UTC (rev 60730)
@@ -77,6 +77,7 @@
 \changes{Version 2.3}{2017/09/18}{Corrected a misprint in the code.}
 \changes{Version 2.4}{2018/02/10}{Documentation corrected. }
 \changes{Version 2.5}{2018/05/06}{Corrected a misprint in the code.  Improved the selection of random exercises.}
+\changes{Version 2.6}{2021/10/11}{Improved the spacing in \cmd{\FPsignpol}. Corrected the code to  avoid some spourios spaces. }
 
 %\IndexPrologue{\section*{Index} Numbers written in italic refer to the page where the item is described; underlined numebers refer to the line of code in which the item is described; other references are to the line of code where the item is used.}
 \GlossaryPrologue{\section*{Changelog}}
@@ -86,8 +87,8 @@
 	\fontshape\updefault
 	\footnotesize}
 \GetFileInfo{esami.sty}
-\def\fileversion{version 2.5}
-\def\filedate{2018/05/06}
+\def\fileversion{versione 2.6}
+\def\filedate{2021/10/11}
 
 
 \title{Package esami\thanks{This document
@@ -599,6 +600,8 @@
 	except 6 and the value assigned to \cmd{\a}).
 \end{esempio}
 
+\textbf{N.B. It is better to define the parameters inside the environments \envname{problem},  \envname{problem*}, etc, to avoid spurious spaces between the name of the exercise and its body text. Anyway, the authors suggest to begin the text on a new line.}
+
 You can work on the parameters defined with this command as on numbers and we have defined commands which allow to work on them showing both the numerical result and the operations in a parametric form.
 
 \begin{itemize}
@@ -789,7 +792,7 @@
 	\item[Version 2.3 (2017/09/18)] Corrected a misprint in the code.
         \item[Version 2.4 (2018/02/10)] Documentation corrected.
         \item[Version 2.5 (2018/05/06)] Corrected a misprint in the code.  Improved the selection of random exercises.
-
+		\item[Version 2.6 (2021/10/11)]  Improved the spacing in \cmd{\FPsignpol}. Corrected the code to  avoid some spourios spaces. 
 \end{description}
 
 \bibliographystyle{plain}

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

Modified: trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex	2021-10-11 20:22:08 UTC (rev 60730)
@@ -1,4 +1,3 @@
-%\documentclass[10pt]{article}
 
 %\iffalse    This is a METACOMMENT
 %
@@ -77,6 +76,7 @@
 \changes{Versione 2.3}{2017/09/18}{Corretto un errore di battitura nel codice.}
 \changes{Versione 2.4}{2018/02/10}{Corretta la documentazione .}
 \changes{Versione 2.5}{2018/05/06}{Corretto un errore di battitura nel codice. Migliorata la scelta aleatoria degli esercizi.}
+\changes{Versione 2.6}{2021/10/11}{Migliorata la spaziatura in \cmd{\FPsignpol}. Corretto il codice per eliminare alcuni spazi spuri.}
 
 %\IndexPrologue{\section*{Indice} I numeri scritti in italico rimandano alla pagina dove è descritto l'item; i numeri sottolineati rimandano alla riga di codice in cui l'item è descritto; le altre referenze sono alla riga di codice dove l'item è usato.}
 \GlossaryPrologue{\section*{Changelog}}
@@ -86,8 +86,8 @@
 	\fontshape\updefault
 	\footnotesize}
 \GetFileInfo{esami.sty}
-\def\fileversion{versione 2.5}
-\def\filedate{2018/05/06}
+\def\fileversion{versione 2.6}
+\def\filedate{2021/10/11}
 
 
 \title{Il pacchetto esami\thanks{Questo documento
@@ -607,6 +607,8 @@
 	escluso 6 e il valore già assegnato ad \cmd{\a}).
 \end{esempio}
 
+\textbf{N.B. È utile dare i comandi di definizione dei parametri all'interno dell'ambiente  \envname{problem},  \envname{problem*}, ecc. per evitare la creazione di spazi spuri tra il nome dell'esercizio e il testo dello stesso. Gli autori consigliano comunque di iniziare il testo dell'esercizio su una nuova riga.}
+
 Sui parametri definiti è possibile operare come su numeri e sono stati definiti comandi che permettono di operare su tali parametri mostrando il risultato numerico o le operazioni in forma parametrica.
 
 \begin{itemize}
@@ -792,6 +794,7 @@
 	\item[Versione 2.3 (2017/09/18)] Corretto un errore di battitura nel codice.
 	\item[Versione 2.4 (2018/02/10)] Corretta la documentazione .
         \item[Versione 2.5 (2018/05/06)] Corretto un errore di battitura nel codice. Migliorata la scelta aleatoria degli esercizi.
+         \item[Versione 2.6 (2021/10/11)] Migliorata la spaziatura in \cmd{\FPsignpol}. Corretto il codice per eliminare alcuni spazi spuri.
 
 
 \end{description}

Modified: trunk/Master/texmf-dist/doc/latex/esami/doc/esami.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/esami.bib	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/esami.bib	2021-10-11 20:22:08 UTC (rev 60730)
@@ -1,5 +1,4 @@
-% This file was created with JabRef 2.9.2.
-% Encoding: Cp1252
+% Encoding: UTF-8
 
 @MISC{examdesign,
   author = {Jason Alexander},
@@ -62,3 +61,5 @@
   pages = {40-46},
   number = {1}
 }
+
+ at Comment{jabref-meta: databaseType:bibtex;}

Modified: trunk/Master/texmf-dist/doc/latex/esami/doc/examples/test14.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/examples/test14.tex	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/examples/test14.tex	2021-10-11 20:22:08 UTC (rev 60730)
@@ -2,8 +2,8 @@
 \FPsetpar{a}{2}{5}
 \FPsetpar{b}{2}{5}
 \FPsetpar{c}{2}{8}
-
-\item \PTs{1} exercise 14a $a=\a$, $b=\b$, $c=\c$
+\estrai{3,5,7,11}{alpha}
+\item \PTs{1} exercise 14a $a=\a$, $b=\b$, $c=\c$ $alphai=\alphai$\ $alphaii=\alphaii$\ 
   \begin{answers}{1}\bChoices[random]
     \Ans1 answer 1 correct\eAns
     \Ans0 answer 2 wrong\eAns
@@ -10,23 +10,6 @@
     \Ans0 answer 3 wrong\eAns
     \Ans0 answer 4 wrong\eAns
     \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}
-    \begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
-
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
-
-\item \PTs{1} exercise 14b $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
     \eChoices\end{answers}\begin{solution}
       This is the solution $a=\a$, $b=\b$, $c=\c$
     \end{solution}}
@@ -33,227 +16,227 @@
 
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14c $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14c $a=\a$, $b=\b$, $c=\c$ \alphai\ \alphaii\ 
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14d $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14d $a=\a$, $b=\b$, $c=\c$ \alphai\ \alphaii\ 
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14e $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14e $a=\a$, $b=\b$, $c=\c$ \alphai\ \alphaii\ 
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
     
     
-    \newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+    %\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14f $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}
-    \begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14f $a=\a$, $b=\b$, $c=\c$ \alphai\ \alphaii\ 
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}
+    %\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14g $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14g $a=\a$, $b=\b$, $c=\c$ \alphai\ \alphaii\ 
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14h $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14h $a=\a$, $b=\b$, $c=\c$
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14k $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14k $a=\a$, $b=\b$, $c=\c$
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14i $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14i $a=\a$, $b=\b$, $c=\c$
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14j $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}
-    \begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14j $a=\a$, $b=\b$, $c=\c$
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}
+    %\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14l $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14l $a=\a$, $b=\b$, $c=\c$
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14m $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14m $a=\a$, $b=\b$, $c=\c$
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14n $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14n $a=\a$, $b=\b$, $c=\c$
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}
 
 
-\newproblem{
-\FPsetpar{a}{2}{5}
-\FPsetpar{b}{2}{5}
-\FPsetpar{c}{2}{8}
+%\newproblem{
+%\FPsetpar{a}{2}{5}
+%\FPsetpar{b}{2}{5}
+%\FPsetpar{c}{2}{8}
 
-\item \PTs{1} exercise 14o $a=\a$, $b=\b$, $c=\c$
-  \begin{answers}{1}\bChoices[random]
-    \Ans1 answer 1 correct\eAns
-    \Ans0 answer 2 wrong\eAns
-    \Ans0 answer 3 wrong\eAns
-    \Ans0 answer 4 wrong\eAns
-    \Ans0 answer 5 wrong \eAns
-    \eChoices\end{answers}\begin{solution}
-      This is the solution $a=\a$, $b=\b$, $c=\c$
-    \end{solution}}
+%\item \PTs{1} exercise 14o $a=\a$, $b=\b$, $c=\c$
+  %\begin{answers}{1}\bChoices[random]
+    %\Ans1 answer 1 correct\eAns
+    %\Ans0 answer 2 wrong\eAns
+    %\Ans0 answer 3 wrong\eAns
+    %\Ans0 answer 4 wrong\eAns
+    %\Ans0 answer 5 wrong \eAns
+    %\eChoices\end{answers}\begin{solution}
+      %This is the solution $a=\a$, $b=\b$, $c=\c$
+    %\end{solution}}

Modified: trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.pdf
===================================================================
(Binary files differ)

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

Modified: trunk/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg	2021-10-11 20:22:08 UTC (rev 60730)
@@ -1,11 +1,11 @@
 %% Package `esami' to use with LaTeX 2e
-%%  Copyright (C) 2008-2018  G. Messineo e S. Vassallo
+%%  Copyright (C) 2008-2021  G. Messineo e S. Vassallo
 %%
 %% This is file `esami-xyz.cfg',
 %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% esami-xyz.cfg,             2018-05-06                %%
-%% Copyright (C) 2008-2018 G. Messineo e S. Vassallo    %%
+%% esami-xyz.cfg,             2021-10-11                %%
+%% Copyright (C) 2008-2021 G. Messineo e S. Vassallo    %%
 %%                                                      %%
 %% This program can be redistributed and/or modified    %%
 %% under the terms of the LaTeX Project Public License  %%
@@ -27,6 +27,7 @@
 \DeclareMathOperator{\arctg}{arctg}
 \providecommand*{\dif}{\mathop{}\!\mathrm{d}}
 \providecommand{\dlim}{\displaystyle \lim}
+\providecommand{\dsum}{\displaystyle \sum}
 \providecommand{\me}{\mathrm{e}}
 \providecommand{\D}{\displaystyle}
 
@@ -127,8 +128,8 @@
 \sffamily \textbf{INSTRUCTIONS}
 \begin{itemize}
   \item Write here your instructions
-  \item two è con accento
-  \item three è à é ò ù
+  \item two 
+  \item three 
 \end{itemize}}}
 
 \def\istruzioniii{\setlength{\fboxsep}{1.5ex}\setlength{\fboxrule}{1.2pt}{\sffamily

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-italian.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-italian.lng	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-italian.lng	2021-10-11 20:22:08 UTC (rev 60730)
@@ -7,7 +7,7 @@
 
 %%% Labels (xyz.cfg)
 
-\def\profname{Prof.\ }
+\def\profname{Prof Duck }
 \def\studsignname{Firma leggibile dello studente}
 \def\studlastname{Cognome}
 \def\studfirstname{Nome}
@@ -56,8 +56,7 @@
 %%% Useful Language dependent packages
 
 \AtEndOfPackage{
-\usepackage[italian]{babel}
-%\NoIntelligentComma
+
 \usepackage{geometry}
 \geometry{a4paper,lmargin=6mm,rmargin=22mm,tmargin=10mm,bmargin=18mm,marginparsep=2mm,footskip=1cm}
 \usepackage{icomma}

Modified: trunk/Master/texmf-dist/tex/latex/esami/esami.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/esami.sty	2021-10-11 20:21:40 UTC (rev 60729)
+++ trunk/Master/texmf-dist/tex/latex/esami/esami.sty	2021-10-11 20:22:08 UTC (rev 60730)
@@ -2,8 +2,8 @@
 %% This is file `esami.sty',
 %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% esami.sty package,             2018-02-10            %%
-%% Copyright (C) 2008-2018  G. Messineo e S. Vassallo   %%
+%% esami.sty package,             2021-10-11            %%
+%% Copyright (C) 2008-2021  G. Messineo e S. Vassallo   %%
 %%                                                      %%
 %% This program can be redistributed and/or modified    %%
 %% under the terms of the LaTeX Project Public License  %%
@@ -45,9 +45,12 @@
 % Version 2.5
 % 2018/05/06
 %Corrected a misprint in the code. Improved the selection of random exercises.
+% Version 2.6
+% 2021/10/11
+%Corrected a misprint in the code. Improved the selection of random exercises.
 
 \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{esami}
-    [2018/05/06 v2.5 An Exam Construction Package]
+    [2021/10/11 v2.6 An Exam Construction Package]
 
 % +=============================+
 % |         THE OPTIONS         |
@@ -130,9 +133,7 @@
 %========================================================%
 
 \newwrite\parametri
-
 \DeclareOption{param}{\es at paramtrue \AtBeginDocument{\newwrite\params}}
-
 \ProcessOptions\relax
 
 % +=============================+
@@ -141,7 +142,7 @@
 
 \usepackage{graphicx}
 \usepackage{enumerate}
-\usepackage{fp}
+\usepackage[nomessages]{fp}
 \usepackage{currfile}
 \usepackage{array}
 \usepackage{environ}
@@ -152,15 +153,16 @@
 
 
 \ifes at pst
-\usepackage{pstricks,pstricks-add}
-\ifes at autopst
-\usepackage[crop=off,dvips={}]{auto-pst-pdf}
+	\usepackage{pstricks,pstricks-add}
+	\ifes at autopst
+		\usepackage[crop=off,dvips={}]{auto-pst-pdf}
    \else
-\usepackage[off]{auto-pst-pdf}
+		\usepackage[off]{auto-pst-pdf}
     \fi
-    \else
+\else
     \@ifpackageloaded{xcolor}{}{\usepackage{xcolor}}
 \fi
+
 \input random
 
 %========================================================%
@@ -167,22 +169,17 @@
 %         Error Messages                                 %
 %========================================================%
 
-\def\testversioni{\ifthenelse{\not\equal{\numcompiti}{} }  {\relax} %
+\def\testversioni{\ifthenelse{\not\equal{\numcompiti}{}}{\relax} %
     { \immediate\write16{\es at numcompitierror}
   {\endlinechar=-1 \global\read16 to\numcompiti}}}
-  \ifthenelse{\equal{\jobname}{\detokenize{master}}}{%%
-    {%
-    \PackageError{esami} %
-        {\es at mastererror}
-        {}}}
-        \ifthenelse{\equal{\jobname}{\detokenize{master-sol}}}{%%
-    {%
-    \PackageError{esami} %
-        {\es at mastererror}
-        {}}}
+  \ifthenelse{\equal{\jobname}{\detokenize{master}}} {{ \PackageError{esami} {\es at mastererror}{}}}%
+   \ifthenelse{\equal{\jobname}{\detokenize{master-sol}}}{{\PackageError{esami}{\es at mastererror}{}}}%
 
-\ifes at language \else \InputIfFileExists{es-italian.lng}%
-   { \typeout{esami: No language chosen: Italian language will be used.}}{NO LANGUAGE!!!}\fi
+\ifes at language 
+\else 
+	\InputIfFileExists{es-italian.lng}{ \typeout{esami: No language chosen: Italian language will be used.}}{NO LANGUAGE!!!}
+\fi
+
 %========================================================%
 %          DIMENSIONS                                    %
 %========================================================%
@@ -264,13 +261,14 @@
 \newcounter{nomefile}%%% counter for year-month-day
 \newcount\tmp at quest %%% the number of the exercise
 \newcount\@probselN %%% in \selectrandomlyn
-\newcount\@shfctr \newcount\@shfA \newcount\@shfB %%% In "\shuffle"
+\newcount\@shfctr %%% In "\shuffle"
+\newcount\@shfA %%% In "\shuffle"
+\newcount\@shfB %%% In "\shuffle"
 \newcount\icount  %%% counter to shuffle exercises
 \newcount\io
 \newcount\inizio
 \newcount\old at rando
 \FPeval\seme{round(\thenomefile+1-trunc(\thenomefile/(2^31-1):0)*(2^31-1):0)}
-%\FPset\semeex\seme
 \def\semeex{\seme}
 \inizio=1
 %%%%
@@ -281,7 +279,7 @@
 \newcounter{fp at contatore}%%% used in \FPsetpar
 \newcount\old at randomii%%% used to change seed shuffling exercise
 \newcount\old at randomi%%% used to change seed in \FPsetpar
-\newcount\old at random%%% used to change seed in \selectrandomly %%%NUOVO
+\newcount\old at random%%% used to change seed in \selectrandomly 
 \newcount\sh at max%%% used to choose the exercises
 \newcount\@probN%%% number of exercises in \selectrandomly
 \newcount\j at m%%% temporary counter in \newproblem
@@ -290,7 +288,8 @@
 \newcounter{shuf at lop}
 \newcounter{temp at cnt}
 \newcounter{questionno}%%% the number of the question in test
-\newcount\@esquestiondepth \@esquestiondepth=0
+\newcount\@esquestiondepth 
+	\@esquestiondepth=0
 \newcounter{esquestionnoi}
 \renewcommand{\theesquestionnoi}{\arabic{esquestionnoi}}
 \newcounter{esquestionnoii}
@@ -374,13 +373,16 @@
 \newcommand\exlabelformatwp{{\scshape\exlabel\ \theex at no.}}
 \newcommand{\exsolafter}{\es at exsolafterDefault}
 \newcommand{\es at exsolafterDefault}{\textit{\es at solutionname}: }
-\newcommand{\esexlisttabheader}
-{(\hfil\theex at partno\hfil)%
+\newcommand{\esexlisttabheader}{(\hfil\theex at partno\hfil)}
+\newcommand{\ex at header}{\hbox
+{%
+\if
+	\exerstar*\exlabelformatwp%
+\else
+    \exlabelformat
+    \fi
+    }%
 }
-\newcommand{\ex at header}
-{\hbox{\if\exerstar*\exlabelformatwp\else%
-        \exlabelformat\fi}%
-}
 
 % +=============================+
 % |        COMMANDS             |
@@ -390,36 +392,54 @@
 %           Maths                                        %
 %========================================================%
 
-%\ifes at param
-%\newcommand{\FPsv}[2][0]{(#2)}%%% \FPsv shows oparations
-%\newcommandx{\FPval}[3][2=0]{\expandafter\def\csname#1\endcsname{(#1)}
-%\immediate\write\params{%%% writes on a file
-%                \string\textbf\string{\string\noindent\space \es at parametermessagea{#1}{#3}
-%                \string}\string\newline}}
-%\else
-\newcommand{\FPsv}[2][0]{\FPeval{\fp at tmpa}{clip(round(#2:#1))}\numprint{\fp at tmpa}}%%% It does operations with #1 decimals and with the "param" option it shows operations
-\newcommandx{\FPval}[3][2=0]{\FPeval{#1}{clip(round(#3:#2))}}%% it works like \FPsv with the option param, like \FPeval otherwise
-%\fi
+
+\newcommand{\FPsv}[2][0]
+{%%%% It does operations with #1 decimals and with the "param" option it shows operations
+	\FPeval{\fp at tmpa}{clip(round(#2:#1))}\numprint{\fp at tmpa}\relax
+	}
+\newcommandx{\FPval}[3][2=0]{%% it works like \FPsv with the option param, like \FPeval otherwise
+	\FPeval{#1}{clip(round(#3:#2))%
+	}%
+	}
+
+
 %========================================================%
 %               fractions                                %
 %========================================================%
 
 \newcommand{\@sempli}[2]{%%%% simplification (private command)
-    \FPeval\segnofrac{round(#1:0)*round(#2:0)}
-    \FPeval\fp at tmp{round(abs(#1):0)}\FPset\fp at n{\fp at tmp}%
+    \FPeval\segnofrac{round(#1:0)*round(#2:0)}%
+    \FPeval\fp at tmp{round(abs(#1):0)}%
+    \FPset\fp at n{\fp at tmp}%
     \FPeval\fp at tmp{round(abs(#2):0)}%
-    \FPifzero{\fp at tmp}\PackageError{esami}{\es at zerodenerror{#1}{#2}}\fi
+		\FPifzero{\fp at tmp}
+			\PackageError{esami}{\es at zerodenerror{#1}{#2}}%
+		\fi
     \FPset\fp at d{\fp at tmp}%
-    \FPeval\fp at num{max(\fp at n,\fp at d)}\FPeval\fp at den{min(\fp at n,\fp at d)}\FPset\fp at resto{\fp at den}\whiledo{\fp at resto>0}%
-    {\FPset\fp at restoold{\fp at resto}\FPeval\fp at resto{round((\fp at num-trunc((\fp at num)/\fp at den:0)*(\fp at den)):0)}%
-    \FPset\fp at num{\fp at den}\FPset\fp at den{\fp at resto}}\FPeval\fp at num{round((\fp at n/\fp at restoold):0)}\FPeval\fp at den{round((\fp at d/\fp at restoold):0)}%
-    \FPifneg\segnofrac{-}\else{}\fi\ifthenelse{\fp at den=1}{\ifthenelse{\fp at num=1}{1}{\fp at num}}{\frac{\fp at num}{\fp at den}}%
+    \FPeval\fp at num{max(\fp at n,\fp at d)}%
+    \FPeval\fp at den{min(\fp at n,\fp at d)}%
+    \FPset\fp at resto{\fp at den}%
+		\whiledo{\fp at resto>0}%
+			{%
+			\FPset\fp at restoold{\fp at resto}%
+			\FPeval\fp at resto{round((\fp at num-trunc((\fp at num)/\fp at den:0)*(\fp at den)):0)}%
+			\FPset\fp at num{\fp at den}%
+			\FPset\fp at den{\fp at resto}%
+			}
+	\FPeval\fp at num{round((\fp at n/\fp at restoold):0)}%
+	\FPeval\fp at den{round((\fp at d/\fp at restoold):0)}%
+		\FPifneg\segnofrac{-}
+		\else{}
+		\fi
+	\ifthenelse{\fp at den=1}{%
+			\ifthenelse{\fp at num=1}{1}{\fp at num}
+	}
+	{\frac{\fp at num}{\fp at den}}%
     }
 
 \newcommand{\sempli}[2]{%%% simplification (user command)
     \FPeval\fp at tmp{round(abs(#1):0)}%
-        \FPifzero{\fp at tmp}\PackageError{esami}{\es at zeronumerrorshort{#1}{#2}}
-        {\es at zeronumerrorlong{#1}{#2}}\fi
+        \FPifzero{\fp at tmp}\PackageError{esami}{\es at zeronumerrorshort{#1}{#2}}{\es at zeronumerrorlong{#1}{#2}}\fi
     \FPeval\fp at temp{round(abs(#2):0)}%
         \FPifeq{\fp at tmp}{\fp at temp}\PackageWarning{esami}{\es at fraconewarn{#1}{#2}}\fi
     \@sempli{#1}{#2}%
@@ -427,37 +447,29 @@
 
 \newcommand{\semplix}[2]{%%% simplification (coefficients)
     \FPeval\fp at tmp{round(abs(#1):0)}%
-        \FPifzero{\fp at tmp}\PackageError{esami}{\es at zeronumerrorshort{#1}{#2}}
-        {\es at zeronumerrorlong{#1}{#2}}\fi
+    \FPifzero{\fp at tmp}\PackageError{esami}{\es at zeronumerrorshort{#1}{#2}}{\es at zeronumerrorlong{#1}{#2}}\fi
     \FPeval\t at mpa{round(#1:0)}\FPeval\t at mpb{round(#2:0)}%
-    \ifthenelse{\t at mpa=\t at mpb}{}%
-    {\ifthenelse{\t at mpa=-\t at mpb}{-}%
-    {\@sempli{#1}{#2}}%
+		\ifthenelse{\t at mpa=\t at mpb}{}{\ifthenelse{\t at mpa=-\t at mpb}{-}{\@sempli{#1}{#2}}}
     }
-    }
 
 \newcommand{\sempliz}[2]{%%% simplifications (zero)
     \FPeval\t at mpa{round(#1:0)}%
-    \ifthenelse{\t at mpa=0}{0}%
-    {\@sempli{#1}{#2}}%
+    \ifthenelse{\t at mpa=0}{0}{\@sempli{#1}{#2}}%
     }
 
 \newcommand{\esempli}[2]{%%% simplification (exponents)
     \FPeval\fp at tmp{round(abs(#1):0)}%
-       \FPifzero{\fp at tmp}\PackageError{esami}{\es at zeronumerrorshort{#1}{#2}}
-       {\es at zeronumerrorlong{#1}{#2}}\fi
-    \FPeval\t at mpa{round(#1:0)}\FPeval\t at mpb{round(#2:0)}%
-    \ifthenelse{\t at mpa=\t at mpb}{}%
-    {\ifthenelse{\t at mpa=-\t at mpb}{-1}%
-    {\@sempli{#1}{#2}}%
+       \FPifzero{\fp at tmp}\PackageError{esami}{\es at zeronumerrorshort{#1}{#2}}{\es at zeronumerrorlong{#1}{#2}}\fi
+    \FPeval\t at mpa{round(#1:0)}%
+    \FPeval\t at mpb{round(#2:0)}%
+    \ifthenelse{\t at mpa=\t at mpb}{}{\ifthenelse{\t at mpa=-\t at mpb}{-1}{\@sempli{#1}{#2}}}
     }
-    }
 
 %========================================================%
 %                Radicals (simplification)               %
 %========================================================%
 
-\newcommand\simpsqrt[2]{
+\newcommand\simpsqrt[2]{%
     \FPset\tmp at sqi{2}%
     \FPset\sq at factor{1}%
     \FPset\tmp at factor{1}%
@@ -466,20 +478,69 @@
     \FPeval\sq at ind{round(#1:0)}%
     \FPeval\tmp at sqpw{round(\tmp at sqi^(\sq at ind):0)}%
     \FPeval\tmp at sqj{round(\sq at rad+1:0)}%
-    \ifthenelse{\equal\sq at rad{0}}{0}{%
-    \whiledo{\tmp at sqpw<\tmp at sqj}{\FPeval\tmp at rad{\sq at rad/\tmp at sqpw}%
-    \FPeval\sq at resto{round((\sq at rad-trunc((\sq at rad)/\tmp at sqpw:0)*(\tmp at sqpw)):0)}%
-    \ifthenelse{\equal{\sq at resto}{0}}{\FPset\tmp at factor{\sq at factor}\FPeval\sq at factor{round(\tmp at factor*\tmp at sqi:0)}\FPeval\sq at rad{round(\tmp at rad:0)}%
-    \FPset\tmp at sqi{1}}{}\FPset\tmp at sqii{\tmp at sqi}\FPeval\tmp at sqi{round(\tmp at sqii+1:0)}\FPeval\tmp at sqpw{round(\tmp at sqi^(\sq at ind):0)}}%
-    \ifthenelse{\isodd{\sq at ind}}{%
-    \ifthenelse{\equal{\sq at factor}{1}} {\ifthenelse{\equal{\sq at rad}{1}}{\ifthenelse{\sq at segno<0}{-1}{1}}
-    {\ifthenelse{\sq at segno<0}{-\sqrt[\sq at ind]{\sq at rad}}{\sqrt[\sq at ind]{\sq at rad}}}}%
-    {\ifthenelse{\equal{\sq at rad}{1}}{\ifthenelse{\sq at segno<0}{-\sq at factor}{\sq at factor} }
-    {\ifthenelse{\sq at segno<0}{-\sq at factor\sqrt[\sq at ind]{\sq at rad}}{\sq at factor\sqrt[\sq at ind]{\sq at rad} }}}}%
-    {\ifthenelse{\sq at segno<0}{\PackageError{esami}{\es at radicalerror}}{\ifthenelse{\equal{\sq at factor}{1}} {\ifthenelse{\equal{\sq at rad}{1}}{1}
-    {\ifthenelse{\sq at ind=2}{\sqrt{\sq at rad}}{\sqrt[\sq at ind]{\sq at rad}}} }%
-    {\ifthenelse{\equal{\sq at rad}{1}}{\sq at factor}{\ifthenelse{\sq at ind=2}{\sq at factor\sqrt{\sq at rad}}{\sq at factor\sqrt[\sq at ind]{\sq at rad}}} }}}}%
-    }
+		\ifthenelse{\equal\sq at rad{0}}{0}
+		{%
+			\whiledo{\tmp at sqpw<\tmp at sqj}
+				{%
+				\FPeval\tmp at rad{\sq at rad/\tmp at sqpw}%
+				\FPeval\sq at resto{round((\sq at rad-trunc((\sq at rad)/\tmp at sqpw:0)*(\tmp at sqpw)):0)}%
+					\ifthenelse{\equal\sq at resto{0}}
+					{%
+					\FPset\tmp at factor{\sq at factor}%
+					\FPeval\sq at factor{round(\tmp at factor*\tmp at sqi:0)}%
+					\FPeval\sq at rad{round(\tmp at rad:0)}%
+					\FPset\tmp at sqi{1}
+					}{}
+				\FPset\tmp at sqii{\tmp at sqi}%
+				\FPeval\tmp at sqi{round(\tmp at sqii+1:0)}%
+				\FPeval\tmp at sqpw{round(\tmp at sqi^(\sq at ind):0)}
+				}%
+			\ifthenelse{\isodd{\sq at ind}}
+			{%
+				\ifthenelse{\equal{\sq at factor}{1}} 
+				{%
+					\ifthenelse{\equal{\sq at rad}{1}}
+					{%
+					\ifthenelse{\sq at segno<0}{-1}{1}
+					}
+					{%
+					\ifthenelse{\sq at segno<0}{-\sqrt[\sq at ind]{\sq at rad}}
+					{\sqrt[\sq at ind]{\sq at rad}}
+					}
+				}
+				{%
+					\ifthenelse{\equal{\sq at rad}{1}}
+					{%
+					\ifthenelse{\sq at segno<0}{-\sq at factor}{\sq at factor} 
+					}
+					{%
+					\ifthenelse{\sq at segno<0}{-\sq at factor\sqrt[\sq at ind]{\sq at rad}}{\sq at factor\sqrt[\sq at ind]{\sq at rad} }
+					}
+				}
+			}%
+			{%
+				\ifthenelse{\sq at segno<0}
+				{\PackageError{esami}{\es at radicalerror}}
+				{\ifthenelse{\equal{\sq at factor}{1}} 
+				{%
+					\ifthenelse{\equal{\sq at rad}{1}}
+						{1}
+						{%
+						\ifthenelse{\sq at ind=2}{\sqrt{\sq at rad}}{\sqrt[\sq at ind]{\sq at rad}}
+						} 
+				}%
+				{%
+					\ifthenelse{\equal{\sq at rad}{1}}
+						{\sq at factor}
+						{\ifthenelse{\sq at ind=2}
+							{\sq at factor\sqrt{\sq at rad}}
+							{\sq at factor\sqrt[\sq at ind]{\sq at rad}}
+						} 
+				}
+				}
+			}
+		}
+   }
 
 %========================================================%
 %               Coefficients of polynomial               %
@@ -487,9 +548,24 @@
 
 \newcommand{\FPsignpol}[2] %%% adapted from code contributed by Hjalmar Basile NEW 2016/04/11
 {\FPval\tempsign{#1}
-\ifthenelse{\equal{#2}{}}{\ifnum \tempsign<0 {\sempli{\tempsign}{1}#2}\else \ifnum \tempsign>0{+\sempli{\tempsign}{1}#2}\else{}\fi\fi}
-{\ifnum \tempsign<0 {\semplix{\tempsign}{1}#2}\else \ifnum \tempsign>0{+\semplix{\tempsign}{1}#2}\else{}\fi\fi}
-} %%% nuovo 2016/12/11 per termine noto
+	\ifthenelse{\equal{#2}{}}
+	{%
+		\ifnum \tempsign<0 {\:\sempli{\tempsign}{1}#2}
+		\else 
+			\ifnum \tempsign>0{\:+\:\sempli{\tempsign}{1}#2}
+			\else{}
+			\fi
+		\fi
+	}
+	{%
+		\ifnum \tempsign<0 {\:\semplix{\tempsign}{1}#2\:}
+		\else 
+			\ifnum \tempsign>0{\:+\:\semplix{\tempsign}{1}#2}
+			\else{}
+			\fi
+		\fi
+	}
+} %% improved for spacing 2021/10/11
 
 
 %========================================================%
@@ -501,8 +577,6 @@
 \def\es at l@l{\normalsize\normalfont(d)}
 \newcommand\PTs{\def\es at star{x}\@PTs}
 \def\@PTs#1{%
-%\addtolength{\punteggio}{#1 pt} %% NEW 2016/04/11 to check the total score of exercises
-%\global\punteggio=\punteggio
     \gdef\es at PTs{#1}\ifx\es at PTs\@empty\gdef\es at PTs{1}\fi
     \global\let\esPTs=\es at PTs\global\let\es at PTs=\@empty
     \if\es at star*\else\PTs at Hook\fi
@@ -512,35 +586,7 @@
 \let\qMark at Hook\@empty
 \newcommand{\post at questionsHook}{}
 \newcommand{\punti}{}
-%%=========================================================================%
-%%   Modified commands for parametric version in "totale-versioni"         %
-%%=========================================================================%
-%%%%
-%\ifes at param
-%\renewcommand{\FPsv}[2][0]{(#2)}%%% \FPsv shows oparations
-%\renewcommandx{\FPval}[3][2=0]{\expandafter\def\csname#1\endcsname{(#1)}
-%\immediate\write\params{%%% writes on a file
-%                \string\textbf\string{\string\noindent\space \es at parametermessagea{#1}{#3}
-%                \string}\string\newline}}
-%\renewcommand{\FPsignpol}[2]{+(#1)#2} %%% adapted from code contributed by Hjalmar Basile NEW 2016/04/11
-%\renewcommand{\simpsqrt}[2]{\sqrt[#1]{(#2)}}%%% \simpsqrt shows operations
-%\renewcommand{\sempli}[2]{%%% all simplifications become \frac
-%    \ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
-%    \renewcommand{\semplix}[2]{%
-%    \ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
-%    \renewcommand{\sempliz}[2]{%
-%    \ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
-%    \renewcommand{\esempli}[2]{%
-%    \ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
-%   \PTsHook{\emph{(\esPTs\ \ifthenelse{\equal{\esPTs}{\detokenize{1}}}{\es at pointname}{\es at pointsname})} %
-%   \ifes at test
-%     \immediate\closeout\params
-%     \fi
-%     }
-%\fi
 
-
-
 %========================================================%
 %           Commands adapted from eqexam                 %
 %========================================================%
@@ -595,46 +641,70 @@
 %%%%%%% Fill in %%%%%%
 \newcommand\fillinproblem{\es at fillintrue%
 \ifes at solutions
-\immediate\openout\parametri=qf\nome q\romannumeral\tmp at quest e\thevers.parametri.tex
+	\immediate\openout\parametri=qf\nome q\romannumeral\tmp at quest e\thevers.parametri.tex
 \fi
 }
 \ifes at solutions
-\def\fill at ans@color#1{\bfseries\color{red}{#1}}%%% with solutions answers are in red by default
-    \else
+	\def\fill at ans@color#1{\bfseries\color{red}{#1}}%%% with solutions answers are in red by default
+   \else
 \def\fill at ans@color#1{\phantom{#1}}%%% without solutions option -> no answers
-    \fi
+ \fi
 \newcommand{\fillin}[3][u]{%%% #1= the box (u=underlined, e=empty, b= boxed) #2= space for the answer, #3= the correct answer
 \space
     \ifx#1u\let\fillin at Fmt=\underbar%%% by default underlined space
-    \else\ifx#1e\let\fillin at Fmt=\relax%%% empty space
-    \else\ifx#1b\let\fillin at Fmt=\fbox%%% box
-    \fi\fi\fi
-     \fillin at Fmt{\parbox[b][.8\height][b]{#2}{%
-            \strut\hfil\fill at ans@color{#3}\hfil}%
-           \ifes at test
+    \else
+		\ifx#1e\let\fillin at Fmt=\relax%% empty space
+		\else
+			\ifx#1b\let\fillin at Fmt=\fbox%%% box
+			\fi
+		\fi
+	\fi
+\fillin at Fmt{\parbox[b][.8\height][b]{#2}{%
+    \strut\hfil\fill at ans@color{#3}\hfil}%
+        \ifes at test
            \ifes at prova
            \else
-\ifes at solutions%%% to write the string of solutions
-\immediate\write\sols{\string\item\space\string\makeatletter\space\string\input\string{qf\nome q\romannumeral\tmp at quest e\thevers.parametri\string}\string\makeatother}
-\immediate\write\sols{\unexpanded{#3}}
-\immediate\write\loe{\es at exercisename\space\theesquestionnoi:\space \probchosen}
-\fi
-\fi
-\fi
+				\ifes at solutions%%% to write the string of solutions
+				\immediate\write\sols{%
+				\string\item\space\string\makeatletter\space\string\input\string{qf\nome q\romannumeral\tmp at quest e\thevers.parametri\string}\string\makeatother}
+				\immediate\write\sols{\unexpanded{#3}}
+				\immediate\write\loe{\es at exercisename\space\theesquestionnoi:\space \probchosen}
+				\fi
+		\fi
+	\fi
  }
  }
 
 %%%%% Other commands %%%%%%
-\newcommand\stepverssols{\immediate\write\sols{\string\begin{minipage}{.33\string\textwidth}{\string\large\string\textbf{\es at solutionname\ \versionname\ n. \thevers}}}}
-\newcommand\closeverssols{\immediate\write\sols{\string\end{minipage}}}
+\newcommand\stepverssols%
+{%
+\immediate\write\sols
+	{%
+\string\begin{minipage}{.33\string\textwidth}{\string\large\string\textbf{\es at solutionname\ \versionname\ n. \thevers}}
+	}
+}
+\newcommand\closeverssols%
+{%
+\immediate\write\sols{\string\end{minipage}}
+}
+\newcommand\stepvers
+{%
+\stepcounter{vers}
+	\ifes at solutions\stepverssols
+	\immediate\write\loe{\versionname\space n. \thevers}
+	\fi
+}
+ \newcommand\closevers
+{%
+\newpage\setcounter{page}{1}
+\setcounter{ex at no}{0}
+	\ifes at solutions
+	\closeverssols
+	\immediate\write\loe{\space}
+	\immediate\write\loe{\space}
+   \fi
+}
 
-\newcommand\stepvers{\stepcounter{vers}\ifes at solutions\stepverssols
-\immediate\write\loe{\versionname\space n. \thevers}\fi}
-   \newcommand\closevers{\newpage\setcounter{page}{1}\setcounter{ex at no}{0}\ifes at solutions\closeverssols
-   \immediate\write\loe{\space}
-   \immediate\write\loe{\space}
-   \fi}
-
 \def\mydate#1/#2/#3\@empty{\setcounter{nomefile}{\two at digits{#1}\two at digits{#2}\two at digits{#3}}}%%% it gives to the counter "nomefile" a value determined by the date
 \PTsHook{\emph{(\esPTs\ \ifthenelse{\equal{\esPTs}{\detokenize{1}}}{\es at pointname}{\es at pointsname})}}%%% The name of the points
 \newcommand{\proofingsymbol}[1]{\def\@proofingsymbol{{#1}\hspace{-.3em}\es at segnala}}%%% this defines the symbol for the exact answer in MCQ and the label for the string of solutions
@@ -641,24 +711,34 @@
 \proofingsymbol{$\blacktriangleright$}%%% the proofing symbol that can be changed in document
 \newenvironment{gobbleenv}{\Collect at Body \@gobble}{}%%% this environment eats its content
 
-\AtBeginDocument{%%% the date and the date component of the seed and some code for solutions
+\AtBeginDocument%% the date and the date component of the seed and some code for solutions
+{%
     \def\longdate{\expandafter\es at longdate\@date\@empty}
     \def\shortdate{\expandafter\es at shortdate\@date\@empty}
     \expandafter\mydate\@date\@empty
-    \ifes at prova
-    \else
-\ifes at solutions
-\newwrite\sols
-\immediate\openout\sols=\jobname.sol.tex
-\newwrite\loe
-\immediate\openout\loe=\jobname.loe
-    \fi
-    \fi}
-\newcommand\es at segnala{%%% this command gives the reference of the exact answer in the string of solutions
-    \if\es at listType1\addtocounter{sq at quizno}{-1}\refstepcounter{sq at quizno}\fi
-\ifes at prova \else \label{\probchosen} \immediate\write\sols{ \string\item\string\ref{\probchosen}}
-\immediate\write\loe{\es at exercisename\space\theesquestionnoi:\space \probchosen} \fi
-    }
+		\ifes at prova
+		\else
+		\ifes at solutions
+			\newwrite\sols
+			\immediate\openout\sols=\jobname.sol.tex
+			\newwrite\loe
+			\immediate\openout\loe=\jobname.loe
+		\fi
+		\fi
+	}
+\newcommand\es at segnala%%% this command gives the reference of the exact answer in the string of solutions
+{%
+    \if\es at listType1
+		\addtocounter{sq at quizno}{-1}
+		\refstepcounter{sq at quizno}
+	\fi
+	\ifes at prova 
+	\else 
+		\label{\probchosen} 
+		\immediate\write\sols{\string\item\string\ref{\probchosen}}
+		\immediate\write\loe{\es at exercisename\space\theesquestionnoi:\space \probchosen} 
+	\fi
+ }
 \newcommand{\prior at questionsHook}{}
 
 %========================================================%
@@ -666,55 +746,61 @@
 %========================================================%
 \def\maxLoopLimit{10}%
 \ifes at param
-\newcommandx{\FPsetpar}[5][1=\seme,5={}]{%%% the parameters are not assigned
+\newcommandx{\FPsetpar}[5][1=\seme,5={}]{%      %% the parameters are not assigned
                 \expandafter\def\csname#2\endcsname{#2}%%% in the parametric version, the parameter appears with its name and not with its value
-              \immediate\write\params{%%% writes on a file
+              \immediate\write\params{% %% writes on a file
                 \string\textbf\string{\string\noindent\space \es at parametermessage{#2}{#3}{#4}
                 \space \ifx#5\@empty\else $#2\neq #5$.\fi\space \es at seedmessage{#1}
-                \string}\string\newline}}
+                \string}\string\newline}}%
                 \else
 \newcommandx{\FPsetpar}[5][1=\seme,5={}]{%
-\ifnum#3>#4\PackageError{esami}{\es at fpsetparerrshort{#2}}{\es at fpsetparerrlong{#2}}\fi%% NEW 2015
-\@ifundefined{nome}{\setcounter{fp at contatore}{-2}}{
-\@ifundefined{base\nome}{\setcounter{fp at contatore}{-2}}{\setcounter{fp at contatore}{-\csname base\nome \endcsname}}}
-\FPval{randomico}{\thevers+\then at par+\thequestionno+#1}
-\old at randomi=\number\randomi%%% it saves the old seed
+\ifnum#3>#4
+	\PackageError{esami}{\es at fpsetparerrshort{#2}}{\es at fpsetparerrlong{#2}}%
+\fi%
+\@ifundefined{nome}{\setcounter{fp at contatore}{-2}}{%
+	\@ifundefined{base\nome}{\setcounter{fp at contatore}{-2}}{\setcounter{fp at contatore}{-\csname base\nome \endcsname}}}%
+\FPeval{randomico}{round(\thevers+\then at par+\thequestionno+#1:0)}%
+\old at randomi=\number\randomi\relax%%% it saves the old seed
 \stepcounter{n at par}%
 \setcounter{fp at contatore}{-\value{vers}}%
-\randomi=\randomico%
-\ifnum#3>0 \addtocounter{fp at contatore}{-#3} \else \addtocounter{fp at contatore}{#3}\fi
+\randomi=\randomico\relax
+\ifnum#3>0 
+	\addtocounter{fp at contatore}{-#3}
+	\else 
+	\addtocounter{fp at contatore}{#3}%
+\fi%
 \whiledo{\value{fp at contatore}<\value{questionno}}{\nextrandom\stepcounter{fp at contatore}}%
 \setrannum{\tmp at a}{#3}{#4}%
 \def\rand at ne{#5}%%% checks the parameter (adapted from rangen)
-\ifx\rand at ne\@empty\else\loopCnt=0\relax%
-\@whilenum\loopCnt<\maxLoopLimit\do{%
-\rnd at cnt=1\relax%
-\@for\ne@@tmp:=\rand at ne\do{%
-\ifnum\tmp at a=\ne@@tmp\relax%
-\multiply\rnd at cnt0\relax%
-\else%
-\multiply\rnd at cnt1\relax%
-\fi%
+\ifx\rand at ne\@empty\else\loopCnt=0\relax
+	\@whilenum\loopCnt<\maxLoopLimit\do{%
+		\rnd at cnt=1\relax
+		\@for\ne@@tmp:=\rand at ne\do{%
+			\ifnum\tmp at a=\ne@@tmp\relax
+				\multiply\rnd at cnt0\relax
+			\else%
+				\multiply\rnd at cnt1\relax
+			\fi%
+		}%
+		\ifnum\rnd at cnt=1\relax%% all conditions are satisfied
+			\loopCnt=\maxLoopLimit\relax
+		\else%
+			\advance\loopCnt1\relax
+				\ifnum\loopCnt=\maxLoopLimit
+					\PackageError{esami}{\es at fpsetparerrorshort}{\es at fpsetparerrorshort}%
+				\else%
+					\setrannum{\tmp at a}{#3}{#4}%
+				\fi%
+			\fi%
+		}%
+	\fi%
+	\FPeval{#2}{round(\number\tmp at a:0)}%
+	\ifes at fillin
+		\immediate\write\parametri{\string\FPeval\string{#2\string}\string{round(\number\tmp at a:0)\string}}%
+	\fi
+	\randomi=\number\old at randomi%%%  restores the seed
 }%
-\ifnum\rnd at cnt=1\relax%%% all conditions are satisfied
-\loopCnt=\maxLoopLimit%
-\else%
-\advance\loopCnt1\relax%
-\ifnum\loopCnt=\maxLoopLimit%
-\PackageError{esami}{\es at fpsetparerrorshort}{\es at fpsetparerrorshort}%
-\else%
-\setrannum{\tmp at a}{#3}{#4}%
 \fi%
-\fi%
-}%
-\fi%
-\FPeval{#2}{round(\number\tmp at a:0)}%
-\ifes at fillin%
-\immediate\write\parametri{\string\FPeval\string{#2\string}\string{round(\number\tmp at a:0)\string}}%
-\fi%
-\randomi=\number\old at randomi%%% restores the seed
-}%
-\fi
 
 %%%% Command for random sign (taken from rangen)  %%%%%
 \newcommand{\RandS}{%
@@ -731,25 +817,26 @@
 %%%
 \ifes at param
 \renewcommand{\FPsv}[2][0]{(#2)}%%% \FPsv shows oparations
-\renewcommandx{\FPval}[3][2=0]{\expandafter\def\csname#1\endcsname{(#1)}
+\renewcommandx{\FPval}[3][2=0]
+{%
+\expandafter\def\csname#1\endcsname{(#1)}
 \immediate\write\params{%%% writes on a file
-                \string\textbf\string{\string\noindent\space \es at parametermessagea{#1}{#3}
-                \string}\string\newline}}
+\string\textbf\string{\string\noindent\space \es at parametermessagea{#1}{#3}\string}\string\newline
+}
+}
 \renewcommand{\FPsignpol}[2]{+(#1)#2} %%% adapted from code contributed by Hjalmar Basile NEW 2016/04/11
 \renewcommand{\simpsqrt}[2]{\sqrt[#1]{(#2)}}%%% \simpsqrt shows operations
 \renewcommand{\sempli}[2]{%%% all simplifications become \frac
     \ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
-    \renewcommand{\semplix}[2]{%
-    \ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
-    \renewcommand{\sempliz}[2]{%
-    \ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
-    \renewcommand{\esempli}[2]{%
-    \ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
-   \PTsHook{\emph{(\esPTs\ \ifthenelse{\equal{\esPTs}{\detokenize{1}}}{\es at pointname}{\es at pointsname})} %
+    \renewcommand{\semplix}[2]{\ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
+    \renewcommand{\sempliz}[2]{\ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
+    \renewcommand{\esempli}[2]{\ifthenelse{\equal{#2}{1}}{(#1)}{\frac{#1}{#2}}}
+   \PTsHook{%
+   \emph{(\esPTs\ \ifthenelse{\equal{\esPTs}{\detokenize{1}}}{\es at pointname}{\es at pointsname})} %
    \ifes at test
      \immediate\closeout\params
-     \fi
-     }
+    \fi
+					}
 \fi
 
 % +===================================+
@@ -763,17 +850,16 @@
 \newcolumntype{$}{>{\global\let\currentrowstyle\relax}}
 \newcolumntype{^}{>{\currentrowstyle}}
 \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}#1\ignorespaces}
-\ifes at solutions
-\colorlet{tab at ans@color}{red}
-\newcolumntype{C}[1]{>{\color{tab at ans@color}}#1}%%% the column of the solutions is red (option solution)
-\else
-\def\cancella#1\finqui{\phantom{#1}}
-\newcolumntype{C}[1]{>{\cancella}#1<{\finqui}}%%% the column of the solutions is empty (exam)
-\fi
+	\ifes at solutions
+		\colorlet{tab at ans@color}{red}
+		\newcolumntype{C}[1]{>{\color{tab at ans@color}}#1}%%% the column of the solutions is red (option solution)
+	\else
+		\def\cancella#1\finqui{\phantom{#1}}
+		\newcolumntype{C}[1]{>{\cancella}#1<{\finqui}}%%% the column of the solutions is empty (exam)
+	\fi
 \newenvironment{tabella}[3][2]{\bigskip%%% open answers in columns #1=n. of visible columns (+1 invisible), #2={r,c,l} alignment of visible columns,  #3={r,c,l} alignment of invisible column
 \renewcommand\arraystretch{2}
-\begin{tabular}{$#2*{#1}{|^C#3}}  }{
-\end{tabular} \renewcommand\arraystretch{1}}
+\begin{tabular}{$#2*{#1}{|^C#3}}  }{\end{tabular} \renewcommand\arraystretch{1}}
 
 %========================================================%
 %         Risposta                                       %
@@ -780,16 +866,23 @@
 %========================================================%
 
 \ifes at solutions
-\newenvironment{risposta}[2][l]{\relax}{}
+	\newenvironment{risposta}[2][l]{\relax}{}
 \else
-\newenvironment{risposta}[2][b]{% #1={b,l} box or lines, #2= heigth of box or number of lines
-\setlength{\es at rig}{#2cm minus 12pt}
-    \ifx#1b  \fbox{\parbox[b][\es at rig]{\textwidth}{\vfill\hfill }}
-    \else
-        \ifx#1l \setcounter{risp at righe}{-#2}\stepcounter{risp at righe}
-{\whiledo{\therisp at righe < #2}
-{ \par \vspace{.2cm} \dotfill \stepcounter{risp at righe}}}\else \fi\fi}
-{}
+	\newenvironment{risposta}[2][b]{% #1={b,l} box or lines, #2= heigth of box or number of lines
+	\setlength{\es at rig}{#2cm minus 12pt}
+		\ifx#1b  
+			\fbox{\parbox[b][\es at rig]{\textwidth}{\vfill\hfill }}
+		\else
+			\ifx#1l 
+				\setcounter{risp at righe}{-#2}\stepcounter{risp at righe}
+				{%
+				\whiledo{\therisp at righe < #2}
+					{\par \vspace{.2cm} \dotfill \stepcounter{risp at righe}}
+				}
+			\else 
+			\fi
+		\fi}
+	{}
 \fi
 
 %========================================================%
@@ -803,9 +896,9 @@
 \expandafter\edef\csname match at num\thematch at q\endcsname{\thematch at q}
 }
 \ifes at solutions
-\def\match at ans@color#1{\bfseries\color{red}{#1}}%%% visible solutions in red (solutions)
+	\def\match at ans@color#1{\bfseries\color{red}{#1}}%%% visible solutions in red (solutions)
 \else
-\def\match at ans@color#1{\phantom{#1}}%%% invisible solutions (exam)
+	\def\match at ans@color#1{\phantom{#1}}%%% invisible solutions (exam)
 \fi
 \newcommand{\matching}{%%% it generates the 2 columns
 \@getitemsr \@getitemsl
@@ -812,35 +905,34 @@
 \vspace{5mm}
 \setcounter{match at q}{0}
 }
-\def\@getitemsl{%%% left column and shuffle of items
+\def\@getitemsl%%% left column and shuffle of items
+{%
 \i at sh=\thematch at q
 \loop
-\expandafter\let \csname flag\number\i at sh\endcsname a%
-\advance\i at sh by-1
-\ifnum\i at sh > 0 \repeat
+	\expandafter\let \csname flag\number\i at sh\endcsname a%
+	\advance\i at sh by-1
+	\ifnum\i at sh > 0 \repeat
 \i at sh=\thematch at q
 \loop
-\setrannum{\j at sh}{1}{\thematch at q}
-\expandafter\ifx \csname flag\number\j at sh\endcsname a%
-\expandafter\let \csname flag\number\j at sh\endcsname b%%% Sets the flag.
-\expandafter\edef\csname match at qsti\number\i at sh\endcsname{\noexpand\csname match at qstii\number\j at sh\endcsname}
-\setcounter{match at plu}{\thematch at q}
-\addtocounter{match at plu}{-\csname match at numii\number\j at sh\endcsname}
-\addtocounter{match at plu}{1}
-\setcounter{match at plo}{\thematch at q}
-\addtocounter{match at plo}{- \number\i at sh}
-\addtocounter{match at plo}{1}
-\expandafter\edef\csname match at numi\number\i at sh\endcsname{(\Alph{match at plu})}
-\vspace{2ex}
-
-\begin{tabular}{p{.05\textwidth}p{.40\textwidth}p{.01\textwidth}p{.40\textwidth}}
-\underbar{\makebox[.5cm]{\match at ans@color{\csname match at numi\number\i at sh\endcsname}}}  & \csname match at qsti\number\i at sh\endcsname&&(\Alph{match at plo})\hspace{3mm}\csname match at ansi\number\i at sh\endcsname%\tabularnewline
-\end{tabular}
-      \advance\i at sh by-1
-      \ifnum\i at sh > 0 \fi
-    \fi
-    \ifnum\i at sh > 0
-\repeat
+	\setrannum{\j at sh}{1}{\thematch at q}
+	\expandafter\ifx \csname flag\number\j at sh\endcsname a%
+	\expandafter\let \csname flag\number\j at sh\endcsname b%%% Sets the flag.
+	\expandafter\edef\csname match at qsti\number\i at sh\endcsname{\noexpand\csname match at qstii\number\j at sh\endcsname}
+	\setcounter{match at plu}{\thematch at q}
+	\addtocounter{match at plu}{-\csname match at numii\number\j at sh\endcsname}
+	\addtocounter{match at plu}{1}
+	\setcounter{match at plo}{\thematch at q}
+	\addtocounter{match at plo}{- \number\i at sh}
+	\addtocounter{match at plo}{1}
+	\expandafter\edef\csname match at numi\number\i at sh\endcsname{(\Alph{match at plu})}
+	\vspace{2ex}
+	\begin{tabular}{p{.05\textwidth}p{.40\textwidth}p{.01\textwidth}p{.40\textwidth}}
+	\underbar{\makebox[.5cm]{\match at ans@color{\csname match at numi\number\i at sh\endcsname}}}  & \csname match at qsti\number\i at sh\endcsname&&(\Alph{match at plo})\hspace{3mm}\csname match at ansi\number\i at sh\endcsname%\tabularnewline
+	\end{tabular}
+ \advance\i at sh by-1
+ \ifnum\i at sh > 0 \fi
+ \fi
+    \ifnum\i at sh > 0\repeat
 }
 \def\@getitemsr{%%% right column and shuffle of tems
 \i at sh=\thematch at q
@@ -871,64 +963,67 @@
 
 \newif\iffirstpass
 \ifes at prova
-\newcommand{\newproblem}[1]{%%% \newproblem for the file "totale-versioni"
-\advance\tmp at quest by1
-\iffirstpass
-\global\advance\@probN by 1
-\else
-\let\nome\currfilebase
-\global\def\problabel{e:\thevers-file:\nome}
-\global\def\probnumber{q:\romannumeral\tmp at quest}
-    \ifes at fillin
-    \immediate\openout\parametri=qf\nome q\number\j at n e\thevers.parametri.tex
-    \fi
-\expandafter\global\expandafter\newcommand\csname \probnumber \endcsname{#1}
- \fi
+	\newcommand{\newproblem}[1]%% \newproblem for the file "totale-versioni"
+{%
+	\advance\tmp at quest by1
+		\iffirstpass
+		\global\advance\@probN by 1
+		\else
+		\let\nome\currfilebase
+		\global\def\problabel{e:\thevers-file:\nome}
+		\global\def\probnumber{q:\romannumeral\tmp at quest}
+			\ifes at fillin
+			\immediate\openout\parametri=qf\nome q\number\j at n e\thevers.parametri.tex
+			\fi
+		\expandafter\global\expandafter\newcommand\csname \probnumber \endcsname{#1}
+		\fi
 }
 \else
     \ifes at correzione
-    \newcommand{\newproblem}[1]{%%% \newproblem for the "correzione" option
-\advance\tmp at quest by1
-    \iffirstpass
-    \global\advance\@probN by 1
-    \else
-   \let\nome\currfilebase
-   \global\def\problabel{e:\thevers-file:\nome}
-\global\def\probnumber{q:\romannumeral\tmp at quest}
-    \ifes at fillin
-    \immediate\openout\parametri=qf\nome q\romannumeral\tmp at quest e\thevers.parametri.tex
-    \fi
-\expandafter\global\expandafter\newcommand\csname @prob-\problabel-\probnumber \endcsname{\unexpanded{#1}}
-    \expandafter\global\expandafter\newcommand\csname @probi-\problabel-\probnumber \endcsname{#1}
-    \fi
-    }
-    \else
-\newcommand{\newproblem}[1]{%%% \newproblem for the exam
-\advance\tmp at quest by1
-\iffirstpass
-\global\advance\@probN by 1
-\else
-\let\nome\currfilebase
-\global\def\problabel{e:\thevers-file:\nome}
-\global\def\probnumber{q:\romannumeral\tmp at quest}
-\ifes at fillin
-\ifes at solutions%%% to write the string of solutions
-\immediate\openout\parametri=qf\nome q\romannumeral\tmp at quest e\thevers.parametri.tex
-\fi
-\fi
-
-\expandafter\global\expandafter\newcommand\csname @prob-\problabel-\probnumber \endcsname{\unexpanded{#1}}
-\expandafter\global\expandafter\newcommand\csname @probi-\problabel-\probnumber\endcsname{#1}%%% it assigns a unique name to exercise
-\fi
+    \newcommand{\newproblem}[1]%% \newproblem for the "correzione" option
+    {%
+	\advance\tmp at quest by1
+		\iffirstpass
+		\global\advance\@probN by 1
+		\else
+		\let\nome\currfilebase
+		\global\def\problabel{e:\thevers-file:\nome}
+		\global\def\probnumber{q:\romannumeral\tmp at quest}
+			\ifes at fillin
+			\immediate\openout\parametri=qf\nome q\romannumeral\tmp at quest e\thevers.parametri.tex
+			\fi
+		\expandafter\global\expandafter\newcommand\csname @prob-\problabel-\probnumber \endcsname{\unexpanded{#1}}
+		\expandafter\global\expandafter\newcommand\csname @probi-\problabel-\probnumber \endcsname{#1}
+		\fi
 }
+	\else
+	\newcommand{\newproblem}[1]%% \newproblem for the exam
+	{%
+	\advance\tmp at quest by1
+		\iffirstpass
+		\global\advance\@probN by 1
+		\else
+		\let\nome\currfilebase
+		\global\def\problabel{e:\thevers-file:\nome}
+		\global\def\probnumber{q:\romannumeral\tmp at quest}
+			\ifes at fillin
+				\ifes at solutions%%% to write the string of solutions
+				\immediate\openout\parametri=qf\nome q\romannumeral\tmp at quest e\thevers.parametri.tex
+				\fi
+			\fi
+		\expandafter\global\expandafter\newcommand\csname @prob-\problabel-\probnumber \endcsname{\unexpanded{#1}}
+		\expandafter\global\expandafter\newcommand\csname @probi-\problabel-\probnumber\endcsname{#1}%%% it assigns a unique name to exercise
+		\fi
+	}
+	\fi
 \fi
-\fi
 
 \newcommand{\newfillinproblem}[1]{ \newproblem{\fillinproblem #1}}
 
 %%%%%%%% \selectrandomly %%%%%%%
 
-\newcommand{\selectrandomly}[1]{%
+\newcommand{\selectrandomly}[1]
+{%
 \global\@probN=0\relax
 \firstpasstrue
 \tmp at quest=0
@@ -936,7 +1031,7 @@
 \firstpassfalse%%% now prints the question
 \tmp at quest=0
 \input{#1}
-\@ifundefined{base\nome}{\old at random=\number\randomi %%% 2015/01/16
+\@ifundefined{base\nome}{\old at random=\number\randomi 
 \randomi=\semeex
 \setrannum{\rnd at cnta}{1}{\@probN}
 \randomi=\number\old at random
@@ -944,10 +1039,9 @@
 }{}
 \old at rando=\number\randomi
 		\randomi=\semeex
-\ifthenelse{\number\semeex=\number\seme}{
-\FPeval\restotrentasei{round(\thevers+\thenomefile+1+base\nome-trunc((\thevers+\thenomefile+base\nome)/36:0)*36:0)}}{
-\FPeval\restotrentasei{round(1+\thenomefile+1+base\nome-trunc((1+\thenomefile+base\nome)/36:0)*36:0)}
-}
+\ifthenelse{\number\semeex=\number\seme}
+{\FPeval\restotrentasei{round(\thevers+\thenomefile+1+base\nome-trunc((\thevers+\thenomefile+base\nome)/36:0)*36:0)}}
+{\FPeval\restotrentasei{round(1+\thenomefile+1+base\nome-trunc((1+\thenomefile+base\nome)/36:0)*36:0)}}
 \randomi=\number\old at rando     %%% AGGIUNTO 2018/04/28 per giro sbagliato
 \ifcase\@probN\or
 \def\j at n{1}%%% just one variant
@@ -1015,6 +1109,7 @@
     }{
 \csname @probi-\problabel-q:\romannumeral\j at m \endcsname
  }%
+ \Acapo
     \fi
 \par\vspace{2mm}
     \ifes at param%
@@ -1862,7 +1957,7 @@
 \immediate\write\params{\es at EstraiMessage{#2}{#3}}%%% writes to a file
                  \immediate\closeout\params
 }
-\newcommand{\estraialfa}[3]{
+\newcommand{\estraialfa}[3]{%
 \beg at al=#1
 \loop
 \expandafter\edef\csname #3\romannumeral\beg at al \endcsname{(#3\romannumeral\beg at al)}



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