texlive[41774] Master/texmf-dist: esami (27jul16)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 31 01:11:22 CEST 2016


Revision: 41774
          http://tug.org/svn/texlive?view=revision&revision=41774
Author:   karl
Date:     2016-07-31 01:11:21 +0200 (Sun, 31 Jul 2016)
Log Message:
-----------
esami (27jul16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/esami/README
    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/testA-sol.pdf
    trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.tex
    trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA.pdf
    trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA.tex
    trunk/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg
    trunk/Master/texmf-dist/tex/latex/esami/es-UKenglish.lng
    trunk/Master/texmf-dist/tex/latex/esami/es-USenglish.lng
    trunk/Master/texmf-dist/tex/latex/esami/es-french.lng
    trunk/Master/texmf-dist/tex/latex/esami/es-german.lng
    trunk/Master/texmf-dist/tex/latex/esami/es-greek.lng
    trunk/Master/texmf-dist/tex/latex/esami/es-italian.lng
    trunk/Master/texmf-dist/tex/latex/esami/es-serbian.lng
    trunk/Master/texmf-dist/tex/latex/esami/es-spanish.lng
    trunk/Master/texmf-dist/tex/latex/esami/esami.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/esami/VERSION

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/esami/doc/examples/esami-xyz.cfg
    trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.loe

Modified: trunk/Master/texmf-dist/doc/latex/esami/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/README	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/README	2016-07-30 23:11:21 UTC (rev 41774)
@@ -1,7 +1,7 @@
-                     The esami package
+The esami package v. 2.1
           For generation of texts and solutions  of exams in LaTeX
+2016/07/25 
 
-
 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--2015 Grazia Messineo & Salvatore Vassallo
+Copyright:  (C) 2008--2016 Grazia Messineo & Salvatore Vassallo
 Licence:    LPPL
 
 FILES IN DISTRIBUTION
@@ -21,7 +21,8 @@
 =====================
 
    BASE DISTRIBUTION:
-
+    
+      VERSION 
       README        This file.
       esami.sty     The main file
       xyz.cfg       A template of configuration file
@@ -29,18 +30,19 @@
 
    DOCUMENTATION:
 
-     doc-esami-en.pdf  User manual in English
-     doc-esami-it.pdf  User manual in Italian
-     doc-esami-*.tex   Sources for documentation
-     
+     esami-doc-en.pdf  User manual in English
+     esami-doc-it.pdf  User manual in Italian
+     esami-doc-*.tex   Sources for documentation
+     esami.bib    Source for references
+    
    EXAMPLES:
    Templates for the production of exams with solutions
-        master-sol.tex      
-        master.tex   
-        
+        master-sol.tex
+        master.tex
+
    Template of file for testing exercise
         totale-versioni.tex
-               
+
    Exercises for test
         test1.tex
 		test2.tex
@@ -53,7 +55,7 @@
 		test13.tex
 		test14.tex
 		
-    Exercises with open answers 
+    Exercises with open answers
         problem1.tex
 		problem2.tex
         problem2-tabella.tex
@@ -60,7 +62,7 @@
         problem3-matching.tex
         problem4-fillin.tex
 
-    Examples of an exam (and solutions) built using above exercises  using pdflatex, xelatex and lualatex    
+    Examples of an exam (and solutions) built using above exercises  using pdflatex, xelatex and lualatex
         testA.pdf
         testA.tex
 		testA-luatex-sol.pdf
@@ -76,7 +78,7 @@
 BASIC INSTALLATION
 ====================
 
-File sty and files cfg and lng must be copied in a folder where LATEX can find them 
+File sty and files cfg and lng must be copied in a folder where LATEX can find them
 
    For a basic installation on a TDS compliant system, move the
    following files to the following directories:
@@ -86,9 +88,9 @@
       xyz.cfg       A template of configuration file
       es-*.lng      Localisation files
 
-    
+
      <texmf>/doc/latex/esami/
          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 
\ No newline at end of file

Added: trunk/Master/texmf-dist/doc/latex/esami/VERSION
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/VERSION	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/esami/VERSION	2016-07-30 23:11:21 UTC (rev 41774)
@@ -0,0 +1 @@
+VERSION 2.1 DATE=July 25, 2016

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	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex	2016-07-30 23:11:21 UTC (rev 41774)
@@ -13,7 +13,7 @@
 \usepackage{hologo}
 %\usepackage{textcomp}
 \usepackage{lmodern}
-\usepackage{comandi}
+%\usepackage{comandi}
 \usepackage[utf8]{inputenc}
 \usepackage[english]{babel}
 \usepackage{graphicx}
@@ -73,8 +73,9 @@
 \changes{Version 1.0}{2013/03/08}{First version released to CTAN}
 \changes{Version 1.1}{2013/12/09}{Inserted the dependance on the package \texttt{environ} to remove some errors in the \LaTeX\ compilation. Removed the dependance on the package \texttt{icomma} in the italian localization file es-italian.lng because of the introduction of new features in the package \texttt{babel} for the Italian language (macro \texttt{IntelligentComma}).}
 \changes{Version 2.0}{2015/02/25}{Eliminated the dependance on \texttt{pstricks}. Modified the use of \emph{fill-in} questions. Inserted the possibility to extract more than one variant from a file. Now it is possible to view the solutions in tests. Modified the visualization of decimal places in command  \texttt{FPsv}. Modified the definition of \texttt{FPval} to allow the use of decimal places. Modified the algorithm of choice of a variant of an exercise, now completely deterministic. Added the command \texttt{Acapo}. Added the serbian localization (latin alphabet). The compilation produces a new file with the list of the chosen exercises.}
+\changes{Versione 2.1}{2016/07/25}{Modified \texttt{es-german.lng} and \texttt{es-spanish.lng} for an error  in the input of the solutions. The command \texttt{randestrai} has been introduced. The command \texttt{FPsignpol} has been introduced. The control on the total points of the exercises has been introduced.  Removed the incompatibility between the command  \texttt{fillin} and the commands  \texttt{sempli} and \texttt{semplix}.}
 
-\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.}
+%\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}}
 \def\MacroFont{\fontencoding\encodingdefault
 \fontfamily\ttdefault
@@ -82,8 +83,8 @@
 \fontshape\updefault
 \footnotesize}
 \GetFileInfo{esami.sty}
-\def\fileversion{version 2.0}
-\def\filedate{2015/02/25}
+\def\fileversion{version 2.1}
+\def\filedate{2016/07/1}
 
 
  \title{Package esami\thanks{This document
@@ -108,7 +109,7 @@
 
 The development of the package has begun in 2008 (\cite{esami}, \cite{tug}) with the aim of unify and extend some properties of the packages \pkgname{exerquiz} e \pkgname{eqexam} by D.P. Story \cite{acrotex} and \pkgname{probsoln} by N.Talbot \cite{probsoln}.
 \section{Required packages}
-Package \pkgname{esami} depends on some other non standard packages\footnote{The complete list of the packages used in a normal compilation of an exam is: graphicx,  enumerate, fp, currfile, array, environ, ifthen, xargs, xkeyval, multicol, amssymb, amsfonts, xcolor, babel, etoolbox, icomma, numprint, amsmath, fontenc, inputenc, lmodern. Obviously, every loaded package can have other dependencies.}:
+Package \pkgname{esami} depends on some other non standard packages\footnote{The complete list of the packages used in a normal compilation of an exam is: etex, graphicx,  enumerate, fp, currfile, array, environ, ifthen, xargs, xkeyval, multicol, amssymb, amsfonts, xcolor, babel, etoolbox, icomma, numprint, amsmath, fontenc, inputenc, lmodern. Obviously, every loaded package can have other dependencies.}:
 \begin{enumerate}
 \item \pkgname{fp}: for mathematical operations;
 \item \pkgname{currfile}: to obtain the file and folder names;
@@ -142,7 +143,7 @@
 Options are discussed in section \ref{sec:opzioni}.
 \begin{verbatim}
 \def\numcompiti{10}
-\date{2013/04/21}%%% THE DATE IN THE FORMAT YYYY/MM/DD
+\date{2018/04/21}%%% THE DATE IN THE FORMAT YYYY/MM/DD
 \def\Data{\longdate}%%% or \shortdate: the date in the heading
 \end{verbatim}
 Command \cmd{\date} is the standard \LaTeX\ command, but the date must be written in the form YYYY/MM/DD. Command \cmd{\numcompiti} states the number of versions to generate. Command \cmd{\Date} now prints the date in the form DD MMMM YYYY (\cmd{\longdate}) or DD/MM/YYYY
@@ -162,6 +163,8 @@
 \randomi=\seme
 \end{verbatim}
 generates the seed for the randomization process and assigns it also to \cmd{\randomi}.
+
+\textcolor[rgb]{1.00,0.00,0.00}{\textbf{N.B.} If the seed is a number smaller than 1, it is initialized using date and hour, so two compilations will give different outputs.}
 \begin{verbatim}
 \permuta
 \testa
@@ -192,8 +195,12 @@
 \end{verbatim}
 It ends the routine for the compilation. The macro \verb+\def\stringasol{}+ is used to avoid the generation of the string of correct answers in the solution file, if you don't want it.
 
-The compilation produces a pdf file with all the desired variants. The compilation of the solutions file produces also another file, namely \texttt{filename-sol.loe} (loe = list of exercises) which contains the labels assigned to the chosen exercises, to identify them: each chosen exercise is identified by a string such as \emph{e:number of version -file:name of file-q:number of question in roman digits}. \nuovo{vers. 2.0}
+\nuovo{vers. 2.0} The compilation produces a pdf file with all the desired variants. The compilation of the solutions file produces also another file, namely \texttt{filename-sol.loe} (loe = list of exercises) which contains the labels assigned to the chosen exercises, to identify them: each chosen exercise is identified by a string such as \emph{e:number of version -file:name of file-q:number of question in roman digits}.
 
+\nuovo{vers. 2.1} At the end of the solutions file there is the string of the correct answers for multiple choice questions: as a default behaviour this string is, for each version, included in a \envname{minipage} environment. If this choice is not suitable for our purposes (i. e. if we have 40 multiple choice questions and the answers cannot be contained in a page) it is possibile to modify it adapting the macros \cmd{\stepverssols} and \cmd{\closeverssols}: in the example cfg file there are (commented) the definitions to have a continuous string of correct answers.   		
+	  		
+During the compilation, we have introduced a control that checks if the number of points marked for a test or an exercises divided in parts is equal to the sum of the partial points. \nuovo{vers. 2.1}
+
 \section{Package options}\label{sec:opzioni}
 The package can be loaded with the usual command
 \cmd{\usepackage}[\meta{options}]\{esami\}. The possibile options are:
@@ -209,7 +216,7 @@
     \item \optname{prova}:  it is the Italian word for trial. Compiling the  file \verb|totale-versioni| with this option,  a PDF file is generated with all the variants of an exercise; automatically  the correct answers of MCQ and the solutions of the exercises are shown;
     \item \optname{param}: with this option, used only in conjunction with the option \optname{prova}, the versions of the exercise are printed in parametric form, moreover it shows the range of variation of the parameters;
     \item \optname{correzione}: it is the Italian word for correction. It can be used only with the option \optname{prova}. It prints only the text of all the exercises, without solution;
-   \item  \optname{fillb}: it is an old option not anymore used, it remains for compatibility with old versions; \nuovo{vers. 2.0}
+   \item  {\color{blue}{\optname{fillb}}}: deprecated, it remains for compatibility with previous versions. It is used with ``fillin'' exercises, but it is recommended to use the macro \cmd{\fillinproblem} (see \ref{par:fillin})\nuovo{vers. 2.0}
    \item \optname{twocolumns}: with this option the multiple choice questions are printed in two columns;
    \item  \optname{sansserif}: a  \textit{sans serif} font is used.
     \item \optname{autopston} e \optname{autopstoff}: both these options load the packages  \pkgname{pstricks}, \pkgname{pstricks-add} and \pkgname{auto-pst-pdf} but the second one with the option \optname{off}; in this way it is possible to compile the file directly with pdf\LaTeX\ also if the exercises contain graphics in \pkgname{pstricks}, the graphics package we use. With the first one the images are generated and included in the document, while the second one does not generate the images but includes them if they exist.\VerbatimFootnotes
@@ -223,7 +230,7 @@
  Each exercise (with all its variants) must be written in a separate file.
 \DescribeMacro{\newproblem}
 Each variant is enclosed in the command
-\cmd{\newproblem\{ .... \}} (which has no optional arguments).
+\cmd{\newproblem\{ \dots \}} (which has no optional arguments).
 \begin{esempio}
 \begin{verbatim}
 %%% This is file1.tex with 2 variants of an exercise
@@ -272,7 +279,7 @@
 \end{verbatim}
 The mandatory parameter is the name of each exercise you want to insert into the test, separated by a comma\footnote{We will describe other similar commands for loading the exercises in subsection \ref{list}.}.
 
-It is possibile both to insert all the exercises in a unique command and to use more than one command \cmd{\esercizi} or \cmd{\estraies} (see \ref{estraies}).\label{duecolonne}
+It is possibile both to insert all the exercises in a unique command and to use more than one command \cmd{\esercizi} or \cmd{\estraies} or \cmd{\randestraies} (see \ref{estraies} and \ref{randestraies}).\label{duecolonne}
 This is useful for example if you want exercises from two different subsets (5 exercises  on limits chosen among 7 and 3 exercises on derivatives chosen among 5) or if you want to have some exercises on two columns and other on one column, for a better layout of the page. In this case you must precede the part on two columns with
 \cmd{\begin\{multicols\}\{2\}} and end it with \cmd{\end\{multicols\}}. You \textbf{must not} use option \optname{twocolumns}.
 \begin{esempio}
@@ -300,7 +307,8 @@
 In the file of the exercises, in
 \cmd{\newproblem} you must write:
 \begin{verbatim} \item \PTs{points}
-...text... \begin{answers}{number of columns}
+...text...
+\begin{answers}{number of columns}
     \bChoices[random]
 \Ans0 wrong answer \eAns
 \Ans0 wrong answer \eAns
@@ -375,6 +383,9 @@
 
 Besides MCQ, you can use in the environment \envname{test} other kinds of questions, that will be described in section \ref{sec:altri_esercizi}.  Unfortunately using  \texttt{fill-in} type exercises, if you have more than one blank space to fill, the string of correct answers will be less useful because the numbering of the questions is wrong.
 
+\textbf{N.B.} By default each question of the test is enclosed in \envname{minipage} environment.  In the example cfg file there are some commented lines which allow to have questions out of this environment.   		
+	
+
 \subsection{Environments problem and problem*}
 \DescribeEnv{problem}
 \DescribeEnv{problem*}
@@ -421,9 +432,15 @@
 \end{parts}  \end{problem*}
   \end{verbatim}
 The argument \cmd{\PTs\{partial score\}} contains the points of each part.
+
+\paragraph{Exercises in a minipage}   		
+	\DescribeEnv{problemmp}   		
+	\DescribeEnv{problemmp*}   		
+	We have also created the environments \envname{problemmp} and \envname{problemmp*} \nuovo{vers. 2.1} which are identical to the environments \envname{problem} and \envname{problem*},  but enclose all the text of the problem in a \envname{minipage} environment.   		
+	
 \subsection{Other kinds of exercise}\label{sec:altri_esercizi}
 We have defined other new kinds of exercise:
-\paragraph{fillin:} \DescribeMacro{\fillin}
+\paragraph{fillin:}\label{par:fillin} \DescribeMacro{\fillin}
 it is used to create exercises in which some parts of the text is left blank and must be filled  by the student. It can also be used to create exercises with an open short answer. This kind of exercise is similar to the one introduced by D. P. Story in \pkgname{eqexam}.
 
 These exercises are introduced with a slightly different syntax and they are defined in the text by the command \cmd{\newfillinproblem} or by \cmd{\newproblem}\cmd{\fillinproblem}\texttt{\{text of the problem\}}. \nuovo{vers. 2.0}
@@ -432,7 +449,7 @@
 
   The two mandatory parameters are the width of the blank space, expressed as a length, and the correct answer (text or number) that the student has to write: it will be printed only in the solutions.
 The optional parameter \meta{type} defines the way in which the blank space is denoted: \texttt{u} (\emph{underlined}), the default, produces an underlined space,  \texttt{b} (\emph{boxed}) produces a little box , \texttt{e} (\emph{empty}) produces an empty space.
-In the blank space it is not possible to use the commands \cmd{\sempli} or \cmd{\semplix} (see Section \ref{sec:comandi}).
+%In the blank space it is not possible to use the commands \cmd{\sempli} or \cmd{\semplix} (see Section \ref{sec:comandi}).
 
 This kind of exercise cannot be used, at the moment, with \Hologo{XeLaTeX} or \Hologo{LuaLaTeX}.
 \paragraph{domanda:}\DescribeEnv{domanda} (the word ``domanda'' means ``question'' in Italian)
@@ -695,6 +712,22 @@
 \end{tabular}
     \end{esempio}
     \item {\color{blue}{\cmd{\RandS}}}:\DescribeMacro{\RandS}\ it is used to give a random sign ($+$ o $-$) to a number. The command is similar to the one of the package \pkgname{rangen}.
+
+    \item {\color{blue}{\cmd{\FPsignpol}\marg{expression}}}:\DescribeMacro{\FPsignpol}\ gives the value of  ``expression'' with its sign: it is useful, for example, if ``expression'' is the coefficient of a polynomial. This macro has been contributed by Hjalmar Basile. \nuovo{vers. 2.1}   		
+	       \begin{esempio}   		
+	  		
+	Se  $a$ vale $2$ e $b$ vale $-1$   		
+	  		
+	     \begin{tabular}{lr}   		
+	\verb|$x^2\FPsignpol{2}{a+4*b}x-2$| & $x^2-2x-2$   		
+	\end{tabular}   		
+	  		
+	Se  $a$ vale $2$ e $b$ vale $1$   		
+	  		
+	     \begin{tabular}{lr}   		
+	\verb|$x^2\FPsignpol{2}{a+4*b}x-2$| & $x^2+6x-2$   		
+	\end{tabular}   		
+	   \end{esempio}
 \end{itemize}
 \subsection{Commands to choose from a list}\label{list}
 Besides the command \cmd{\esercizi} that we have already presented there are other commands to choose exercises, or, more in general, objects, from a list.
@@ -706,6 +739,9 @@
 
 With the command \cmd{\estrai[1]\{sets,logic,powers\}\{alpha\}} you choose 2 elements of the set and these elements will have the name\cmd{\alphai} e \cmd{\alphaii}. If these names are names of exercises, it is possible to insert in the file list argument of the command \cmd{\esercizi} also \cmd{\alphai} e \cmd{\alphaii}.
 \end{esempio}
+
+\DescribeMacro{\randestrai}.\  The macro \cmd{\randestrai}\oarg{m}\marg{list}\marg{name} is similar to the macro \cmd{\estrai}, but the choice of the elements is completely randomized. \nuovo{vers. 2.1}
+
 \DescribeMacro{\estraialfa} The command \cmd{\estraialfa}\marg{m}\marg{list}\marg{name} extracts \marg{m} random objects from the list
 \marg{list}, preserving the order. The chosen elements will have name \cmd{\namei}, \cmd{\nameii}, \dots.
 The elements of the list must be comma separated.
@@ -715,9 +751,13 @@
 \end{esempio}
 \DescribeMacro{\estraies} \label{estraies}  The command \cmd{\estraies}\oarg{m}\marg{list} works as the command \cmd{\estrai}, but only on a list of exercises. Once the elements have been chosen, it prints them as the command \cmd{\esercizi}.
 
+\DescribeMacro{\randestraies} \label{randestraies}  The macro \cmd{\randestraies}\oarg{m}\marg{list} works as the macro \cmd{\randestrai}, but only on a list of exercises. Once the elements have been chosen, it prints them as the command \cmd{\esercizi}.
+
 \section{The auxiliary files}
 \subsection{The localisation file}\label{sec:lng}
  The package has  localisations in Italian (the default), UK English, US English, French, Spanish (thanks to Maria Hernandez Cifre), German (thanks to Kerstin von Kirschhausen), Serbian with latin alphabet (thanks to Dusko Latas), Greek (thanks to Sotiris Hasapis). Using greek language (and maybe other non latin localisations) it's necessary to load the packages \pkgname{fontenc}, \pkgname{inputenc} e \pkgname{babel} before the package \pkgname{esami}\footnote{The option \optname{greek} requires at this moment the option \optname{iso-8859-7} for the package \pkgname{inputenc}}. In this file one can also load some language dependent packages, such as \pkgname{numprint}, \pkgname{geometry}, etc. and there are the definitions of the commands \cmd{\shortdate} and \cmd{\longdate} to write the date.
+
+ \textcolor[rgb]{1.00,0.00,0.00}{\textbf{N.B.:} There is an known incompatibility between the package \pkgname{babel} for the French language (which is not necessary for the localization) and the package \pkgname{fp}: to manage this incompatibility, one can use the macro \cmd{\shorthandoff\{:\}} immediately after \cmd{\begin\{document\}}.}
 \subsection{The configuration file}\label{sec:cfg}
 The configuration file \texttt{esami-xyz.cfg} contains various definitions, i.e. the header (command \cmd{\testa}), the footer, the format for the solution file, the page style, the instructions for the exam.
 \subsection{The \texttt{master} and \texttt{master-sol} files}
@@ -737,6 +777,7 @@
   \item[Version 1.0 (2013/03/08)] First version released to CTAN.
   \item[Version 1.1 (2013/12/09)] Inserted the dependance on the package \texttt{environ} to remove some errors in the \LaTeX\ compilation. Removed the dependance on the package \texttt{icomma} in the italian localization file es-italian.lng because of the introduction of new features in the package \texttt{babel} for the Italian langaguage (macro \texttt{IntelligentComma}).
   \item[Version 2.0 (2015/02/25)] Eliminated the dependance on \pkgname{pstricks}. Modified the use of \emph{fill-in} questions. Inserted the possibility to extract more than one variant from a file. Now it is possible to view the solutions in tests. Modified the visualization of decimal places in command  \cmd{\FPsv}. Modified the definition of \cmd{\FPval} to allow the use of decimal places. Modified the algorithm of choice of a variant of an exercise, now completely deterministic. Added the command \cmd{\Acapo}. Added the serbian localization (latin alphabet).  The compilation produces a new file with the list of the chosen exercises.
+   \item[Versione 2.1 (2016/07/25)] Modified \texttt{es-german.lng} and \texttt{es-spanish.lng} for an error in the input of the solutions. Introduced the macro \texttt{randestrai}. Introduced the macro \texttt{FPsignpol}. Introduced a control on the total points of the exercises. Solved the incompatibility with \pkgname{babel} for the Spanish language. Removed the incompatibility between the command  \cmd{\fillin} and the commands  \cmd{\sempli} and \cmd{\semplix}.
 \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	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex	2016-07-30 23:11:21 UTC (rev 41774)
@@ -12,7 +12,7 @@
 \usepackage{calc}
 \usepackage{hologo}
 \usepackage{lmodern}
-\usepackage{comandi}
+%\usepackage{comandi}
 \usepackage[utf8]{inputenc}
 \usepackage[italian]{babel}
 \usepackage{graphicx}
@@ -72,7 +72,7 @@
 \changes{Versione 1.0}{2013/03/08}{Prima versione rilasciata al CTAN}
 \changes{Versione 1.1}{2013/12/09}{Reinserita la dipendenza dal pacchetto \texttt{environ} per eliminare alcuni errori nella compilazione con \hologo{LaTeX}. Eliminata la dipendenza dal pacchetto \texttt{icomma} nel file di localizzazione es-italian.lng a seguito dell'introduzione di nuove funzionalità nel pacchetto \texttt{babel} per la lingua italiana (comando \texttt{IntelligentComma}).}
 \changes{Versione 2.0}{2015/02/25}{Eliminata la dipendenza da \texttt{pstricks}. Modificato l'inserimento di domande di tipo \emph{fill-in}. Inserita la possibilità di estrarre più esercizi da un solo file. Ora è possibile visualizzare le soluzioni nei test. Modificata la visualizzazione dei decimali nel comando \texttt{FPsv}. Modificata la definizione di \texttt{FPval} in modo da avere cifre decimali. Modificato l'algoritmo di scelta della variante di un esercizio in modo completamente deterministico. Aggiunto il comando \cmd{\Acapo}. Aggiunta la localizzazione serba (alfabeto latino). Ora la compilazione produce un nuovo file con la lista degli esercizi scelti.}
-
+\changes{Versione 2.1}{2016/04/11}{Modificato \texttt{es-german.lng} e \texttt{es-spanish.lng} per errore nell'input delle soluzioni. Introdotto il comando \texttt{randestrai}. Introdotto il comando \texttt{FPsignpol}. Introdotto controllo punteggio totale degli esercizi. Rimossa l'incompatibilità tra il comando  \texttt{fillin} e i comandi  \texttt{sempli} e  \texttt{semplix}.}
 %\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}}
 \def\MacroFont{\fontencoding\encodingdefault
@@ -81,8 +81,8 @@
 \fontshape\updefault
 \footnotesize}
 \GetFileInfo{esami.sty}
-\def\fileversion{versione 2.0}
-\def\filedate{2015/02/25}
+\def\fileversion{versione 2.1}
+\def\filedate{2016/07/1}
 
 
  \title{Il pacchetto esami\thanks{Questo documento
@@ -107,7 +107,7 @@
 
 Lo sviluppo del pacchetto è iniziato nel 2008 (\cite{esami}, \cite{tug}) con l'intento di estendere e unificare alcune proprietà dei pacchetti \pkgname{exerquiz} e \pkgname{eqexam} di D.P. Story \cite{acrotex} e \pkgname{probsoln} di N.Talbot \cite{probsoln}.
 \section{Pacchetti richiesti}
-Il pacchetto \pkgname{esami} dipende da alcuni altri pacchetti non standard\footnote{La lista completa dei pacchetti usati in una normale compilazione di un esame è:  graphicx,  enumerate, fp, currfile, array, environ, ifthen, xargs, xkeyval, multicol, amssymb, amsfonts, xcolor, babel, etoolbox, icomma, numprint, amsmath, fontenc, inputenc, lmodern. Ovviamente ogni pacchetto caricato può avere altre dipendenze.}
+Il pacchetto \pkgname{esami} dipende da alcuni altri pacchetti non standard\footnote{La lista completa dei pacchetti usati in una normale compilazione di un esame è: etex, graphicx,  enumerate, fp, currfile, array, environ, ifthen, xargs, xkeyval, multicol, amssymb, amsfonts, xcolor, babel, etoolbox, icomma, numprint, amsmath, fontenc, inputenc, lmodern. Ovviamente ogni pacchetto caricato può avere altre dipendenze.}
 \begin{enumerate}
 \item \pkgname{fp}: per le operazioni matematiche;
 \item \pkgname{currfile}: per ottenere il nome del file e della cartella di lavoro;
@@ -138,7 +138,7 @@
 Le opzioni sono discusse nella sezione \ref{sec:opzioni}
 \begin{verbatim}
 \def\numcompiti{10}
-\date{2013/04/21}%%% THE DATE IN THE FORMAT YYYY/MM/DD
+\date{2018/04/21}%%% THE DATE IN THE FORMAT YYYY/MM/DD
 \def\Data{\longdate}%%% or \shortdate: the date in the heading
 \end{verbatim}
 Il comando \cmd{\date} è quello solito di \Hologo{LaTeX}, ma la data deve essere scritta nel formato YYYY/MM/DD, mentre il comando \cmd{\numcompiti} serve a definire il numero di versioni che devono essere generate.
@@ -159,7 +159,7 @@
 \FPeval\seme{round((\thenomefile+\thevers):0)}
 \randomi=\seme
 \end{verbatim}
-genera il seme per i processi di randomizzazione e lo assegna anche a \cmd{\randomi}
+genera il seme per i processi di randomizzazione e lo assegna anche a \cmd{\randomi}. \textcolor[rgb]{1.00,0.00,0.00}{\textbf{N.B.} Se il seme è un numero minore di 1, il seme viene inizializzato usando la data e l'ora e quindi due compilazioni daranno esiti diversi.}
 \begin{verbatim}
 \permuta
 \testa
@@ -188,9 +188,13 @@
 %%\def\stringasol{}
 \end{document}
 \end{verbatim}
-Termina la routine di compilazione. L'istruzione \verb|\def\stringasol{}| serve a non generare la stringa delle soluzioni se non desiderata. La compilazione produce un file pdf con tutte le varianti richieste. Compilando il file delle soluzioni si ottiene  anche un file \texttt{filename-sol.loe} (loe = list of exercises)  che contiene le label che vengono assegnate agli esercizi scelti, in modo da poterli identificare: infatti ogni esercizio scelto è identificato  da una stringa del tipo \emph{e:numero di versione -file:nome del file-q:numero della domanda in cifre romane}. \nuovo{vers. 2.0}
+Termina la routine di compilazione. L'istruzione \verb|\def\stringasol{}| serve a non generare la stringa delle soluzioni se non desiderata. La compilazione produce un file pdf con tutte le varianti richieste.
+ \nuovo{vers. 2.0} Compilando il file delle soluzioni si ottiene  anche un file \texttt{filename-sol.loe} (loe = list of exercises)  che contiene le label che vengono assegnate agli esercizi scelti, in modo da poterli identificare: infatti ogni esercizio scelto è identificato  da una stringa del tipo \emph{e:numero di versione -file:nome del file-q:numero della domanda in cifre romane}.
 
+\nuovo{vers. 2.1} Al termine del file delle soluzioni vi è la stringa delle soluzioni delle domande a risposta chiusa: di default tale stringa è per ogni versione inserita in un ambiente \envname{minipage}. Se tale formattazione non fosse adatta ai propri scopi (ad esempio se si hanno 40 domande a risposta chiusa le cui risposte non stanno in una pagina) è possibile modificarla adattando i comandi \cmd{\stepverssols} e \cmd{\closeverssols}: nel file di configurazione di esempio sono presenti, commentate, le definizioni per avere una stringa di soluzioni continua.
 
+Durante la compilazione viene controllato che il numero di punti indicato per un test o un esercizio in più parti sia uguale alla somma dei punteggi parziali. \nuovo{vers. 2.1}
+
 \section{Le opzioni del pacchetto}\label{sec:opzioni}
 Per usare il pacchetto bisogna usare il solito comando
 \cmd{\usepackage}[\meta{options}]\{esami\}. Le opzioni possibili sono:
@@ -206,13 +210,13 @@
     \item {\color{blue}{\optname{prova}}}: si usa solo con il file {\tt totale-versioni} (si veda \ref{sec:totale}) e serve per visualizzare tutte le varianti di un esercizio. Fa visualizzare automaticamente le risposte esatte negli esercizi a risposta multipla e la soluzione nei problemi da svolgere.
     \item {\color{blue}{\optname{param}}}: serve per visualizzare le lettere che rappresentano i parametri casuali anziché il valore numerico attribuito. Stampa anche una frase, nella quale sono contenuti il valore iniziale e finale attribuiti ai parametri usati nell'esercizio. Può essere usata solo insieme all'opzione \texttt{prova}.
     \item {\color{blue}{\optname{correzione}}}: stampa solo i testi di tutti gli esercizi, senza soluzioni (funziona solo nel file {\tt totale-versioni}).
-   \item  {\color{blue}{\optname{fillb}}}: non più usata, resta per compatibilità con le versioni  precedenti.\nuovo{vers. 2.0}
+   \item  {\color{blue}{\optname{fillb}}}: deprecata, resta per compatibilità con le versioni precedenti. Serve quando si usano esercizi di tipo ``fillin'', ma è consigliato usare il comando \cmd{\fillinproblem} (si veda\ref{par:fillin})\nuovo{vers. 2.0}
    \item {\color{blue}{\optname{twocolumns}}}: per scrivere il testo delle domande a risposta chiusa su due colonne (ma si veda anche \ref{duecolonne}).
    \item  {\color{blue}{\optname{sansserif}}}: usa caratteri sans serif.
     \item {\color{blue}{\optname{autopston}}} e {\color{blue}{\optname{autopstoff}}}: caricano i pacchetti \pkgname{pstricks}, \pkgname{pstricks-add} e \pkgname{auto-pst-pdf} e permettono di compilare il file direttamente con \hologo{pdfLaTeX} (anche se contiene codice di \pkgname{pstricks}). La prima opzione crea e include direttamente nel documento i file delle immagini, la seconda non crea i file delle immagini (e rende più veloce la compilazione)\VerbatimFootnotes
 \footnote{Per usare \pkgname{auto-pst-pdf} è necessario
 abilitare \texttt{shell-escape} (\Hologo{TeX} Live) o \texttt{write18} (\Hologo{MiKTeX}) nell'esecuzione di \hologo{pdfLaTeX}.}.\nuovo{vers. 2.0}
-\item {\color{blue}{\optname{language}}}: legge il file di localizzazione es-language.lng (si veda \ref{sec:lng}). Nel file sono contenute le traduzioni delle etichette (esercizio, soluzione, \dots), dei messaggi d'errore, delle intestazioni contenute nel file (\texttt{esami-xyz.cfg}). Di default viene caricato il file della lingua italiana. Poiché le opzioni linguistiche hanno lo stesso nome di quelle usate in \pkgname{babel} è possibile passare l'opzione in \cmd{\documentclass}.
+\item {\color{blue}{\optname{language}}}: legge il file di localizzazione es-language.lng (si veda \ref{sec:lng}). Nel file sono contenute le traduzioni delle etichette (esercizio, soluzione,  \dots ), dei messaggi d'errore, delle intestazioni contenute nel file (\texttt{esami-xyz.cfg}). Di default viene caricato il file della lingua italiana. Poiché le opzioni linguistiche hanno lo stesso nome di quelle usate in \pkgname{babel} è possibile passare l'opzione in \cmd{\documentclass}.
   \end{itemize}
 
   \section{Gli esercizi}
@@ -220,7 +224,7 @@
   Ogni esercizio (con tutte le sue varianti) va scritto in un file separato.
 \DescribeMacro{\newproblem}
 Ogni variante è racchiusa nel comando
-\cmd{\newproblem\{ .... \}} (che non ha alcun argomento opzionale).
+\cmd{\newproblem\{\dots \}} (che non ha alcun argomento opzionale).
 \begin{esempio}
 \begin{verbatim}
 %%%% Questo è il file file1.tex con 2 varianti di un esercizio
@@ -280,8 +284,9 @@
 verranno introdotti altri comandi simili per il caricamento di esercizi}.
 
 È possibile sia inserire tutti gli esercizi con un unico comando, sia usare
-più comandi \cmd{\esercizi} o \cmd{\estraies} (si veda \ref{estraies}).\label{duecolonne}
-Questa possibilità è utile ad esempio se si vuole che ci siano esercizi da due
+più comandi \cmd{\esercizi} o \cmd{\estraies} o \cmd{\randestraies} (si veda \ref{estraies} e \ref{randestraies}).
+
+\label{duecolonne}Questa possibilità è utile ad esempio se si vuole che ci siano esercizi da due
 sottoinsiemi diversi (5 esercizi sui limiti scelti tra 7 e 3 esercizi  sulle derivate scelti tra 5) o se si vuole per esigenze di impaginazione avere alcuni esercizi su due colonne ed altri su una colonna: in tale caso
 si deve  introdurre la parte che deve essere su due colonne con
 \cmd{\begin\{multicols\}\{2\}} e concluderla con \cmd{\end\{multicols\}}. \textbf{Non} si usa l'opzione \optname{twocolumns}.
@@ -309,7 +314,8 @@
 Nel file degli esercizi, la sintassi da usare all'interno di
 \cmd{\newproblem} è la seguente:
 \begin{verbatim} \item \PTs{punteggio}
-...testo... \begin{answers}{numero colonne}
+...testo\dots
+\begin{answers}{numero colonne}
     \bChoices[random]
 \Ans0 risposta errata \eAns
 \Ans0 risposta errata \eAns
@@ -370,7 +376,7 @@
 \end{answers}
 \begin{solution}
 Le soluzioni dell'equazione di secondo grado sono date dalla formula
-$x_{1,2}=\dfrac{5\pm\sqrt{5^2-4\cdot 6}}{2}$.
+$x_{1,2}=\dfrac{5\pm\sqrt{5^2-4 \cdot 6}}{2}$.
 \end{solution}
 }
 
@@ -393,6 +399,8 @@
 
 Oltre alle domande a risposta multipla è possibile inserire nell'ambiente \envname{test} altri tipi di domande che verranno descritti nella sezione \ref{sec:altri_esercizi}, ma se si usano esercizi di tipo \texttt{fill-in} se ci sono più spazi bianchi da riempire la stringa delle soluzioni avrà un utilità minore poiché non seguirà la numerazione delle risposte.
 
+\textbf{N.B.} Di default ogni domanda del test è inserita in un ambiente \envname{minipage}.  Nel file di configurazione di esempio ci  sono alcune righe commentate che permettono di avere  le domande fuori da tale ambiente.
+
 \subsection{Gli ambienti problem e problem*}
 \DescribeEnv{problem}
 \DescribeEnv{problem*}
@@ -415,7 +423,7 @@
 \begin{problem} [punteggio]
 ........Testo..........
 \begin{solution}[spazio_soluzione]
-.... testo soluzione ......
+.\dots testo soluzione ......
 \end{solution}
 \end{problem}
   \end{verbatim}
@@ -431,7 +439,7 @@
 \item \PTs{punteggio della parte}
 ....testo....
    \begin{solution}[spazio_soluzione]
-    .... testo soluzione ......
+    .\dots testo soluzione ......
     \end{solution}
 \item \PTs{punteggio della parte}
 .....
@@ -438,9 +446,14 @@
 \end{parts}  \end{problem*}
   \end{verbatim}
 Con \cmd{\PTs\{punteggio della parte\}} si indica il punteggio della singola parte.
+\paragraph{Esercizi in una minipage}
+\DescribeEnv{problemmp}
+\DescribeEnv{problemmp*}
+Esistono anche gli ambienti \envname{problemmp} e \envname{problemmp*} \nuovo{vers. 2.1} che sono del tutto identici agli ambienti \envname{problem} e \envname{problem*},  ma inseriscono tutto il testo dell'esercizio in un ambiente \envname{minipage}.
+
 \subsection{Altre tipologie di esercizi}\label{sec:altri_esercizi}
 Sono state definite alcune nuove tipologie di esercizio:
-\paragraph{fillin:} \DescribeMacro{\fillin}
+\paragraph{fillin:} \label{par:fillin}\DescribeMacro{\fillin}
 serve per creare esercizi ``a riempimento''. Parte del testo viene lasciata vuota e deve essere riempita dallo studente. Può essere usato anche per creare esercizi a risposta aperta breve. Anche questo tipo di esercizio è simile ad un tipo di esercizio introdotto da D.P. Story nel pacchetto \pkgname{eqexam}.
 
 Questi esercizi sono introdotti con una sintassi leggermente diversa e nel testo sono definiti o dal comando \cmd{\newfillinproblem} o da \cmd{\newproblem}\cmd{\fillinproblem}\texttt{\{testo del problema\}}. \nuovo{vers. 2.0}
@@ -452,7 +465,7 @@
 
 Il parametro opzionale definisce come deve essere segnalato lo spazio in cui inserire la risposta: \emph{u} (\emph{underlined}), che è l'opzione di default, fa sì che lo spazio sia evidenziato mediante una riga su cui va inserita la risposta, \emph{e} (\emph{empty}) crea uno spazio vuoto (non evidenziato in alcun modo), \emph{b} (\emph{boxed}) crea uno spazio circondato da un riquadro.
 
-All'interno del comando \cmd{\fillin} (nello spazio per la risposta) non è possibile usare i comandi \cmd{\sempli} o \cmd{\semplix} (si veda la sezione \ref{sec:comandi}).
+%All'interno del comando \cmd{\fillin} (nello spazio per la risposta) non è possibile usare i comandi \cmd{\sempli} o \cmd{\semplix} (si veda la sezione \ref{sec:comandi}).
 
 Questo tipo di esercizio non può al momento essere usato né con \Hologo{XeLaTeX} né con \Hologo{LuaLaTeX}
 \paragraph{domanda:}\DescribeEnv{problema} questo ambiente deve contenere il testo dell'esercizio (non le soluzioni). Viene usato negli ambienti \envname{problema} e \envname{problema*}, con l'opzione \optname{solutionsonly} non viene stampato  il testo degli esercizi, ma solo la soluzione. Nelle versioni precedenti del pacchetto per lo stesso scopo veniva usato un altro ambiente.
@@ -506,7 +519,7 @@
 \begin{verbatim}
   \begin{tabella}[numero colonne sempre visibili]
   {allineamento colonne visibili}{allineamento colonna nascosta}
-    \dots & \dots \cr
+     \dots &  \dots \cr
   \end{tabella}
 \end{verbatim}
 Il primo parametro (il cui valore di default è 2) indica il numero di colonne della tabella il cui contenuto deve essere visibile anche nel testo dell'esercizio (e non solo nella soluzione), mentre è possibile avere solo una colonna il cui contenuto è invisibile nel testo, ma appare nella soluzione. Il secondo parametro consente di scegliere l'allineamento delle colonne il cui contenuto è sempre visibile e il terzo l'allineamento della colonna invisibile.
@@ -561,16 +574,7 @@
   \item {\color{blue}{\cmd{\esercizio}}}:\DescribeMacro{\esercizio}\ si usa all'interno del file che serve per visualizzare tutte le varianti di un esercizio e serve per definire il nome dell'esercizio sul quale si sta lavorando, che verrà usato nel comando \cmd{\selectallproblems} visto in precedenza e verrà stampato come titolo del file pdf prodotto. La sintassi per definire il nome di un esercizio è \cmd{\def\textbackslash esercizio\{nome\}}.
   \end{itemize}
   Inoltre il comando \cmd{\Acapo} \DescribeMacro{\Acapo} equivalente di default a \verb|\par| separa gli esercizi; questo comando può essere ridefinito ad esempio in \cmd{\newpage} così da avere un esercizio per pagina (utile per studenti DSA o ipovedenti). \nuovo{vers. 2.0}
-%\section{Il pacchetto comandi}
-%\subsection{Introduzione}
-%  Il pacchetto \texttt{comandi} contiene alcune macro per la formattazione del testo matematico e per l'esecuzione dei calcoli (sia all'interno degli esami che in altri file). Alcuni di questi comandi sono disponibili nel pacchetto \verb|esami| senza bisogno di caricare il pacchetto
-%
-%  Per utilizzarlo all'interno di un documento occorre scrivere:
-%
-%\begin{verbatim}
-%  \usepackage{comandi}
-%\end{verbatim}
-%   Il pacchetto non prevede opzioni.
+
 \section{I comandi per lavorare con i parametri e con le liste}
 \subsection{Comandi per lavorare con i parametri (casuali)} \label{sec:comandi}
 Sono stati definiti alcuni comandi per lavorare con i parametri (casuali).
@@ -643,7 +647,7 @@
   \end{verbatim}
   genera una variabile \cmd{\b} che assume un valore casuale tra $2$ e $20$, escluso (in questo caso) il valore $5$. Nella versione parametrica appare invece una stringa di questo tipo (per quanto riguarda la variabile \cmd{\b})
   \begin{center}
-    Il parametro $b$ varia da $2$ a $20$. $b\neq (2*k+1)$. Il seme vale 209.
+    Il parametro $b$ varia da $2$ a $20$. $b \neq  (2*k+1)$. Il seme vale 209.
   \end{center}
   \end{esempio}
   \item {\color{blue}{\cmd{\sempli}\marg{num}\marg{den}}}:\DescribeMacro{\sempli}\ serve per scrivere delle frazioni in cui il numeratore o il denominatore contengono parametri e che potrebbero dover essere ridotte ai minimi termini.
@@ -711,6 +715,21 @@
 \end{tabular}
     \end{esempio}
     \item {\color{blue}{\cmd{\RandS}}}:\DescribeMacro{\RandS}\ serve per attribuire un segno casuale ($+$ o $-$) ad un numero. Il comando è simile a quello del pacchetto \pkgname{rangen}.
+    \item {\color{blue}{\cmd{\FPsignpol}\marg{espressione}}}:\DescribeMacro{\FPsignpol}\ restituisce il valore di ``espressione'' con il suo segno: è utile, ad esempio, se espressione è il coefficiente di un polinomio (contributo di Hjalmar Basile). \nuovo{vers. 2.1}
+        \begin{esempio}
+
+Se  $a$ vale $2$ e $b$ vale $-1$
+
+      \begin{tabular}{lr}
+\verb|$x^2\FPsignpol{2}{a+4*b}x-2$| & $x^2-2x-2$
+\end{tabular}
+
+Se  $a$ vale $2$ e $b$ vale $1$
+
+      \begin{tabular}{lr}
+\verb|$x^2\FPsignpol{2}{a+4*b}x-2$| & $x^2+6x-2$
+\end{tabular}
+    \end{esempio}
       \end{itemize}
 \subsection{Comandi per la scelta da una lista }
 Oltre al comando \cmd{\esercizi} già visto esistono altri comandi per la scelta di esercizi da una lista o, più in generale, di oggetti da una lista.
@@ -723,6 +742,8 @@
 
 Con il comando \cmd{\estrai[1]\{insiemi,logica,potenze\}\{alpha\}} si scelgono 2 elementi dell'insieme e questi due elementi si chiameranno \cmd{\alphai} e \cmd{\alphaii}. Se questi nomi corrispondono a nomi di file di esercizi è possibile inserire nella lista di file argomento del comando \cmd{\esercizi} anche \cmd{\alphai} e \cmd{\alphaii}.
 \end{esempio}
+\DescribeMacro{\randestrai}.\  Il comando \cmd{\randestrai}\oarg{m}\marg{lista}\marg{nome} è simile al comando \cmd{\estrai}, ma l'estrazione degli elementi è completamente aleatoria. \nuovo{vers. 2.1}
+
 \DescribeMacro{\estraialfa} Il comando \cmd{\estraialfa}\marg{m}\marg{lista}\marg{nome} estrae \marg{m} oggetti casuali dalla lista
 \marg{lista} mantenendo l'ordine fissato. Gli elementi estratti avranno nome \cmd{\nomei}, \cmd{\nomeii}, \dots.
 Gli elementi della lista devono essere separati da virgole.
@@ -732,17 +753,16 @@
 alfabetico e questi due elementi si chiameranno \cmd{\alphai} e \cmd{\alphaii}.
 \end{esempio}
 \DescribeMacro{\estraies} \label{estraies}  Il comando \cmd{\estraies}\oarg{m}\marg{lista} funziona come il comando \cmd{\estrai}, ma esclusivamente su una lista di esercizi. Una volta effettuata l'estrazione, li stampa come il comando \cmd{\esercizi}.
+\DescribeMacro{\randestraies} \label{randestraies}  Il comando \cmd{\randestraies}\oarg{m}\marg{lista} funziona come il comando \cmd{\randestrai}, ma esclusivamente su una lista di esercizi. Una volta effettuata l'estrazione, li stampa come il comando \cmd{\esercizi}.
 
 \section{I file ausiliari}
 \subsection{Il file di localizzazione}\label{sec:lng}
  Al momento sono presenti le localizzazioni in italiano (default), inglese (UK), inglese (US), francese, spagnolo (contributo di Maria Hernandez Cifre), tedesco (contributo di Kerstin von Kirschhausen), serbo con alfabeto latino (contributo di Dusko Latas), greco (contributo di Sotiris Hasapis). Usando la lingua greca (e forse altre localizzazioni in caratteri non latini) è necessario caricare i pacchetti \pkgname{fontenc}, \pkgname{inputenc} e \pkgname{babel} prima del caricamento del pacchetto \pkgname{esami}\footnote{L'opzione \optname{greek} prevede al momento l'utilizzo dell'opzione \optname{iso-8859-7} per il pacchetto \pkgname{inputenc}}. In questo file possono venire caricati  anche alcuni pacchetti dipendenti dalla localizzazione, quali \pkgname{numprint}, \pkgname{geometry}, ecc. e vengono definiti i comandi \cmd{\shortdate} e \cmd{\longdate} per esprimere la data.
+ \textcolor[rgb]{1.00,0.00,0.00}{\textbf{N.B.:} È nota un'incompatibilità tra  il pacchetto \pkgname{babel} per la lingua francese (che non è comunque necessario per la localizzazione) e il pacchetto \pkgname{fp}: per ovviare a tale incompatibilità  è sufficiente usare il comando \cmd{\shorthandoff\{:\}} subito dopo \cmd{\begin\{document\}}.}
 \subsection{Il file di configurazione}\label{sec:cfg}
 Il file di configurazione \texttt{esami-xyz.cfg} contiene varie definizioni tra cui la testata (comando \cmd{\testa}), il piè di pagina, la formattazione della stringa delle soluzioni, lo stile di pagina, le istruzioni per l'esame.
 \subsection{I file \texttt{master} e \texttt{master-sol}}
-Questi due file differiscono solo perché il secondo mostra le soluzioni e contengono le istruzioni per generare effettivamente la prova d'esame.  \textbf{I file vanno rinominati prima della compilazione}: in caso contrario la compilazione si arresta con un messaggio di errore. In entrambi è necessario indicare la data (comando \cmd{\date}) in formato YYYY/MM/DD, %il modulo dell'esame (comando \verb!\modulo!),
-il numero di compiti da generare (comando \cmd{\numcompiti}),
-%se si tratta di prova completa o parziale (comando \verb|\compito|)
-e, ovviamente, gli esercizi. Il tema d'esame può essere diviso in più parti e in  ognuna si può usare uno o più degli ambienti introdotti e uno o più comandi per la stampa degli esercizi.
+Questi due file differiscono solo perché il secondo mostra le soluzioni e contengono le istruzioni per generare effettivamente la prova d'esame.  \textbf{I file vanno rinominati prima della compilazione}: in caso contrario la compilazione si arresta con un messaggio di errore. In entrambi è necessario indicare la data (comando \cmd{\date}) in formato YYYY/MM/DD, il numero di compiti da generare (comando \cmd{\numcompiti}), e, ovviamente, gli esercizi. Il tema d'esame può essere diviso in più parti e in  ognuna si può usare uno o più degli ambienti introdotti e uno o più comandi per la stampa degli esercizi.
 
 Nel file possono essere definiti anche il numero massimo di ripetizioni che il comando \cmd{\FPsetpar} deve eseguire per cercare di soddisfare le condizioni poste (comando \cmd{\maxLoopLimit}) e il meccanismo di calcolo del seme iniziale per la generazione dei numeri casuali (comando \cmd{\seme}).
 
@@ -757,6 +777,7 @@
   \item[Versione 1.0 (2013/03/08)] Prima versione rilasciata al CTAN
   \item[Versione 1.1 (2013/12/09)] Reinserita la dipendenza dal pacchetto \pkgname{environ} per eliminare alcuni errori nella compilazione con \Hologo{LaTeX}. Eliminata la dipendenza dal pacchetto \pkgname{icomma} nel file di localizzazione es-italian.lng a seguito dell'introduzione di nuove funzionalità nel pacchetto \pkgname{babel} per la lingua italiana (comando \cmd{\IntelligentComma}).
   \item[Versione 2.0 (2015/02/25)] Eliminata la dipendenza da \pkgname{pstricks}. Modificato l'inserimento di domande di tipo \emph{fill-in}. Inserita la possibilità di estrarre più esercizi da un solo file. Ora è possibile visualizzare le risposte nei test. Modificata la visualizzazione dei decimali nel comando \cmd{\FPsv}. Modificata la definizione di \cmd{\FPval} in modo da avere cifre decimali. Modificato l'algoritmo di scelta della variante di un esercizio in modo completamente deterministico. Aggiunto il comando \cmd{\Acapo}. Aggiunta la localizzazione serba (alfabeto latino). Ora la compilazione produce un nuovo file con la lista degli esercizi scelti.
+  \item[Versione 2.1 (2016/07/25)] Modificato \texttt{es-german.lng} e \texttt{es-spanish.lng} per errore nell'input delle soluzioni. Introdotto il comando \texttt{randestrai}. Introdotto il comando \texttt{FPsignpol}. Introdotto controllo punteggio totale degli esercizi. Risolta l'incompatibilità con \pkgname{babel} per la lingua spagnola.  Rimossa l'incompatibilità tra il comando  \cmd{\fillin} e i comandi  \cmd{\sempli} e  \cmd{\semplix}.
 \end{description}
 
 

Modified: trunk/Master/texmf-dist/doc/latex/esami/doc/esami.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/esami.bib	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/esami.bib	2016-07-30 23:11:21 UTC (rev 41774)
@@ -4,7 +4,7 @@
 @MISC{examdesign,
   author = {Jason Alexander},
   title = {The package \pkgname{examdesign}},
-  howpublished = {\url{CTAN:/tex-archive/macros/latex/contrib/examdesign}},
+  howpublished = {\url{CTAN:/macros/latex/contrib/examdesign}},
   year = {2006}
 }
 
@@ -55,7 +55,7 @@
 
 @ARTICLE{tug,
   author = {Messineo, G. and Vassallo, S.},
-  title = {The esami package for examinations},
+  title = {The \pkgname{esami} package for examinations},
   journal = {TUGboat},
   year = {2013},
   volume = {34},

Deleted: trunk/Master/texmf-dist/doc/latex/esami/doc/examples/esami-xyz.cfg
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/examples/esami-xyz.cfg	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/examples/esami-xyz.cfg	2016-07-30 23:11:21 UTC (rev 41774)
@@ -1,137 +0,0 @@
-%% Package `esami' to use with LaTeX 2e
-%%  Copyright (C) 2008-2013  G. Messineo e S. Vassallo
-%%
-%% This is file `esami-xyz.cfg',
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% esami-xyz.cfg,             2013-03-20                %%
-%% Copyright (C) 2008-2013 G. Messineo e S. Vassallo    %%
-%%                                                      %%
-%% This program can be redistributed and/or modified    %%
-%% under the terms of the LaTeX Project Public License  %%
-%% Distributed from CTAN archives in directory          %%
-%% macros/latex/base/lppl.txt; either version 1 of the  %%
-%% License, or (at your option) any later version.      %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%% other packages
-\AtEndOfPackage{
-\usepackage{ifxetex}%%NUOVO
-\usepackage{ifluatex}%%%NUOVO
-\usepackage{amsmath}
-%========================================================%
-%    Some shortcuts and Italian maths                    %
-%========================================================%
-
-\DeclareMathOperator{\sen}{sen}
-\DeclareMathOperator{\tg}{tg}
-\DeclareMathOperator{\arcsen}{arcsen}
-\DeclareMathOperator{\arctg}{arctg}
-\providecommand*{\dif}{\mathop{}\!\mathrm{d}}
-\providecommand{\dlim}{\displaystyle \lim}
-\providecommand{\me}{\mathrm{e}}
-\providecommand{\D}{\displaystyle}
-
-\newenvironment{sistema}{%%% Taken from somewhere in GUIT forum to write equations systems
-\left\lbrace\begin{array}{@{}l@{}}}%
-  {\end{array}\right.%
-  }
-
-\DeclareRobustCommand{\annu}[2]{_{%%% the annuity command
- \def\arraystretch{0}
- \setlength\arraycolsep{1pt}
-\setlength\arrayrulewidth{.2pt}
-\begin{array}[b]{c c}
- \setlength\arraycolsep{1.5pt}
- \begin{array}
- [b]{r|}\hline
- \\[\arraycolsep]
- \scriptstyle #1
- \end{array}&\scriptstyle#2%
-\end{array}%
-}}
-
-\newcommand{\vect}[1]{\boldsymbol{#1}}
-
-%%% We prefer var greek math %%%
-
-\newcommand{\eps}{\varepsilon}
-\newcommand{\oldtheta}{\theta} \renewcommand{\theta}{\vartheta}
-\newcommand{\oldepsilon}{\epsilon} \renewcommand{\epsilon}{\varepsilon}
-\newcommand{\oldrho}{\rho} \renewcommand{\rho}{\varrho}
-\newcommand{\oldphi}{\phi} \renewcommand{\phi}{\varphi}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%
-}
-
-% +=============================+
-% |         THE HEADING         |
-% +=============================+
-
- \@ifpackagewith{esami}{prova}{%
- \def\testa{\relax}}
-{%
-\def\testa{
-{\bfseries\sffamily\small
-\begin{center}
-\begin{tabular}{|lp{.33\textwidth}|lp{.3\textwidth}|lp{.3\textwidth}|}
-\hline
-\multicolumn{1}{|p{.33\textwidth}|}{\examname \newline  \Data}&\multicolumn{1}{|p{.3\textwidth}|}{\profname  } &\multicolumn{1}{|p{.3\textwidth}|}{\studsignname}\\[4ex]
-\hline
-\multicolumn{1}{|p{.33\textwidth}|}{\studlastname:}&\multicolumn{1}{|p{.3\textwidth}|}{\studfirstname:}&\multicolumn{1}{|p{.3\textwidth}|}{\studid:}\\[4ex]
-\hline
-\end{tabular}\\[3ex]
-\end{center}}
- }
- }
-
-% +=============================+
-% |         THE FOOTER          |
-% +=============================+
-
-\ifes at solutions%%%solutions
-\def\ps at esame{\let\@oddhead\@empty\def\@oddfoot{\hfil \textbf{\versionname\
-n. \thevers} -- %%
-\textbf{\solutionsname} --  %%
- \pagename\ \thepage
-\hfil}\let\@evenhead\@empty\let\@evenfoot\@empty}
-\else%%% no solutions
-    \def\ps at esame{
-    \let\@oddhead\@empty\def\@oddfoot%%
-    {\hfil  \textbf{\versionname\ n. \thevers\
-      -- \pagename\ \thepage}\hfil}\let\@evenhead\@empty\let\@evenfoot\@empty}
-\fi
-
-% +=============================+
-% |   THE SOLUTION STRING       |
-% +=============================+
-
-\def\ps at soltest{\let\@oddhead\@empty\def\@oddfoot{\hfil %\textbf{\versionname\ n. \thevers} -- %%
-\textbf{\solutionsname} -- \pagename\ \thepage
-\hfil}\let\@evenhead\@empty\let\@evenfoot\@empty}
-
-\ifes at solutions
-\newcommand{\stringasol}{\newpage%
-\vspace{.8cm}
-\pagestyle{soltest}
- \input{\jobname.sol.tex}                                                                                %
-}
-\else
-\newcommand{\stringasol}{\relax}
-\fi
-
-
-% +=============================+
-% |   SOME INTRUCTIONS          |
-% +=============================+
-
-\def\istruzionii{{
-\sffamily \textbf{INSTRUCTIONS}
-\begin{itemize}
-  \item Write here your instructions
-  \item two
-  \item three
-\end{itemize}}}
-
-\def\istruzioniii{\setlength{\fboxsep}{1.5ex}\setlength{\fboxrule}{1.2pt}{\sffamily
-\framebox{\parbox{\textwidth}{\textbf{Some other instructions.}}}}\\[3ex]}

Deleted: trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.loe
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.loe	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.loe	2016-07-30 23:11:21 UTC (rev 41774)
@@ -1,180 +0,0 @@
-Version n. 1
-Exercise 1: e:1-file:test2-q:iii
-Exercise 2: e:1-file:test2-q:i
-Exercise 3: e:1-file:test2-q:ii
-Exercise 4: e:1-file:test3-q:ii
-Exercise 5: e:1-file:test3-q:i
-Exercise 6: e:1-file:test4-q:v
-Exercise 7: e:1-file:test14-q:i
-Exercise 8: e:1-file:test9-q:iv
-Exercise 9: e:1-file:test1-q:i
-Exercise 10: e:1-file:test5-fillin-q:i
-Exercise 11: e:1-file:test11-q:i
-Exercise 12: e:1-file:test11-q:ii
-Exercise 1: e:1-file:test12-q:i
-Exercise 2: e:1-file:test13-q:i
-Exercise 1: e:1-file:problem1-q:i
- 
- 
-Version n. 2
-Exercise 1: e:2-file:test3-q:iv
-Exercise 2: e:2-file:test2-q:i
-Exercise 3: e:2-file:test3-q:i
-Exercise 4: e:2-file:test2-q:iii
-Exercise 5: e:2-file:test2-q:ii
-Exercise 6: e:2-file:test1-q:ii
-Exercise 7: e:2-file:test14-q:v
-Exercise 8: e:2-file:test4-q:i
-Exercise 9: e:2-file:test5-fillin-q:ii
-Exercise 10: e:2-file:test9-q:ii
-Exercise 11: e:2-file:test11-q:i
-Exercise 12: e:2-file:test11-q:ii
-Exercise 1: e:2-file:test13-q:iv
-Exercise 2: e:2-file:test12-q:ii
-Exercise 1: e:2-file:problem1-q:i
- 
- 
-Version n. 3
-Exercise 1: e:3-file:test2-q:i
-Exercise 2: e:3-file:test2-q:iii
-Exercise 3: e:3-file:test3-q:iii
-Exercise 4: e:3-file:test2-q:ii
-Exercise 5: e:3-file:test3-q:ii
-Exercise 6: e:3-file:test14-q:i
-Exercise 7: e:3-file:test5-fillin-q:i
-Exercise 8: e:3-file:test1-q:i
-Exercise 9: e:3-file:test9-q:iii
-Exercise 10: e:3-file:test4-q:iv
-Exercise 11: e:3-file:test11-q:i
-Exercise 12: e:3-file:test11-q:ii
-Exercise 1: e:3-file:test12-q:i
-Exercise 2: e:3-file:test13-q:ii
-Exercise 1: e:3-file:problem1-q:i
- 
- 
-Version n. 4
-Exercise 1: e:4-file:test3-q:iv
-Exercise 2: e:4-file:test2-q:i
-Exercise 3: e:4-file:test2-q:iii
-Exercise 4: e:4-file:test3-q:ii
-Exercise 5: e:4-file:test2-q:ii
-Exercise 6: e:4-file:test5-fillin-q:ii
-Exercise 7: e:4-file:test1-q:ii
-Exercise 8: e:4-file:test9-q:iii
-Exercise 9: e:4-file:test14-q:iv
-Exercise 10: e:4-file:test4-q:ii
-Exercise 11: e:4-file:test11-q:i
-Exercise 12: e:4-file:test11-q:ii
-Exercise 1: e:4-file:test13-q:iii
-Exercise 2: e:4-file:test12-q:iii
-Exercise 1: e:4-file:problem1-q:i
- 
- 
-Version n. 5
-Exercise 1: e:5-file:test2-q:i
-Exercise 2: e:5-file:test2-q:ii
-Exercise 3: e:5-file:test3-q:iii
-Exercise 4: e:5-file:test3-q:iv
-Exercise 5: e:5-file:test2-q:iii
-Exercise 6: e:5-file:test9-q:ii
-Exercise 7: e:5-file:test4-q:iii
-Exercise 8: e:5-file:test1-q:i
-Exercise 9: e:5-file:test5-fillin-q:i
-Exercise 10: e:5-file:test14-q:ii
-Exercise 11: e:5-file:test11-q:i
-Exercise 12: e:5-file:test11-q:ii
-Exercise 1: e:5-file:test12-q:i
-Exercise 2: e:5-file:test13-q:iii
-Exercise 1: e:5-file:problem1-q:i
- 
- 
-Version n. 6
-Exercise 1: e:6-file:test3-q:iv
-Exercise 2: e:6-file:test3-q:ii
-Exercise 3: e:6-file:test2-q:iii
-Exercise 4: e:6-file:test2-q:ii
-Exercise 5: e:6-file:test2-q:i
-Exercise 6: e:6-file:test14-q:iii
-Exercise 7: e:6-file:test1-q:ii
-Exercise 8: e:6-file:test4-q:i
-Exercise 9: e:6-file:test9-q:i
-Exercise 10: e:6-file:test5-fillin-q:ii
-Exercise 11: e:6-file:test11-q:i
-Exercise 12: e:6-file:test11-q:ii
-Exercise 1: e:6-file:test13-q:ii
-Exercise 2: e:6-file:test12-q:iii
-Exercise 1: e:6-file:problem1-q:i
- 
- 
-Version n. 7
-Exercise 1: e:7-file:test3-q:i
-Exercise 2: e:7-file:test3-q:iv
-Exercise 3: e:7-file:test2-q:i
-Exercise 4: e:7-file:test2-q:ii
-Exercise 5: e:7-file:test2-q:iii
-Exercise 6: e:7-file:test1-q:i
-Exercise 7: e:7-file:test4-q:iii
-Exercise 8: e:7-file:test5-fillin-q:i
-Exercise 9: e:7-file:test9-q:iv
-Exercise 10: e:7-file:test14-q:i
-Exercise 11: e:7-file:test11-q:i
-Exercise 12: e:7-file:test11-q:ii
-Exercise 1: e:7-file:test12-q:ii
-Exercise 2: e:7-file:test13-q:i
-Exercise 1: e:7-file:problem1-q:i
- 
- 
-Version n. 8
-Exercise 1: e:8-file:test2-q:ii
-Exercise 2: e:8-file:test3-q:iii
-Exercise 3: e:8-file:test3-q:i
-Exercise 4: e:8-file:test2-q:iii
-Exercise 5: e:8-file:test2-q:i
-Exercise 6: e:8-file:test1-q:ii
-Exercise 7: e:8-file:test9-q:ii
-Exercise 8: e:8-file:test14-q:iii
-Exercise 9: e:8-file:test4-q:v
-Exercise 10: e:8-file:test5-fillin-q:ii
-Exercise 11: e:8-file:test11-q:i
-Exercise 12: e:8-file:test11-q:ii
-Exercise 1: e:8-file:test13-q:iv
-Exercise 2: e:8-file:test12-q:iii
-Exercise 1: e:8-file:problem1-q:i
- 
- 
-Version n. 9
-Exercise 1: e:9-file:test3-q:i
-Exercise 2: e:9-file:test3-q:iv
-Exercise 3: e:9-file:test2-q:ii
-Exercise 4: e:9-file:test2-q:iii
-Exercise 5: e:9-file:test2-q:i
-Exercise 6: e:9-file:test5-fillin-q:i
-Exercise 7: e:9-file:test4-q:iv
-Exercise 8: e:9-file:test9-q:iii
-Exercise 9: e:9-file:test1-q:i
-Exercise 10: e:9-file:test14-q:v
-Exercise 11: e:9-file:test11-q:i
-Exercise 12: e:9-file:test11-q:ii
-Exercise 1: e:9-file:test12-q:i
-Exercise 2: e:9-file:test13-q:ii
-Exercise 1: e:9-file:problem1-q:i
- 
- 
-Version n. 10
-Exercise 1: e:10-file:test3-q:ii
-Exercise 2: e:10-file:test3-q:i
-Exercise 3: e:10-file:test2-q:i
-Exercise 4: e:10-file:test2-q:iii
-Exercise 5: e:10-file:test2-q:ii
-Exercise 6: e:10-file:test5-fillin-q:ii
-Exercise 7: e:10-file:test14-q:iv
-Exercise 8: e:10-file:test9-q:iv
-Exercise 9: e:10-file:test1-q:ii
-Exercise 10: e:10-file:test4-q:ii
-Exercise 11: e:10-file:test11-q:i
-Exercise 12: e:10-file:test11-q:ii
-Exercise 1: e:10-file:test13-q:iii
-Exercise 2: e:10-file:test12-q:ii
-Exercise 1: e:10-file:problem1-q:i
- 
- 

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-sol.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.tex	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.tex	2016-07-30 23:11:21 UTC (rev 41774)
@@ -17,7 +17,7 @@
         \usepackage[utf8]{inputenc}
         \usepackage{lmodern,textcomp}
 \fi\fi
-
+\usepackage{enumitem}
 % +=============================+
 % |         DEFINITIONS         |
 % +=============================+
@@ -24,7 +24,7 @@
 
 \def\examname{The name of the exam}
 \def\numcompiti{10}%%% The number of the versions
-\date{2014/07/22}%%% THE DATE IN THE FORMAT AAAA/M/D
+\date{2014/07/22}%%% THE DATE IN THE FORMAT AAAA/M/D THE DATE IN THE FORMAT YYYY/M/D or D/M/YYYY
 \def\Data{\longdate}%%% or \shortdate: the date in the heading
 %\def\cartella{d:/folder}%%% The folder where are the exercises: by default the current folder%
 %\def\Acapo{\newpage}
@@ -57,7 +57,7 @@
 \section*{Part One}
 
 
-\begin{test}[8]
+\begin{test}[18]
 \begin{questions}
 \ifluatex
 \esercizi{

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

Modified: trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA.tex	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/doc/examples/testA.tex	2016-07-30 23:11:21 UTC (rev 41774)
@@ -1,4 +1,4 @@
-\documentclass[a4paper,english]{article}
+\documentclass[a4paper,italian]{article}
 
 \usepackage[shuffle,xyz,pointsonright,nosolutions,noquizsolutions,twocolumns]{esami}%%%%% TEMA
 \ifluatex
@@ -23,11 +23,13 @@
 % +=============================+
 
 \def\examname{The name of the exam}
-\def\numcompiti{10}%%% The number of the versions
-\date{2014/07/22}%%% THE DATE IN THE FORMAT AAAA/M/D
+\def\numcompiti{1}%%% The number of the versions
+\date{2014/07/22}%%% THE DATE IN THE FORMAT YYYY/M/D or D/M/YYYY
 \def\Data{\longdate}%%% or \shortdate: the date in the heading
 %\def\cartella{d:/folder}%%% The folder where are the exercises: by default the current folder%
 %\def\Acapo{\newpage}
+\usepackage{babel}
+
 \begin{document}
 \testversioni
 \pagestyle{esame}
@@ -57,7 +59,7 @@
 \section*{Part One}
 
 
-\begin{test}[8]
+\begin{test}[18]
 \begin{questions}
 \ifluatex
 \esercizi{

Modified: trunk/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg
===================================================================
--- trunk/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg	2016-07-30 23:11:21 UTC (rev 41774)
@@ -1,11 +1,11 @@
 %% Package `esami' to use with LaTeX 2e
-%%  Copyright (C) 2008-2013  G. Messineo e S. Vassallo
+%%  Copyright (C) 2008-2016  G. Messineo e S. Vassallo
 %%
 %% This is file `esami-xyz.cfg',
 %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% esami-xyz.cfg,             2013-03-20                %%
-%% Copyright (C) 2008-2013 G. Messineo e S. Vassallo    %%
+%% esami-xyz.cfg,             2016-07-27                %%
+%% Copyright (C) 2008-2016 G. Messineo e S. Vassallo    %%
 %%                                                      %%
 %% This program can be redistributed and/or modified    %%
 %% under the terms of the LaTeX Project Public License  %%
@@ -135,3 +135,120 @@
 
 \def\istruzioniii{\setlength{\fboxsep}{1.5ex}\setlength{\fboxrule}{1.2pt}{\sffamily
 \framebox{\parbox{\textwidth}{\textbf{Some other instructions.}}}}\\[3ex]}
+
+ %\AtBeginDocument{
+ %\renewcommand\stepverssols{\immediate\write\sols{{\string\large\string\textbf{\es at solutionname\ \versionname\ n. \thevers}}}
+%}
+ %\renewcommand\closeverssols{
+ %\immediate\write\sols{\string\vspace{5ex}}}
+% }
+
+\AtEndOfPackage{
+\newdimen\punteggio %% NEW 2016/04/11 to check the total score of exercises
+\setlength{\punteggio}{0pt}
+\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
+}
+\renewcommand{\checkpoints}{%
+\ifdim\punteggio=\punti pt %% NEW 2016/04/11 to check the total score of exercises
+           \else
+\PackageError{esami}{\es at pointerrorshort} {\es at pointerrorlong}
+      \fi
+ \global\punteggio=0pt%
+ }
+ }
+
+%%%% %%%%% HERE I GET RID OF THE MINIPAGE IN MULTIPLE CHOICE QUESTIONS
+%\AtEndOfPackage{
+%\renewcommand{\selectrandomly}[1]{%
+%\global\@probN=0\relax
+%\firstpasstrue
+%\tmp at quest=0
+%\input{#1}%%%%%
+%\firstpassfalse%%% now prints the question
+%\tmp at quest=0
+%\input{#1}
+%\@ifundefined{base\nome}{\old at random=\number\randomi %%% 2015/01/16
+%\setrannum{\rnd at cnta}{1}{\@probN}
+%\randomi=\number\old at random
+%\expandafter\global\expandafter\edef\csname base\nome \endcsname{\number\rnd at cnta}
+%}{}
+%\FPeval\restotrentasei{round(\thevers+\thenomefile+1+base\nome-trunc((\thevers+\thenomefile+base\nome)/36:0)*36:0)}
+%\ifcase\@probN\or
+%\def\j at n{1}%%% just one variant
+%\or%%% 2 variants
+%\ifthenelse{\isodd{\thevers}}{\def\j at n{1}}{\def\j at n{2}}
+%\or%%% 3 variants
+%\def\j at n{\ifcase\restotrentasei\or 3\or 2\or 1\or 2\or 1\or 3\or 1\or 3\or 2\or 3\or 1\or 2\or 1\or 2\or 3\or 2\or 3\or 1\or 3\or 2\or 1\or 2\or 1\or 3\or 1\or 3\or 2\or 3\or 1\or 2\or 1\or 2\or 3\or 2\or 3\or 1\fi}%
+%\or%%% 4 variants
+%\def\j at n{\ifcase\restotrentasei\or 3\or 4\or 1\or 2\or 1\or 2\or 3\or 4\or 3\or 1\or 4\or 2\or 4\or 2\or 3\or 1\or 2\or 3\or 1\or 4\or 1\or 4\or 2\or 3\or 3\or 2\or 1\or 4\or 2\or 3\or 4\or 1\or 4\or 3\or 2\or 1\fi}%
+%\or%%% 5 variants
+%\def\j at n{\ifcase\restotrentasei\or 5\or 1\or 2\or 3\or 4\or 5\or 2\or 3\or 5\or 1\or 4\or 3\or 1\or 4\or 2\or 5\or 4\or 2\or 3\or 5\or 1\or 5\or 1\or 4\or 2\or 3\or 1\or 3\or 5\or 4\or 2\or 3\or 4\or 5\or 2\or 1\fi}%
+%\or%%% 6 variants
+%\def\j at n{\ifcase\restotrentasei\or 2\or 5\or 1\or 3\or 4\or 2\or 6\or 1\or 3\or 6\or 5\or 4\or 2\or 3\or 2\or 5\or 4\or 1\or 6\or 1\or 4\or 3\or 2\or 6\or 5\or 4\or 6\or 2\or 5\or 1\or 3\or 6\or 3\or 5\or 1\or 4\fi}%
+%\or%%% 7 variants
+%\def\j at n{\ifcase\restotrentasei\or 2\or 4\or 1\or 5\or 3\or 6\or 7\or 4\or 1\or 5\or 7\or 6\or 2\or 3\or 7\or 2\or 4\or 6\or 5\or 3\or 1\or 3\or 4\or 7\or 2\or 6\or 1\or 5\or 4\or 5\or 6\or 7\or 3\or 2\or 1\or 5\fi}%
+%\or%%% 8 variants
+%\def\j at n{\ifcase\restotrentasei\or 2\or 8\or 6\or 7\or 4\or 3\or 1\or 5\or 8\or 5\or 1\or 3\or 7\or 6\or 4\or 2\or 7\or 1\or 8\or 6\or 3\or 2\or 5\or 4\or 1\or 3\or 7\or 5\or 6\or 4\or 2\or 8\or 4\or 3\or 1\or 5\fi}%
+%\else
+%\FPeval\j at n{round(\thevers*\es at primo+base\nome+1-trunc((\thevers*\es at primo+base\nome)/\number\@probN:0)*\number\@probN:0)}
+%\fi
+%\def\probchosen{\problabel-q:\romannumeral\j at n}
+%\ifes at test
+%\csname @probi-\problabel-q:\romannumeral\j at n \endcsname \vspace{5mm}
+%\Acapo
+%\else
+%\csname @probi-\problabel-q:\romannumeral\j at n \endcsname \vspace{5mm}
+%\Acapo
+%\fi
+%    \ifes at fillin
+%     \immediate\closeout\parametri
+%     \fi
+%}
+%}
+
+%%%% %%%%% HERE I GET RID OF THE MINIPAGE IN EXERCISES
+%\AtEndOfPackage{
+%\renewenvironment{problem}[1][]{%%% it's like exercise, but with points
+%\es at testfalse
+%%\begin{minipage}{\linewidth}  %%% new 2016/02/19
+%\renewcommand{\punti}{#1}
+%\ifes at solutionsonly\else\examenddef\fi
+%\begin{exercise}
+%\ifes at prova
+%\else
+%\ifes at solutions
+%\immediate\write\loe{\es at exercisename\space \theex at no:\space \probchosen}
+%\fi
+%\fi
+%}
+%{
+%\end{exercise}
+%%\end{minipage}%%% new 2016/02/19
+%\ifes at param
+%\immediate\closeout\params
+%\fi}
+%
+%\renewenvironment{problem*}[1][]{\es at testfalse
+%%\begin{minipage}{\linewidth}  %%% new 2016/02/19
+%\renewcommand{\punti}{#1}
+%\ifes at solutionsonly\else\examenddef\fi
+%\begin{exercise*}
+%\ifes at prova
+%\else
+%\ifes at solutions
+%\immediate\write\loe{\es at exercisename\space \theex at no:\space \probchosen}
+%\fi
+%\fi
+%}
+%{
+%\end{exercise*}
+%%\end{minipage}%%% new 2016/02/19
+%\ifes at param
+%\immediate\closeout\params
+%\fi }
+%}

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-UKenglish.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-UKenglish.lng	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-UKenglish.lng	2016-07-30 23:11:21 UTC (rev 41774)
@@ -36,6 +36,9 @@
 \def\es at fpsetparerrshort#1{It's impossible to define the parameter #1}
 \def\es at fpsetparerrlong#1{In the definition of the parameter #1 the lower bound is greater than upper bound}
 
+\def\es at pointerrorshort{Wrong score}
+\def\es at pointerrorlong{In version \thevers\space the total score \the\punteggio\space is different from the expected score \punti \MessageBreak}
+
 %%% The date
 
 \def\es at longdate#1/#2/#3\@empty{\ifcase#3\or

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-USenglish.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-USenglish.lng	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-USenglish.lng	2016-07-30 23:11:21 UTC (rev 41774)
@@ -36,6 +36,9 @@
 \def\es at fpsetparerrshort#1{It's impossible to define the parameter #1}
 \def\es at fpsetparerrlong#1{In the definition of the parameter #1 the lower bound is greater than upper bound}
 
+\def\es at pointerrorshort{Wrong score}
+\def\es at pointerrorlong{In version \thevers\space the total score \the\punteggio\space is different from the expected score \punti \MessageBreak}
+
 %%% The date
 
 \def\es at longdate#1/#2/#3\@empty{\ifcase#2\or

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-french.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-french.lng	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-french.lng	2016-07-30 23:11:21 UTC (rev 41774)
@@ -36,6 +36,9 @@
 \def\es at fpsetparerrshort#1{Ce n'est pas possible de définir #1}
 \def\es at fpsetparerrlong#1{Dans la definition de le paramètre #1 l'extreme inferieur est plus grand que l'extreme superior}
 
+\def\es at pointerrorshort{Score incorrect}
+\def\es at pointerrorlong{Dans la version  \thevers\space le score total \the\punteggio\space est différent du score prévu \punti \MessageBreak}
+
 %% The date
 
 \def\es at longdate#1/#2/#3\@empty{#3\space \ifcase#2\or
@@ -47,7 +50,6 @@
 %%% Useful Language dependent packages
 
 \AtEndOfPackage{
-\catcode`\:=12 %%% for compatibility babel/fp
 \usepackage{geometry}
 \geometry{a4paper,lmargin=6mm,rmargin=18mm,tmargin=6mm,bmargin=18mm,marginparsep=2mm,footskip=1cm}
 \usepackage{icomma}

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-german.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-german.lng	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-german.lng	2016-07-30 23:11:21 UTC (rev 41774)
@@ -8,8 +8,9 @@
 \def\es at pointname{Punkt}
 \def\es at pointsname{Punkte}
 \def\es at exercisename{Aufgabe}
-\def\es at solutionname{L\"{o}sung}
+\def\es at solutionname{\unexpanded{L\"{o}sung}}% modified for input error 
 
+
 %%% Labels (xyz.cfg)
 
 \def\profname{Professor}
@@ -39,6 +40,9 @@
 \def\es at fpsetparerrshort#1{It's impossible to define the parameter #1}
 \def\es at fpsetparerrlong#1{In the definition of the parameter #1 the lower bound is greater than upper bound}
 
+\def\es at pointerrorshort{Falsche Punktzahl}
+\def\es at pointerrorlong{In der Version \thevers\space die Gesamtpunktzahl  \the\punteggio\space unterscheidet sich von der erwarteten Punktzahl \punti \MessageBreak}
+
 %%% The date
 
 \def\es at longdate#1/#2/#3\@empty{#3\space\ifcase#2\or

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-greek.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-greek.lng	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-greek.lng	2016-07-30 23:11:21 UTC (rev 41774)
@@ -39,6 +39,9 @@
 \def\es at fpsetparerrshort#1{It's impossible to define the parameter #1}
 \def\es at fpsetparerrlong#1{In the definition of the parameter #1 the lower bound is greater than upper bound}
 
+\def\es at pointerrorshort{Wrong score}
+\def\es at pointerrorlong{In version \thevers\space the total score \the\punteggio\space is different from the expected score \punti \MessageBreak}
+
 %%% The date
 
 \def\es at longdate#1/#2/#3\@empty{\ifcase#3\or

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-italian.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-italian.lng	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-italian.lng	2016-07-30 23:11:21 UTC (rev 41774)
@@ -38,6 +38,9 @@
 \def\es at fpsetparerrshort#1{Non si può definire il parametro #1}
 \def\es at fpsetparerrlong#1{Nella definizione del parametro #1 l'estremo inferiore è maggiore dell'estremo superiore}
 
+\def\es at pointerrorshort{Punteggio sbagliato}
+\def\es at pointerrorlong{Nella versione \thevers\space il punteggio totale \the\punteggio\space è diverso dal punteggio previsto \punti \MessageBreak}
+
 %%% The date
 
 \def\es at longdate#1/#2/#3\@empty{#3\space%%% the date
@@ -53,21 +56,23 @@
 %%% Useful Language dependent packages
 
 \AtEndOfPackage{
-\usepackage{babel}
-\NoIntelligentComma
+\usepackage[italian]{babel}
+%\NoIntelligentComma
 \usepackage{geometry}
 \geometry{a4paper,lmargin=6mm,rmargin=22mm,tmargin=10mm,bmargin=18mm,marginparsep=2mm,footskip=1cm}
 \usepackage{icomma}
 \usepackage{eurosym}
-\usepackage[np,autolanguage]{numprint}
-\newcommand*\npstyleitalian{%
+%\usepackage[np,autolanguage]{numprint}
+\usepackage[np]{numprint}
+%\newcommand*\npstyleitalian{%
 \npthousandsep{\,}%
-\npdecimalsign{,}%
+%\npdecimalsign{,}%
 \npproductsign{\ensuremath{\cdot}}%
 \npunitseparator{~}%
  \npthousandthpartsep{}
-}
- \npfourdigitnosep
+\npfourdigitnosep
+%}
+ % \npaddtolanguage{italian}{italian}
  \DeclareRobustCommand{\officialeuro}{%
   \ifmmode\expandafter\text\fi
   {\fontencoding{U}\fontfamily{eurosym}\selectfont e}}%euro in math

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-serbian.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-serbian.lng	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-serbian.lng	2016-07-30 23:11:21 UTC (rev 41774)
@@ -39,6 +39,9 @@
 \def\es at fpsetparerrshort#1{It's impossible to define the parameter #1}
 \def\es at fpsetparerrlong#1{In the definition of the parameter #1 the lower bound is greater than upper bound}
 
+\def\es at pointerrorshort{Wrong score}
+\def\es at pointerrorlong{In version \thevers\space the total score \the\punteggio\space is different from the expected score \punti \MessageBreak}
+
 %%% The date
 
 \def\es at longdate#1/#2/#3\@empty{#3\space\ifcase#2\or

Modified: trunk/Master/texmf-dist/tex/latex/esami/es-spanish.lng
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/es-spanish.lng	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/es-spanish.lng	2016-07-30 23:11:21 UTC (rev 41774)
@@ -1,4 +1,4 @@
-%%% Spanish translation by Mar\xEDa Hern\xE1ndez Cifre
+%%% Spanish translation by María Hernández Cifre
 
 
 %%% Labels (esami.sty)
@@ -8,7 +8,7 @@
 \def\es at pointname{punto}
 \def\es at pointsname{puntos}
 \def\es at exercisename{Ejercicio}
-\def\es at solutionname{Soluci\'on}
+\def\es at solutionname{\unexpanded{Soluci\'on}}
 
 %%% Labels (xyz.cfg)
 
@@ -17,28 +17,31 @@
 \def\studlastname{Apellido}
 \def\studfirstname{Nombre}
 \def\studid{Identificaci\'on del alumno}
-\def\versionname{Versi\'on}
+\def\versionname{\unexpanded{Versi\'on}}
 \def\pagename{P\'agina}
 \def\solutionsname{Soluciones}
 
 %%% Error Messages
 
-\def\es at cfgerrormessageshort{La opci\xF3n \CurrentOption\space no existe}
-\def\es at cfgerrormessagelong{El paquete esami necesita una opci\xF3n para la configuraci\xF3n del fichero}
-\def\es at numcompitierror{Es necesario especificar el n\xFAmero de versiones!}
+\def\es at cfgerrormessageshort{La opci\'{o}n \CurrentOption\space no existe}
+\def\es at cfgerrormessagelong{El paquete esami necesita una opción para la configuración del fichero}
+\def\es at numcompitierror{Es necesario especificar el número de versiones!}
 \def\es at mastererror{AVISO: NO SE PUEDE COMPILAR EL FICHERO PRINCIPAL:\MessageBreak
         PRESIONE 'x' PARA SALIR Y RENOMBRE EL FICHERO}
-\def\es at zerodenerror#1#2{El denominador de la fracci\xF3n #1/#2 en el ejercicio \nome \space es 0}
-\def\es at zeronumerrorshort#1#2{La fracci\xF3n #1/#2 en el ejercicio \nome \space vale 0}
-\def\es at zeronumerrorlong#1#2{Si la fracci\xF3n puede ser 0, debe utilizar el comando "sempliz"}
-\def\es at fraconewarn#1#2{La fracci\xF3n #1/#2 en el ejercicio \nome \space vale 1}
+\def\es at zerodenerror#1#2{El denominador de la fracción #1/#2 en el ejercicio \nome \space es 0}
+\def\es at zeronumerrorshort#1#2{La fracción #1/#2 en el ejercicio \nome \space vale 0}
+\def\es at zeronumerrorlong#1#2{Si la fracción puede ser 0, debe utilizar el comando "sempliz"}
+\def\es at fraconewarn#1#2{La fracción #1/#2 en el ejercicio \nome \space vale 1}
 \def\es at radicalerror{El radicando en el ejercicio \nome \space es negativo}
-\def\es at fpsetparerrorshort{No se verifican todas las condiciones despu\xE9s de \maxLoopLimit\space intentos}
+\def\es at fpsetparerrorshort{No se verifican todas las condiciones después de \maxLoopLimit\space intentos}
 \def\es at EstraiMessage#1#2{\string\textbf\string{\string\noindent\space Las expresiones $#2i$, $#2ii$ \string\dots\space
                 toman los valores #1 \string}\string\newline}
-\def\es at fpsetparerrshort#1{No es posible definir el par\xE1metro #1}
-\def\es at fpsetparerrlong#1{En la definici\xF3n del par\xE1metro #1   la cota inferior es mayor de la cota superior}
+\def\es at fpsetparerrshort#1{No es posible definir el parámetro #1}
+\def\es at fpsetparerrlong#1{En la definición del parámetro #1   la cota inferior es mayor de la cota superior}
 
+\def\es at pointerrorshort{Wrong score}
+\def\es at pointerrorlong{En la versión \thevers\space la puntuación total score \the\punteggio\space es diferente de la puntuación prevista \punti \MessageBreak}
+
 %%% The date
 
 \def\es at longdate#1/#2/#3\@empty{#3\space \ifcase#2\or

Modified: trunk/Master/texmf-dist/tex/latex/esami/esami.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/esami/esami.sty	2016-07-30 23:10:23 UTC (rev 41773)
+++ trunk/Master/texmf-dist/tex/latex/esami/esami.sty	2016-07-30 23:11:21 UTC (rev 41774)
@@ -2,8 +2,8 @@
 %% This is file `esami.sty',
 %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% esami.sty package,             2015-02-25            %%
-%% Copyright (C) 2008-2015  G. Messineo e S. Vassallo   %%
+%% esami.sty package,             2016-07-25            %%
+%% Copyright (C) 2008-2016  G. Messineo e S. Vassallo   %%
 %%                                                      %%
 %% This program can be redistributed and/or modified    %%
 %% under the terms of the LaTeX Project Public License  %%
@@ -27,14 +27,18 @@
 %Modified the algorithm of choice of a variant of an exercise, now completely deterministic.
 % Added the command \cmd{\Acapo}. Added the serbian localization (latin alphabet).
 %The compilation produces a new file with the list of the chosen exercises.
+% Version 2.1
+% 2016/07/25
+%Modified es-german.lng and es-spanish.lng for an error in the input of the solutions. Introduced the macro randestrai.
+%Introduced the macro FPsignpol. Introduced a control on the total points of the exercises. Solved the incompatibility
+%with babel for the Spanish language. Removed the incompatibility between the command \fillin and the commands \sempli and \semplix.
 
 \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{esami}
-    [2015/02/25 v2.0 An Exam Construction Package]
+    [2016/07/25 v2.1 An Exam Construction Package]
 
 % +=============================+
 % |         THE OPTIONS         |
 % +=============================+
-%\usepackage{etex}
 \newif\ifes at language \es at languagefalse
 \DeclareOption{italian}{\InputIfFileExists{es-\CurrentOption.lng}%
    { \es at languagetrue \typeout{esami: Verrà usata la lingua italiana}}%
@@ -86,12 +90,11 @@
 \AtEndDocument{
 \immediate\closeout\loe
 \immediate\closeout\parametri
-\immediate\closeout\sols
-%%%%% 2013-06-03                                                            %
+\immediate\closeout\sols                                                         %
 \stringasol} %%%%
 }%%% for solutions
 \DeclareOption{nosolutions}{\es at solutionsfalse}%%% no solutions (default)
-\newif\ifes at noquizsolutions \es at noquizsolutionstrue % NEW  2014
+\newif\ifes at noquizsolutions \es at noquizsolutionstrue
 \DeclareOption{noquizsolutions}{\es at noquizsolutionstrue}
 \DeclareOption{quizsolutions}{\es at noquizsolutionsfalse}
 \DeclareOption*{\InputIfFileExists{esami-\CurrentOption.cfg}{}%%% reads a configuration file
@@ -99,9 +102,9 @@
    {\es at cfgerrormessagelong}
    }}
 \newif\ifes at autopst \es at autopstfalse%%% Do I need auto-pst?
-\newif\ifes at pst \es at pstfalse%%% Do I need pstricks? %%% NEW for tikz 2014.3.3
+\newif\ifes at pst \es at pstfalse%%% Do I need pstricks?
 \DeclareOption{autopstoff}{\es at psttrue \es at autopstfalse}%%% autopstpdf inactive (default) %
-\DeclareOption{autopston}{\es at psttrue  \es at autopsttrue }%%%% autopstpdf active %%% NEW for tikz 2014.3.3
+\DeclareOption{autopston}{\es at psttrue  \es at autopsttrue }%%%% autopstpdf active
 \newif\ifes at prova \es at provafalse
 \DeclareOption{prova}{\es at solutionstrue \es at provatrue \es at randomizeChoicesfalse \es at noquizsolutionsfalse}%%% for the file "totale-versioni"
 \DeclareOption{correzione}{\es at correzionetrue \es at solutionsfalse}%%% to print all the exercises with solutions only
@@ -249,7 +252,7 @@
 \newcount\tmp at quest %%% the number of the exercise
 \newcount\@probselN %%% in \selectrandomlyn
 \newcount\@shfctr \newcount\@shfA \newcount\@shfB %%% In "\shuffle"
-\newcount\icount  %%% contatore per mischiare esercizi
+\newcount\icount  %%% counter to shuffle exercises
 \newcount\io
 \newcount\inizio
 \inizio=1
@@ -277,8 +280,11 @@
 \renewcommand{\theesquestionnoii}{\alph{esquestionnoii}}
 \newcounter{esquestionnoiii}
 \renewcommand{\theesquestionnoiii}{\roman{esquestionnoiii}}
+%\newdimen\punteggio %% NEW 2016/04/11 to check the total score of exercises
+%\setlength{\punteggio}{0pt}
+\newcommand\checkpoints\relax
+\def\es at primo{1433}
 
-\def\es at primo{1237}
 
 %========================================================%
 %                  test                                  %
@@ -367,16 +373,16 @@
 %           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
+%\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
+%\fi
 %========================================================%
 %               fractions                                %
 %========================================================%
@@ -459,6 +465,15 @@
     }
 
 %========================================================%
+%               Coefficients of polynomial               %
+%========================================================%
+
+\newcommand{\FPsignpol}[2] %%% adapted from code contributed by Hjalmar Basile NEW 2016/04/11
+{\FPval\tempsign{#1}
+\ifnum \tempsign<0 {\semplix{\tempsign}{1}#2}\else \ifnum \tempsign>0{+\semplix{\tempsign}{1}#2}\else{}\fi\fi
+}
+
+%========================================================%
 %          Commands adapted from exerquiz                %
 %========================================================%
 
@@ -467,6 +482,8 @@
 \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
@@ -476,7 +493,35 @@
 \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                 %
 %========================================================%
@@ -529,7 +574,6 @@
 }
 
 %%%%%%% Fill in %%%%%%
-%%%% NEW  fillin 2013-06-03
 \newcommand\fillinproblem{\es at fillintrue%
 \ifes at solutions
 \immediate\openout\parametri=qf\nome q\romannumeral\tmp at quest e\thevers.parametri.tex
@@ -562,13 +606,12 @@
  }
 
 %%%%% 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\stepvers{\stepcounter{vers}\ifes at solutions
-\immediate\write\sols{\string\begin{minipage}{.33\string\textwidth}
-{\string\large\string\textbf{\es at solutionname\ \versionname\ n. \thevers}}}
+\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\immediate\write\sols{\string\end{minipage}
-   \string\vspace{5ex}}
+   \newcommand\closevers{\newpage\setcounter{page}{1}\setcounter{ex at no}{0}\ifes at solutions\closeverssols
    \immediate\write\loe{\space}
    \immediate\write\loe{\space}
    \fi}
@@ -620,7 +663,7 @@
 \stepcounter{n at par}%
 \setcounter{fp at contatore}{-\value{vers}}%
 \randomi=\randomico%
-\addtocounter{fp at contatore}{-#3}%
+\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)
@@ -653,81 +696,7 @@
 \randomi=\number\old at randomi%%% restores the seed
 }%
 \fi
-%%%%%% Alternative definitions of \FPsetpar with different randomization process (we left them for archive purposes) %%%%
 
-%\newcommandx{\FPsetpar}[5][1=\seme,5={}]{%
-%\stepcounter{n at par}
-%\FPeval\diff{round(#4-#3+1:0)}
-%\pdfsetrandomseed #1
-%\setcounter{fp at contatore}{-\value{vers}}%
-%\tmp at cnt=\pdfuniformdeviate \diff
-%\FPeval\tmp at seed{round(#1+\then at par:0)}
-%\pdfsetrandomseed \tmp at seed %%% aggiunta 2010.04.19
-%\addtocounter{fp at contatore}{-#3}
-%\FPeval\tmp at seed{round(tmp at seed+\thevers:0)}
-%\pdfsetrandomseed \tmp at seed%%% aggiunta 2010.04.19
-%\whiledo{\value{fp at contatore}<\value{questionno}}
-%{\tmp at cnt=\pdfuniformdeviate \diff \stepcounter{fp at contatore}}
-%\FPeval{fp at tmp}{round((1-1/\diff)*\number\tmp at cnt+#3:0)}
-% \def\rand at ne{#5}
-%    \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\fp at tmp=\ne@@tmp\relax
-%                        \multiply\rnd at cnt0\relax
-%                    \else
-%                       \multiply\rnd at cnt1\relax
-%                    \fi
-%                }
-%                \ifnum\rnd at cnt=1\relax
-%                    \loopCnt=\maxLoopLimit
-%                \else
-%                    \advance\loopCnt1\relax
-%                    \ifnum\loopCnt=\maxLoopLimit
-%                        \PackageWarning{esami}{Non sono state soddisfatte tutte le condizioni
-%                            dopo \maxLoopLimit\space tentativi}
-%                    \else
-%                        \tmp at cnt=\pdfuniformdeviate \diff
-%                    \FPeval{fp at tmp}{round((1-1/\diff)*\number\tmp at cnt+#3:0)}
-%                    \fi
-%                \fi
-%            }%
-%        \fi
-%\FPeval{#2}{round((1-1/\diff)*\number\tmp at cnt+#3:0)}}
-%
-%\newcommand{\FPsetpar}[4][\seme]{%
-%\gdef\#2min{#3}
-%  \gdef\#2max{#4}
-%\old at randomi=\number\randomi
-%\stepcounter{n at par}
-%\setcounter{fp at contatore}{-\value{vers}}
-%\setrannum{\tmp at cnt}{#3}{#4}
-%\randomi=#1
-%\advance\randomi\value{n at par}
-%\addtocounter{fp at contatore}{-#3}
-%\advance\randomi\value{vers}
-%\whiledo{\value{fp at contatore}<\value{questionno}}{\nextrandom\stepcounter{fp at contatore}}%{\nextrandom\setrannum{\tmp at cnt}{#3}{#4} \stepcounter{fp at contatore}}
-%\setrannum{\tmp at cnt}{#3}{#4}
-%%\def\s at ss{#2}
-%\FPeval{#2}{round(\number\tmp at cnt:0)}
-%\ifes at fillin
-%          \expandafter\immediate\write\parametri{\string\FPeval\string{#2\string}\string{round(\number\tmp at cnt:0)\string}}
-% \fi
-% \randomi=\number\old at randomi
-%}
-%
-%\newcommand{\FPsetpar}[4][\seme]{%
-%\setcounter{fp at contatore}{-\value{vers}}
-%\FPeval\dud{round(#1:0)}
-%\FPseed=\dud
-%\whiledo{\value{fp at contatore}<\value{questionno}}{
-%\FPrandom\tmp at cnt
-%\FPeval{#2}{trunc((#4+1-#3)*tmp at cnt+#3:0)}
-%\stepcounter{fp at contatore}
-%}
-%}
-
 %%%% Command for random sign (taken from rangen)  %%%%%
 \newcommand{\RandS}{%
 \setrannum{\rnd at cnts}{0}{1}
@@ -737,8 +706,17 @@
 -
 \fi}%
 
-%%% Modified commands for parametric version in "totale-versioni"
+%=========================================================================%
+%   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}}}
@@ -927,7 +905,6 @@
 \fi
 \fi
 
-%%%% NEW  fillin 2013-06-03
 \newcommand{\newfillinproblem}[1]{ \newproblem{\fillinproblem #1}}
 
 %%%%%%%% \selectrandomly %%%%%%%
@@ -1018,7 +995,6 @@
 \global\advance\j at m by 1\relax
 }}
 
-%%%%%%%%%%%% NEW 2013-06-05
 %%% working with datasets of exercises (you can choose more than one exercise from a file)
 
 \newif\ifes at db %% to work with datasets
@@ -1071,13 +1047,10 @@
 
 \def\defitem{%
   \advance\icount by1
-  %%% IT defines a macro called "\prbl n" where "n" is the number of the item.
+  %%% It defines a macro called "\prbl n" where "n" is the number of the item.
   \expandafter\def \csname prbl\romannumeral\icount \endcsname
 }
 
-
-%\def\@getitems#1#2#3{\rand at getitems{#2}{#3}[#1]}%
-
 \newcommand{\esercizidb}[1]{
  \icount=0
 \input{#1.tex}%
@@ -1110,8 +1083,6 @@
     \ifnum\io > 0 \repeat
  \par}
 
-
-
 % +=============================+
 % |        ENVIRONMENTS         |
 % +=============================+
@@ -1133,6 +1104,12 @@
              \ifes at twocolumns
             \end{multicols}
             \fi
+      %                  \ifdim\punteggio=\punti pt %% NEW 2016/04/11 to check the total score of exercises
+%           \else
+%            \PackageError{esami}{\es at pointerrorshort} {\es at pointerrorlong}
+%  \fi
+%            \global\punteggio=0pt
+\checkpoints
             \end{shortquiz}
 }
 
@@ -1339,7 +1316,7 @@
 }
 \def\@findendans{\@ifnextchar\end{}{\expandafter\@findendans\@gobble}}
 
-\ifes at noquizsolutions %%%% NEW 2014 solutions for test
+\ifes at noquizsolutions
 \def\solution at sq{\gobbleenv}
 \def\endsolution at sq{\endgobbleenv}
 \else
@@ -1505,11 +1482,60 @@
 \fi
 }
 {
+\checkpoints
 \end{exercise*}
 \ifes at param
 \immediate\closeout\params
 \fi }
 
+%%%%%%%%   Problem in minipage
+
+\newenvironment{problemmp}[1][]{%%% it's like exercise, but with points
+\es at testfalse
+\begin{minipage}{\linewidth}  %%% new 2016/02/19
+\renewcommand{\punti}{#1}
+\ifes at solutionsonly\else\examenddef\fi
+\begin{exercise}
+\ifes at prova
+\else
+\ifes at solutions
+\immediate\write\loe{\es at exercisename\space \theex at no:\space \probchosen}
+\fi
+\fi
+}
+{
+\end{exercise}
+\end{minipage}%%% new 2016/02/19
+\ifes at param
+\immediate\closeout\params
+\fi}
+
+\newenvironment{problemmp*}[1][]{\es at testfalse
+\begin{minipage}{\linewidth}  %%% new 2016/02/19
+\renewcommand{\punti}{#1}
+\ifes at solutionsonly\else\examenddef\fi
+\begin{exercise*}
+\ifes at prova
+\else
+\ifes at solutions
+\immediate\write\loe{\es at exercisename\space \theex at no:\space \probchosen}
+\fi
+\fi
+}
+{
+%\ifdim\punteggio=\punti pt
+%           \else
+%            \PackageError{esami}{\es at pointerrorshort}
+%   {\es at pointerrorlong}
+%  \fi
+%            \global\punteggio=0pt %% NEW 2016/04/11 to check the total score of exercises
+\checkpoints
+\end{exercise*}
+\end{minipage}%%% new 2016/02/19
+\ifes at param
+\immediate\closeout\params
+\fi }
+
 %%%%%%%% Domanda %%%%%%%%
 %%%%  (it can be used to hide the text of the exercise and print only the solution) %%%
 
@@ -1768,7 +1794,7 @@
 \newcommand\shuf at ifch[3]{%  #2=the input item
 \ifthenelse{\not\equal{\shuf at ch}{#1}}{\stepcounter{shuf at lop}\expandafter\edef\csname #2\theshuf at lop\endcsname{#3}}{}%
 }
-\newcommand\es at item[2]{%%% #1=the list #2=name of the input item
+\newcommand\esami at item[2]{%%% #1=the list #2=name of the input item
   \edef\es at Lista{\zap at space#1 \@empty}%
     \@for\shuf at ch:=\es at Lista\do{%
     \shuf at ifch{}{#2}{\shuf at ch}%
@@ -1777,7 +1803,7 @@
 \newcommand{\sh at chex}[2]{%%% #1=the list #2=name of the input item
 \setcounter{shuf at lop}{0}%
 \renewcommand{\theshuf at lop}{\roman{shuf at lop}}%
-\es at item{#1}{#2}%
+\esami at item{#1}{#2}%
 \renewcommand{\theshuf at lop}{\arabic{shuf at lop}}%
 }
 
@@ -1873,9 +1899,9 @@
     }%
 \fi
 
-%%% \esestrai is the user command to extract exercises  from the list #2 leaving out #1 elements.
+%%% \esestrai is the user command to  extract exercises  from the list #2 leaving out #1 elements.
 
-\newcommand{\estraies}[2][0]{\randes at trai[#1]{#2}{tmp at out}
+\newcommand{\estraies}[2][0]{\es at trai[#1]{#2}{tmp at out}
   \tmp at cnt=\value{shuf at lop}
   \advance\tmp at cnt by -#1
   \loop
@@ -1883,6 +1909,15 @@
     \advance\tmp at cnt by-1
     \ifnum\tmp at cnt>0
     \repeat}%
+%%% New user command to (randomly) extract  exercises  from the list #2 leaving out #1 elements.  NEW 2015.09.14
+\newcommand{\randestraies}[2][0]{\randes at trai[#1]{#2}{tmp at out}
+  \tmp at cnt=\value{shuf at lop}
+  \advance\tmp at cnt by -#1
+  \loop
+    \selectrandomly{\cartella/\csname tmp at out\romannumeral\tmp at cnt\endcsname}
+    \advance\tmp at cnt by-1
+    \ifnum\tmp at cnt>0
+    \repeat}%
 
 %%% \esercizi is the command that selects and shuffles the exercises from the list #1
 
@@ -1950,7 +1985,6 @@
 }
 \fi
 
-%%%% new 2013-06-05
 %%% another shuffling macro
 \newcommand{\shuffle}[3][]{% %%% this command has been adapted from probsoln
   \@shfctr=1\relax



More information about the tex-live-commits mailing list