From 57d4d64524ef6e9e6589a8f2744a981649606ea0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 6 Jul 2017 21:26:59 +0000 Subject: esami (6jul17) git-svn-id: svn://tug.org/texlive/trunk@44758 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/esami/README | 16 +- Master/texmf-dist/doc/latex/esami/VERSION | 2 +- .../doc/latex/esami/doc/esami-doc-en.pdf | Bin 457576 -> 458631 bytes .../doc/latex/esami/doc/esami-doc-en.tex | 20 ++- .../doc/latex/esami/doc/esami-doc-it.pdf | Bin 464562 -> 510417 bytes .../doc/latex/esami/doc/esami-doc-it.tex | 13 +- .../doc/latex/esami/doc/examples/aperto1.tex | 1 + .../doc/latex/esami/doc/examples/test1.tex | 7 +- .../doc/latex/esami/doc/examples/test14.tex | 173 +++++++++++++++++++++ .../doc/latex/esami/doc/examples/test2.tex | 11 ++ .../doc/latex/esami/doc/examples/testA-sol.pdf | Bin 230852 -> 232036 bytes .../doc/latex/esami/doc/examples/testA-sol.tex | 67 ++++---- .../doc/latex/esami/doc/examples/testA.pdf | Bin 193516 -> 199475 bytes .../doc/latex/esami/doc/examples/testA.sol.tex | 22 +++ .../doc/latex/esami/doc/examples/testA.tex | 61 ++++---- Master/texmf-dist/doc/latex/esami/esami-xyz.cfg | 114 +++++++++++++- Master/texmf-dist/tex/latex/esami/es-UKenglish.lng | 9 +- Master/texmf-dist/tex/latex/esami/es-french.lng | 7 +- Master/texmf-dist/tex/latex/esami/esami.sty | 101 ++++++++++-- 19 files changed, 513 insertions(+), 111 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/esami/doc/examples/aperto1.tex create mode 100644 Master/texmf-dist/doc/latex/esami/doc/examples/testA.sol.tex (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/esami/README b/Master/texmf-dist/doc/latex/esami/README index 38741054280..b7834042aa6 100644 --- a/Master/texmf-dist/doc/latex/esami/README +++ b/Master/texmf-dist/doc/latex/esami/README @@ -1,6 +1,6 @@ -The esami package v. 2.1 +The esami package v. 2.2 For generation of texts and solutions of exams in LaTeX -2016/07/25 +2017/07/01 File: README Author: Grazia Messineo and Salvatore Vassallo @@ -14,7 +14,7 @@ varying in random order, with closed or open answer, matching, problems, and so 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--2016 Grazia Messineo & Salvatore Vassallo +Copyright: (C) 2008--2017 Grazia Messineo & Salvatore Vassallo Licence: LPPL FILES IN DISTRIBUTION @@ -50,21 +50,21 @@ FILES IN DISTRIBUTION test4.tex test5-fillin.tex test9.tex - test11.tex + test11.tex test12.tex test13.tex test14.tex Exercises with open answers problem1.tex - problem2.tex + problem2.tex problem2-tabella.tex problem3-matching.tex problem4-fillin.tex Examples of an exam (and solutions) built using above exercises using pdflatex, xelatex and lualatex - testA.pdf - testA.tex + testA.pdf + testA.tex testA-luatex-sol.pdf testA-luatex.pdf testA-sol.pdf @@ -93,4 +93,4 @@ File sty and files cfg and lng must be copied in a folder where LATEX can find t 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 diff --git a/Master/texmf-dist/doc/latex/esami/VERSION b/Master/texmf-dist/doc/latex/esami/VERSION index 9cd6d201d23..874b5b91bb6 100644 --- a/Master/texmf-dist/doc/latex/esami/VERSION +++ b/Master/texmf-dist/doc/latex/esami/VERSION @@ -1 +1 @@ -VERSION 2.1 DATE=July 25, 2016 +VERSION 2.2 DATE=July 01, 2017 diff --git a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.pdf b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.pdf index 3f5b7be70d0..f23eb1c36c6 100644 Binary files a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.pdf and b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.pdf differ diff --git a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex index 1e755c1e7d9..b3b221755a6 100644 --- a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex +++ b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex @@ -74,7 +74,7 @@ \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}.} - +\changes{Version 2.2}{2017/07/01}{Introduced the possibility to have two different seeds for the choice of exercises (\cmd{\semeex}) and for the permutations and choice of the parameters (\cmd{\seme}): by default, they are equal. Slightly modified the command \cmd{\estrai} so that it is possible to use it to extract parameters from a list. Documentation integrated.} %\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 @@ -83,8 +83,8 @@ \fontshape\updefault \footnotesize} \GetFileInfo{esami.sty} -\def\fileversion{version 2.1} -\def\filedate{2016/07/1} +\def\fileversion{version 2.2} +\def\filedate{2017/07/1} \title{Package esami\thanks{This document @@ -165,12 +165,14 @@ the routine for the compilation of variants begins here and it will end at the e 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.} + \nuovo{vers. 2.2} It is now possible to define in a different way the seed for permutations (\cmd{\seme}) and the one for the choice of the exercises (\cmd{\semeex}): the need arises from the request to be able to choose for each exam the same exercises for all the students (\cmd{\semeex} depends only on the date), but also to be able to permute them in each version. \begin{verbatim} \permuta \testa \istruzionii \end{verbatim} \cmd{\testa}, \cmd{\istruzionii} are defined in the configuration file and contain the instructions for the heading and the instructions for the exam, while the macro \cmd{\permuta} allows the randomization of exercises order. + \begin{verbatim} \begin{test}[points] \begin{questions} @@ -199,7 +201,7 @@ It ends the routine for the compilation. The macro \verb+\def\stringasol{}+ is u \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} +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. This possibility can be excluded by commenting in the configuration file the definition of the command \cmd{\checkpoints}. \nuovo{vers. 2.1} \section{Package options}\label{sec:opzioni} The package can be loaded with the usual command @@ -451,6 +453,8 @@ The syntax is:\\ 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}). +If the answer contains mathematical expressions, it must be written between \$\ even if the command \cmd{\fillin} is already contained in a mathematical environment. + 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) this environment must contain the text of the exercise (not the solution). It is used in \envname{problem} and \envname{problem*} and with the package option \optname{solutionsonly} only the solution of the exercise is printed and not the text. In previous versions of this package (not released to CTAN) there was another environment in order to obtain this. @@ -595,7 +599,7 @@ create two parameters, \cmd{\a} (which can be a random value between 2 and 10, e You can work on the parameters defined with this command as on numbers and we have defined commands which allow to work on them showing both the numerical result and the operations in a parametric form. \begin{itemize} - \item {\color{blue}{\cmd{\FPsv}\oarg{decimal}\marg{operation}}}:\DescribeMacro{\FPsv}\ it is used to do operations (on numbers or parameters) obtaining or the numeric value with \meta{decimal} decimal places (by default 0 decimal places), eliminating the useless zeroes or, with the option \optname{param} in the package, the typesetting of the operation (if you choose the option \optname{param} in the package \pkgname{esami}). + \item {\color{blue}{\cmd{\FPsv}\oarg{decimal places}\marg{operation}}}:\DescribeMacro{\FPsv}\ it is used to do operations (on numbers or parameters) obtaining or the numeric value with \meta{decimal} decimal places (by default 0 decimal places), eliminating the useless zeroes or, with the option \optname{param} in the package, the typesetting of the operation (if you choose the option \optname{param} in the package \pkgname{esami}). \begin{esempio} \begin{center} @@ -631,9 +635,9 @@ The fundamental characteristics of the command \cmd{\FPsv} are (in the examples, \item Attention must be paid to the fact that the package \pkgname{fp} cannot handle powers with a negative basis. \end{itemize} - \item {\color{blue}{\cmd{\FPval}\marg{name}\marg{operation}}}:\DescribeMacro{\FPval}\ + \item {\color{blue}{\cmd{\FPval}\marg{name}\oarg{decimal places}\marg{parameter/operation on parameters}}}:\DescribeMacro{\FPval}\ it assigns to \marg{nome} the rounded value of the operation (it is the command \cmd{\FPeval} from \pkgname{fp}, modified) or it prints the operation if you choose the option \optname{param} in the package \pkgname{esami}, as - with \cmd{\FPsv}. The result is given with the chosen number of decimal places, eliminating the useless zeroes. + with \cmd{\FPsv}. The result is given with the chosen number of decimal places, eliminating the useless zeroes.\nuovo{vers. 2.0} \begin{esempio} Let $k=2$. The code \begin{verbatim} @@ -778,10 +782,10 @@ Inside this file you should use only one command, \cmd{\def \textbackslash eserc \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}. + \item[Version 2.2 (2017/07/01)]Introduced the possibility to have two different seeds for the choice of exercises (\cmd{\semeex}) and for the permutations and choice of the parameters (\cmd{\seme}): by default, they are equal. Slightly modified the command \cmd{\estrai} so that it is possible to use it to extract parameters from a list. Documentation integrated. \end{description} \bibliographystyle{plain} \bibliography{esami} \end{document} - diff --git a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.pdf b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.pdf index cf3c0db9835..a4b60f060fe 100644 Binary files a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.pdf and b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.pdf differ diff --git a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex index ab71d52a61d..18cf80123f2 100644 --- a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex +++ b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex @@ -73,6 +73,7 @@ \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}.} +\changes{Versione 2.2}{2017/07/01}{Introdotta la possibilità di avere due semi diversi per la scelta degli esercizi (\cmd{\semeex}) e per le permutazioni e scelta dei parametri (\cmd{\seme}): di default sono uguali. Leggermente modificato il comando \cmd{\estrai} così da poter essere usato per estrarre parametri numerici da una lista. Integrata la documentazione.} %\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 +82,8 @@ \fontshape\updefault \footnotesize} \GetFileInfo{esami.sty} -\def\fileversion{versione 2.1} -\def\filedate{2016/07/1} +\def\fileversion{versione 2.2} +\def\filedate{2017/07/1} \title{Il pacchetto esami\thanks{Questo documento @@ -157,9 +158,11 @@ Il comando \cmd{\Data} stamperà la data in formato lungo (D MMMM YYYY \cmd{\lo inizia la routine di compilazione delle varianti che terminerà alla fine del documento. \begin{verbatim} \FPeval\seme{round((\thenomefile+\thevers):0)} +%\FPeval\semeex{round(\thenomefile+1-trunc(\thenomefile/(2^31-1):0)*(2^31-1):0)} \randomi=\seme \end{verbatim} 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.} +\nuovo{vers. 2.2} È possibile ora definire in modo diverso il seme per le permutazioni (\cmd{\seme}) e quello per la scelta degli esercizi (\cmd{\semeex}): l'esigenza è nata dalla richiesta di poter scegliere per ogni compito gli stessi esercizi per tutti gli studenti (\cmd{\semeex} dipende solo dalla data), ma di poterli permutare in ogni versione. \begin{verbatim} \permuta \testa @@ -193,7 +196,7 @@ Termina la routine di compilazione. L'istruzione \verb|\def\stringasol{}| serve \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} +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} Tale possibilità può essere esclusa commentando nel file di configurazione la definizione del comando \cmd{\checkpoints}. \section{Le opzioni del pacchetto}\label{sec:opzioni} Per usare il pacchetto bisogna usare il solito comando @@ -465,6 +468,8 @@ I due parametri obbligatori sono la \marg{larghezza dello spazio} da lasciare, c 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. +Se la risposta contiene espressioni matematiche, deve essere inserita esplicitamente tra \$\ anche se il comando \cmd{\fillin} è già contenuto in un ambiente matematico. + %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} @@ -523,6 +528,7 @@ La sintassi è \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. +Come per le domande a risposta chiusa, le risposte che contengono il carattere di tabulazione \&\ devono essere racchiuse tra parentesi graffe. Questo tipo di esercizio funziona con \Hologo{XeLaTeX}, ma non con \Hologo{LuaLaTeX}. \begin{esempio} @@ -778,6 +784,7 @@ Al suo interno si deve usare un solo comando, \cmd{\def \textbackslash esercizio \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}. + \item[Versione 2.2 (2017/07/01)] {Introdotta la possibilità di avere due semi diversi per la scelta degli esercizi (\cmd{\semeex}) e per le permutazioni e scelta dei parametri (\cmd{\seme}): di default sono uguali. Leggermente modificato il comando \cmd{\estrai} così da poter essere usato per estrarre parametri numerici da una lista. Integrata la documentazione.} \end{description} diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/aperto1.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/aperto1.tex new file mode 100644 index 00000000000..db047756ead --- /dev/null +++ b/Master/texmf-dist/doc/latex/esami/doc/examples/aperto1.tex @@ -0,0 +1 @@ +\defitem{\gdef\problabel{e:10-file:problem1} \gdef\probnumber{q:i} } diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/test1.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/test1.tex index 67e27893c10..0bced77966d 100644 --- a/Master/texmf-dist/doc/latex/esami/doc/examples/test1.tex +++ b/Master/texmf-dist/doc/latex/esami/doc/examples/test1.tex @@ -1,12 +1,13 @@ \newproblem{ -\FPsetpar{a}{2}{5} -\item \PTs{1} exercise 1a $a=\a$ +%\FPsetpar{a}{2}{5} +\estrai[2]{2,3,7}{a} +\item \PTs{1} exercise 1a $a=\ai$ \begin{answers}{1}\bChoices[random] \Ans1 answer 1 correct\eAns \Ans0 answer 2 wrong\eAns \Ans0 answer 3 wrong\eAns \eChoices\end{answers}} - + \newproblem{ \FPsetpar{a}{2}{5} \item \PTs{1} exercise 1b $a=\a$ diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/test14.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/test14.tex index 354953a8504..da8e1828512 100644 --- a/Master/texmf-dist/doc/latex/esami/doc/examples/test14.tex +++ b/Master/texmf-dist/doc/latex/esami/doc/examples/test14.tex @@ -83,4 +83,177 @@ \eChoices\end{answers}\begin{solution} This is the solution $a=\a$, $b=\b$, $c=\c$ \end{solution}} + + + \newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14f $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers} + \begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14g $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers}\begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + + + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14h $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers}\begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + + + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14k $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers}\begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14i $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers}\begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14j $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers} + \begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14l $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers}\begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + + + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14m $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers}\begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + + + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14n $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers}\begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} + + +\newproblem{ +\FPsetpar{a}{2}{5} +\FPsetpar{b}{2}{5} +\FPsetpar{c}{2}{8} + +\item \PTs{1} exercise 14o $a=\a$, $b=\b$, $c=\c$ + \begin{answers}{1}\bChoices[random] + \Ans1 answer 1 correct\eAns + \Ans0 answer 2 wrong\eAns + \Ans0 answer 3 wrong\eAns + \Ans0 answer 4 wrong\eAns + \Ans0 answer 5 wrong \eAns + \eChoices\end{answers}\begin{solution} + This is the solution $a=\a$, $b=\b$, $c=\c$ + \end{solution}} diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/test2.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/test2.tex index 04e7dd49fe5..ff3f0dee602 100644 --- a/Master/texmf-dist/doc/latex/esami/doc/examples/test2.tex +++ b/Master/texmf-dist/doc/latex/esami/doc/examples/test2.tex @@ -4,6 +4,9 @@ \FPsetpar{c}{2}{8} \item \PTs{1} exercise 2a $a=\a$, $b=\b$, $c=\c$ +seme=\seme + +semeex=\semeex \begin{answers}{1}\bChoices[random] \Ans1 answer 1 correct\eAns \Ans0 answer 2 wrong\eAns @@ -18,6 +21,10 @@ \FPsetpar{c}{2}{8} \item \PTs{1} exercise 2b $a=\a$, $b=\b$, $c=\c$ + +seme=\seme + +semeex=\semeex \begin{answers}{1}\bChoices[random] \Ans1 answer 1 correct\eAns \Ans0 answer 2 wrong\eAns @@ -33,6 +40,10 @@ \FPsetpar{c}{2}{8} \item \PTs{1} exercise 2c $a=\a$, $b=\b$, $c=\c$ + +seme=\seme + +semeex=\semeex \begin{answers}{1}\bChoices[random] \Ans1 answer 1 correct\eAns \Ans0 answer 2 wrong\eAns diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.pdf b/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.pdf index c97d3ce5829..67ec2164f89 100644 Binary files a/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.pdf and b/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.pdf differ diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.tex index a6fe9379252..673f16eab8e 100644 --- a/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.tex +++ b/Master/texmf-dist/doc/latex/esami/doc/examples/testA-sol.tex @@ -1,6 +1,8 @@ -\documentclass[a4paper,english]{article} +\documentclass[a4paper,italian]{article} +\usepackage{ifxetex}%%NUOVO +\usepackage{ifluatex}%%%NUOVO -\usepackage[shuffle,xyz,pointsonright,solutions,quizsolutions,twocolumns]{esami}%%%%% TEMA +%\usepackage[shuffle,xyz,pointsonright,nosolutions,noquizsolutions,twocolumns]{esami}%%%%% TEMA \ifluatex \usepackage{luatextra} % also loads fixltx2e, fontspec, xunicode \usepackage{unicode-math} @@ -17,17 +19,20 @@ \usepackage[utf8]{inputenc} \usepackage{lmodern,textcomp} \fi\fi -\usepackage{enumitem} +\usepackage[shuffle,xyz,pointsonright,solutions,quizsolutions,twocolumns]{esami}%%%%% TEMA + % +=============================+ % | DEFINITIONS | % +=============================+ \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 THE DATE IN THE FORMAT YYYY/M/D or D/M/YYYY +\def\numcompiti{4}%%% 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\cartella{pop}%%% The folder where are the exercises: by default the current folder% %\def\Acapo{\newpage} +\usepackage{babel} + \begin{document} \testversioni \pagestyle{esame} @@ -37,9 +42,9 @@ % | THE SEED | % +=============================+ -\FPeval\seme{round((\thenomefile+(3*\thevers)):0)} +%\FPeval\seme{round((\thenomefile+(3*\thevers)):0)} %%% OR SOME OTHER LIKE -%\FPeval\seme{round(\thenomefile*(\thevers)+1-trunc(\thenomefile*(\thevers)/(2^31-1):0)*(2^31-1):0)} +\FPeval\seme{round(\thenomefile*(\thevers)+1-trunc(\thenomefile*(\thevers)/(2^31-1):0)*(2^31-1):0)} %\FPeval\seme{round(1+abs(\thenomefile/(\thevers)+sin(\thevers)*(\thevers)^(2)):0)} \randomi=\seme @@ -59,47 +64,49 @@ \begin{test}[18] \begin{questions} -\ifluatex -\esercizi{ -test14, -test1, -test4, -test9 -} -\else\ifxetex -\esercizi{ -test14, -test1, -test4, -test9 -} -\else +%\ifluatex +%\esercizi{ +%test14, +%test1, +%test4, +%test9 +%} +%\else\ifxetex +%\esercizi{ +%test14, +%test1, +%test4, +%test9 +%} +%\else \begin{esdb}{mydb} %% some exercises from 2 files \selectrandomlyn{3}{test2} \selectrandomlyn{2}{test3} \end{esdb} \esercizi{ +%prova-colombia, test14, test1, test4, test9, -test5-fillin +test5-fillin, +prova-colombia } %%% all the problems of a file \selectallproblems[random]{test11} -\fi\fi +%\fi\fi \end{questions} Some other questions\\[5mm] -\begin{questions} %% a new set of questions -\esercizi{test12, -test13 -} -\end{questions} +%\begin{questions} %% a new set of questions +%\esercizi{test12, +%test13 +%} +%\end{questions} \end{test} \section*{Part two} diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/testA.pdf b/Master/texmf-dist/doc/latex/esami/doc/examples/testA.pdf index cef44ec338c..c45f50a7830 100644 Binary files a/Master/texmf-dist/doc/latex/esami/doc/examples/testA.pdf and b/Master/texmf-dist/doc/latex/esami/doc/examples/testA.pdf differ diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/testA.sol.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/testA.sol.tex new file mode 100644 index 00000000000..72684810fee --- /dev/null +++ b/Master/texmf-dist/doc/latex/esami/doc/examples/testA.sol.tex @@ -0,0 +1,22 @@ +\begin{minipage}{.33\textwidth}{\large\textbf{Soluzione\ Versione\ n. 1}} +\begin{enumerate} + \item\ref{e:1-file:test2-q:iii} + \item\ref{e:1-file:test2-q:i} + \item\ref{e:1-file:test2-q:ii} + \item\ref{e:1-file:test3-q:ii} + \item\ref{e:1-file:test3-q:i} + \item\ref{e:1-file:test9-q:i} + \item\ref{e:1-file:test14-q:i} + \item\ref{e:1-file:test4-q:i} +\item \makeatletter \input{qftest5-fillinqiie1.parametri}\makeatother + \FPsv [2]{b/k} +\item \makeatletter \input{qfprova-colombiaqie1.parametri}\makeatother +$\di $ + \item\ref{e:1-file:test11-q:i} + \item\ref{e:1-file:test11-q:ii} +\par\end{enumerate}\vspace{3ex} +\begin{enumerate} + \item\ref{e:1-file:test12-q:i} + \item\ref{e:1-file:test13-q:ii} +\par\end{enumerate}\vspace{3ex} +\end{minipage} diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/testA.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/testA.tex index 181d3a042c1..afc7ffa04b3 100644 --- a/Master/texmf-dist/doc/latex/esami/doc/examples/testA.tex +++ b/Master/texmf-dist/doc/latex/esami/doc/examples/testA.tex @@ -1,6 +1,8 @@ \documentclass[a4paper,italian]{article} +\usepackage{ifxetex}%%NUOVO +\usepackage{ifluatex}%%%NUOVO -\usepackage[shuffle,xyz,pointsonright,nosolutions,noquizsolutions,twocolumns]{esami}%%%%% TEMA +%\usepackage[shuffle,xyz,pointsonright,nosolutions,noquizsolutions,twocolumns]{esami}%%%%% TEMA \ifluatex \usepackage{luatextra} % also loads fixltx2e, fontspec, xunicode \usepackage{unicode-math} @@ -17,16 +19,17 @@ \usepackage[utf8]{inputenc} \usepackage{lmodern,textcomp} \fi\fi +\usepackage[shuffle,xyz,pointsonright,nosolutions,noquizsolutions,twocolumns]{esami}%%%%% TEMA % +=============================+ % | DEFINITIONS | % +=============================+ \def\examname{The name of the exam} -\def\numcompiti{1}%%% The number of the versions +\def\numcompiti{4}%%% 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\cartella{pop}%%% The folder where are the exercises: by default the current folder% %\def\Acapo{\newpage} \usepackage{babel} @@ -39,11 +42,11 @@ % | THE SEED | % +=============================+ -\FPeval\seme{round((\thenomefile+(3*\thevers)):0)} +%\FPeval\seme{round((\thenomefile+(3*\thevers)):0)} %%% OR SOME OTHER LIKE -%\FPeval\seme{round(\thenomefile*(\thevers)+1-trunc(\thenomefile*(\thevers)/(2^31-1):0)*(2^31-1):0)} +\FPeval\seme{round(\thenomefile*(\thevers)+1-trunc(\thenomefile*(\thevers)/(2^31-1):0)*(2^31-1):0)} %\FPeval\seme{round(1+abs(\thenomefile/(\thevers)+sin(\thevers)*(\thevers)^(2)):0)} - +%\FPeval\semeex{round(\thenomefile+1-trunc(\thenomefile/(2^31-1):0)*(2^31-1):0)} \randomi=\seme \permuta @@ -61,47 +64,49 @@ \begin{test}[18] \begin{questions} -\ifluatex -\esercizi{ -test14, -test1, -test4, -test9 -} -\else\ifxetex -\esercizi{ -test14, -test1, -test4, -test9 -} -\else +%\ifluatex +%\esercizi{ +%test14, +%test1, +%test4, +%test9 +%} +%\else\ifxetex +%\esercizi{ +%test14, +%test1, +%test4, +%test9 +%} +%\else \begin{esdb}{mydb} %% some exercises from 2 files \selectrandomlyn{3}{test2} \selectrandomlyn{2}{test3} \end{esdb} \esercizi{ +%prova-colombia, test14, test1, test4, test9, -test5-fillin +test5-fillin, +prova-colombia } %%% all the problems of a file \selectallproblems[random]{test11} -\fi\fi +%\fi\fi \end{questions} Some other questions\\[5mm] -\begin{questions} %% a new set of questions -\esercizi{test12, -test13 -} -\end{questions} +%\begin{questions} %% a new set of questions +%\esercizi{test12, +%test13 +%} +%\end{questions} \end{test} \section*{Part two} diff --git a/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg b/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg index 2a2faf91ba4..59a96af21a7 100644 --- a/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg +++ b/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg @@ -1,11 +1,11 @@ %% Package `esami' to use with LaTeX 2e -%% Copyright (C) 2008-2016 G. Messineo e S. Vassallo +%% Copyright (C) 2008-2017 G. Messineo e S. Vassallo %% %% This is file `esami-xyz.cfg', %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% esami-xyz.cfg, 2016-07-27 %% -%% Copyright (C) 2008-2016 G. Messineo e S. Vassallo %% +%% esami-xyz.cfg, 2017-07-01 %% +%% Copyright (C) 2008-2017 G. Messineo e S. Vassallo %% %% %% %% This program can be redistributed and/or modified %% %% under the terms of the LaTeX Project Public License %% @@ -129,8 +129,8 @@ n. \thevers} -- %% \sffamily \textbf{INSTRUCTIONS} \begin{itemize} \item Write here your instructions - \item two - \item three + \item two è con accento + \item three è à é ò ù \end{itemize}}} \def\istruzioniii{\setlength{\fboxsep}{1.5ex}\setlength{\fboxrule}{1.2pt}{\sffamily @@ -143,6 +143,12 @@ n. \thevers} -- %% %\immediate\write\sols{\string\vspace{5ex}}} % } +%%% THIS CODE IS TO CHECK the total score of exercises + +\ifluatex +\else +\ifxetex +\else \AtEndOfPackage{ \newdimen\punteggio %% NEW 2016/04/11 to check the total score of exercises \setlength{\punteggio}{0pt} @@ -161,6 +167,8 @@ n. \thevers} -- %% \global\punteggio=0pt% } } +\fi +\fi %%%% %%%%% HERE I GET RID OF THE MINIPAGE IN MULTIPLE CHOICE QUESTIONS %\AtEndOfPackage{ @@ -252,3 +260,99 @@ n. \thevers} -- %% %\immediate\closeout\params %\fi } %} +%\makeatletter + + + + +%\AtEndOfPackage{ +%\newcount\old@rando +%\renewcommand{\shuffle}[3][]{% %%% this command has been adapted from probsoln +%\old@rando=\number\randomi + %\randomi=\thenomefile + %\@shfctr=1\relax + %\whiledo{\@shfctr < 101}% + %{% + %\setrannum{\@shfA}{1}{#3}\setrannum{\@shfB}{1}{#3} + %\ifnum\@shfA=\@shfB + %\else + %\edef\@@tmpA{\csname#2\romannumeral\@shfA\endcsname}% + %\let\@tmpA=\@@tmpA + %\edef\@@tmpB{\csname#2\romannumeral\@shfB\endcsname}% + %\let\@tmpB=\@@tmpB + %\expandafter\xdef\csname#2\romannumeral\@shfA\endcsname{\@tmpB}% + %\expandafter\xdef\csname#2\romannumeral\@shfB\endcsname{\@tmpA}% + %\fi + %\advance\@shfctr by 1\relax + %\ifthenelse{\equal{#1}{}}{}{ + %\@shfA=0% + %\loop + %\advance\@shfA by1 + %\expandafter\xdef\csname#1\romannumeral\@shfA\endcsname{\csname#2\romannumeral\@shfA\endcsname} + %\ifnum\@shfA<#3 \repeat +%} + %}% +%\randomi=\number\old@rando +%} + +%\newcommand{\shufflees}[3][]{% %%% this command has been adapted from probsoln +%%\old@rando=\number\randomi +%% \randomi=404 + %\@shfctr=1\relax + %\whiledo{\@shfctr < 101}% + %{% + %\setrannum{\@shfA}{1}{#3}\setrannum{\@shfB}{1}{#3} + %\ifnum\@shfA=\@shfB + %\else + %\edef\@@tmpA{\csname#2\romannumeral\@shfA\endcsname}% + %\let\@tmpA=\@@tmpA + %\edef\@@tmpB{\csname#2\romannumeral\@shfB\endcsname}% + %\let\@tmpB=\@@tmpB + %\expandafter\xdef\csname#2\romannumeral\@shfA\endcsname{\@tmpB}% + %\expandafter\xdef\csname#2\romannumeral\@shfB\endcsname{\@tmpA}% + %\fi + %\advance\@shfctr by 1\relax + %\ifthenelse{\equal{#1}{}}{}{ + %\@shfA=0% + %\loop + %\advance\@shfA by1 + %\expandafter\xdef\csname#1\romannumeral\@shfA\endcsname{\csname#2\romannumeral\@shfA\endcsname} + %\ifnum\@shfA<#3 \repeat +%} + %}% +%%\randomi=\number\old@rando +%} + +%\renewcommand{\esercizidb}[1]{ + %\icount=0 +%\input{#1.tex}% +%\i@sh=0 +%\loop +%\advance\i@sh by1 +%\expandafter\edef\csname ftemp\romannumeral\i@sh \endcsname {\romannumeral\i@sh} +%\ifnum\i@sh <\number\icount +%\repeat +%\shufflees{ftemp}{\icount} +%\setcounter{n@par}{1} +%\io=\icount +%\loop +%\ifes@test +%\begin{minipage}{.95\linewidth} +%\fi +%\ifes@shuffleQuestions +%\csname prbl\csname ftemp\romannumeral\io\endcsname\endcsname +%\else +%\csname prbl\romannumeral\io \endcsname +%\fi +%\def\probchosen{\problabel-\probnumber} +%\csname @probi-\problabel-\probnumber \endcsname +%\ifes@test + %\vspace{5mm}\end{minipage} + %\Acapo +%\vspace{4mm} + %\fi + %\advance\io by-1 + %\ifnum\io > 0 \repeat + %\par} + %} +%\makeatother diff --git a/Master/texmf-dist/tex/latex/esami/es-UKenglish.lng b/Master/texmf-dist/tex/latex/esami/es-UKenglish.lng index 5a1bc74a972..692f17c0618 100644 --- a/Master/texmf-dist/tex/latex/esami/es-UKenglish.lng +++ b/Master/texmf-dist/tex/latex/esami/es-UKenglish.lng @@ -1,7 +1,5 @@ %%% Labels (esami.sty) -\def\es@parametermessage#1#2#3{The parameter $#1$ is between $#2$ and $#3$.} -\def\es@seedmessage#1{The seed is equal to $#1$.} \def\es@pointname{point} \def\es@pointsname{points} \def\es@exercisename{Exercise} @@ -17,11 +15,15 @@ \def\versionname{Version} \def\pagename{Page} \def\solutionsname{Solutions} +\def\es@EstraiMessage#1#2{\string\textbf\string{\string\noindent\space Expressions $#2i$, $#2ii$ \string\dots\space + assume the values #1 \string}\string\newline} %%% Error Messages \def\es@cfgerrormessageshort{The option \CurrentOption\space does not exists} \def\es@cfgerrormessagelong{Package esami needs an option for the configuration file} +\def\es@parametermessage#1#2#3{The parameter $#1$ is between $#2$ and $#3$.} +\def\es@seedmessage#1{The seed is equal to $#1$.} \def\es@numcompitierror{It's necessary to specify the number of versions!} \def\es@mastererror{WARNING: YOU CANNOT COMPILE THE MASTER FILE:\MessageBreak PRESS 'x' TO EXIT AND RENAME THE FILE} @@ -31,8 +33,7 @@ \def\es@fraconewarn#1#2{The fraction #1/#2 in exercise \nome \space is equal to 1} \def\es@radicalerror{The radicand in exercise \nome \space is negative} \def\es@fpsetparerrorshort{Not all conditions are satisfied after \maxLoopLimit\space tries} -\def\es@EstraiMessage#1#2{\string\textbf\string{\string\noindent\space Expressions $#2i$, $#2ii$ \string\dots\space - assume the values #1 \string}\string\newline} + \def\es@fpsetparerrshort#1{It's impossible to define the parameter #1} \def\es@fpsetparerrlong#1{In the definition of the parameter #1 the lower bound is greater than upper bound} diff --git a/Master/texmf-dist/tex/latex/esami/es-french.lng b/Master/texmf-dist/tex/latex/esami/es-french.lng index c5dd6428685..10c379665c0 100644 --- a/Master/texmf-dist/tex/latex/esami/es-french.lng +++ b/Master/texmf-dist/tex/latex/esami/es-french.lng @@ -17,6 +17,8 @@ \def\versionname{Version} \def\pagename{Page} \def\solutionsname{Solutions} +\def\es@EstraiMessage#1#2{\string\textbf\string{\string\noindent\space Les expressions $#2i$, $#2ii$ \string\dots\space + prennent les valeurs #1 \string}\string\newline} %%% Error Messages @@ -26,13 +28,11 @@ \def\es@mastererror{ATTENTION: VOUS NE POUVEZ PAS TRAVAILLER SUR LE FILE MASTER:\MessageBreak PRESSEZ "X" POUR SORTIR ET CHANGER LE NOM DU FILE} \def\es@zerodenerror#1#2{La fraction #1/#2 dans l'exercice \nome \space a le d\'{e}nominateur \'{e}gal à 0} -\def\es@zeronumerrorshort#1#2{La fraction #1/#2 dans l'exercice \nome \space est \'{e}gal à 0} +\def\es@zeronumerrorshort#1#2{La fraction #1/#2 dans l'exercise \nome \space est \'{e}gal à 0} \def\es@zeronumerrorlong#1#2{Si vous voulez qu'une fraction peut être 0, utilisez la commande "sempliz"} \def\es@fraconewarn#1#2{La fraction #1/#2 dans l'exercice \nome \space est \'{e}gal à 1} \def\es@radicalerror{Le radicande dans l'exercice \nome \space est n\'{e}gatif} \def\es@fpsetparerrorshort{Les conditions ne sont pas satisfaites apr\`{e}s \maxLoopLimit\space tentatives} -\def\es@EstraiMessage#1#2{\string\textbf\string{\string\noindent\space Les expressions $#2i$, $#2ii$ \string\dots\space - prennent les valeurs #1 \string}\string\newline} \def\es@fpsetparerrshort#1{Ce n'est pas possible de définir #1} \def\es@fpsetparerrlong#1{Dans la definition de le paramètre #1 l'extreme inferieur est plus grand que l'extreme superior} @@ -56,4 +56,3 @@ \usepackage{eurosym} \usepackage[np,autolanguage]{numprint} } - diff --git a/Master/texmf-dist/tex/latex/esami/esami.sty b/Master/texmf-dist/tex/latex/esami/esami.sty index 257a2ff4647..61b17698d51 100644 --- a/Master/texmf-dist/tex/latex/esami/esami.sty +++ b/Master/texmf-dist/tex/latex/esami/esami.sty @@ -2,8 +2,8 @@ %% This is file `esami.sty', %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% esami.sty package, 2016-07-25 %% -%% Copyright (C) 2008-2016 G. Messineo e S. Vassallo %% +%% esami.sty package, 2017-07-01 %% +%% Copyright (C) 2008-2017 G. Messineo e S. Vassallo %% %% %% %% This program can be redistributed and/or modified %% %% under the terms of the LaTeX Project Public License %% @@ -32,9 +32,11 @@ %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. +% 2017/07/01 +%Introduced the possibility to have two different seeds for exercises choice and for scrambling. Sligtly modified teh command \estrai so that can be used to extract parameters from a list. Improved the documentation. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{esami} - [2016/07/25 v2.1 An Exam Construction Package] + [2017/07/01 v2.2 An Exam Construction Package] % +=============================+ % | THE OPTIONS | @@ -255,6 +257,10 @@ \newcount\icount %%% counter to shuffle exercises \newcount\io \newcount\inizio +\newcount\old@rando +\FPeval\seme{round(\thenomefile+1-trunc(\thenomefile/(2^31-1):0)*(2^31-1):0)} +%\FPset\semeex\seme +\def\semeex{\seme} \inizio=1 %%%% \newcounter{vers}%%% the number of the version @@ -470,8 +476,10 @@ \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 -} +\ifthenelse{\equal{#2}{}}{\ifnum \tempsign<0 {\sempli{\tempsign}{1}#2}\else \ifnum \tempsign>0{+\sempli{\tempsign}{1}#2}\else{}\fi\fi} +{\ifnum \tempsign<0 {\semplix{\tempsign}{1}#2}\else \ifnum \tempsign>0{+\semplix{\tempsign}{1}#2}\else{}\fi\fi} +} %%% nuovo 2016/12/11 per termine noto + %========================================================% % Commands adapted from exerquiz % @@ -918,15 +926,21 @@ \tmp@quest=0 \input{#1} \@ifundefined{base\nome}{\old@random=\number\randomi %%% 2015/01/16 +\randomi=\semeex \setrannum{\rnd@cnta}{1}{\@probN} \randomi=\number\old@random \expandafter\global\expandafter\edef\csname base\nome \endcsname{\number\rnd@cnta} }{} -\FPeval\restotrentasei{round(\thevers+\thenomefile+1+base\nome-trunc((\thevers+\thenomefile+base\nome)/36:0)*36:0)} +\old@rando=\number\randomi + \randomi=\semeex +\ifthenelse{\number\semeex=\number\seme}{ +\FPeval\restotrentasei{round(\thevers+\thenomefile+1+base\nome-trunc((\thevers+\thenomefile+base\nome)/36:0)*36:0)}}{ +\FPeval\restotrentasei{round(1+\thenomefile+1+base\nome-trunc((1+\thenomefile+base\nome)/36:0)*36:0)} +} \ifcase\@probN\or \def\j@n{1}%%% just one variant \or%%% 2 variants -\ifthenelse{\isodd{\thevers}}{\def\j@n{1}}{\def\j@n{2}} +\ifthenelse{\isodd{\restotrentasei}}{\def\j@n{1}}{\def\j@n{2}} \or%%% 3 variants \def\j@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 @@ -940,7 +954,9 @@ \or%%% 8 variants \def\j@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@n{round(\thevers*\es@primo+base\nome+1-trunc((\thevers*\es@primo+base\nome)/\number\@probN:0)*\number\@probN:0)} +\ifthenelse{\number\semeex=\number\seme}{ +\FPeval\j@n{round(\thevers*\es@primo+base\nome+1-trunc((\thevers*\es@primo+base\nome)/\number\@probN:0)*\number\@probN:0)}} +{\FPeval\j@n{round(\es@primo+base\nome+1-trunc((\es@primo+base\nome)/\number\@probN:0)*\number\@probN:0)}} \fi \def\probchosen{\problabel-q:\romannumeral\j@n} \ifes@test @@ -961,10 +977,10 @@ \global\@probN=0\relax \firstpasstrue \tmp@quest=0 -\input{#2}% +\input{\cartella/#2}% \firstpassfalse \tmp@quest=0 -\input{#2}% +\input{\cartella/#2}% \ifthenelse{\equal{#1}{random}}{\i@sh=0 \loop \advance\i@sh by1 @@ -1015,7 +1031,7 @@ \global\@probN=0\relax \firstpasstrue \tmp@quest=0 -\input{#2}% +\input{\cartella/#2}% \ifthenelse{\equal{#1}{all}}{\@probselN=\number\tmp@quest}{ \ifnum\tmp@quest<#1 \relax \PackageWarning{esami}{\es@selectnwarn{#1}{#2}} @@ -1032,7 +1048,7 @@ \shuffle{ftmp}{\tmp@quest} \firstpassfalse% \tmp@quest=0 -\input{#2} +\input{\cartella/#2} \i@sh=0 \loop \advance\i@sh by1 @@ -1051,7 +1067,7 @@ \expandafter\def \csname prbl\romannumeral\icount \endcsname } -\newcommand{\esercizidb}[1]{ +\newcommand{\esercizidb}[1]{ %%% NEW 2017/02/16 for different seeds shuffling exercises and choosing them \icount=0 \input{#1.tex}% \i@sh=0 @@ -1060,7 +1076,8 @@ \expandafter\edef\csname ftemp\romannumeral\i@sh \endcsname {\romannumeral\i@sh} \ifnum\i@sh <\number\icount \repeat -\shuffle{ftemp}{\icount} +%\shuffle{ftemp}{\icount} +\shufflees{ftemp}{\icount} %%% NEW 2017/02/16 for different seeds shuffling exercises and choosing them \setcounter{n@par}{1} \io=\icount \loop @@ -1599,6 +1616,11 @@ \FPeval\restoventiquattro{round(\thevers+\thenomefile+1-trunc((\thevers+\thenomefile)/24:0)*24:0)}%%%% for 4 exercises permutations \FPeval\restotrenta{round(\thevers+\thenomefile+1-trunc((\thevers+\thenomefile)/30:0)*30:0)} %%%% for 5,6,7,8 exercises permutations } +\ifes@prova +\def\restosei{4}%%% for 2 or 3 exercises permutations +\def\restoventiquattro{21}%%%% for 4 exercises permutations +\def\restotrenta{17} %%%% for 5,6,7,8 exercises permutations +\fi %%% pseudorandom versions (permutations of 1 esercise!!) \def\sceglii#1#2{\expandafter\def\csname #2i\endcsname{#1}} @@ -1855,7 +1877,13 @@ \advance\beg@al by-1% \FPsetpar{tmpalf}{\beg@al}{\end@al}[\beg@al]% \advance\beg@al by1 % -\expandafter\edef\csname #3\romannumeral\beg@al \endcsname{\csname al@f\romannumeral\tmpalf \endcsname}% +\expandafter\edef\csname #3\romannumeral\beg@al \endcsname{\csname al@f\romannumeral\tmpalf \endcsname} +\ifes@fillin% +\ifes@solutions +\immediate\write\parametri{\string\def\expandafter\unexpanded\expandafter{\csname #3\romannumeral\beg@al\endcsname}{\csname al@f\romannumeral\tmpalf \endcsname}}% +\fi% +\fi +% \advance\beg@al by-1% \end@al=\tmpalf% \advance\end@al by-1% @@ -1880,6 +1908,11 @@ \advance\tmp@cntb by -#1 \loop \expandafter\edef\csname #3\romannumeral\tmp@cntb\endcsname{#3\romannumeral\tmp@cntb}% +\ifes@fillin% +\ifes@solutions +\immediate\write\parametri{\string\def\expandafter\unexpanded\expandafter{\csname #3\romannumeral\beg@al\endcsname}{\csname al@f\romannumeral\tmpalf \endcsname}}% +\fi% +\fi \advance\tmp@cntb by-1 \ifnum\tmp@cntb>0 \repeat @@ -1985,8 +2018,12 @@ } \fi -%%% another shuffling macro + +%%% another shuffling macro %%% NEW 2017/02/16 for different seeds shuffling exercises and choosing them + \newcommand{\shuffle}[3][]{% %%% this command has been adapted from probsoln + \old@rando=\number\randomi + \randomi=\semeex \@shfctr=1\relax \whiledo{\@shfctr < 101}% {% @@ -2009,7 +2046,37 @@ \ifnum\@shfA<#3 \repeat } }% -} + \randomi=\number\old@rando +} + + \newcommand{\shufflees}[3][]{% %%% this command has been adapted from probsoln %%% NEW 2017/02/16 for different seeds shuffling exercises and choosing them + %\old@rando=\number\randomi + % \randomi=404 + \@shfctr=1\relax + \whiledo{\@shfctr < 101}% + {% + \setrannum{\@shfA}{1}{#3}\setrannum{\@shfB}{1}{#3} + \ifnum\@shfA=\@shfB + \else + \edef\@@tmpA{\csname#2\romannumeral\@shfA\endcsname}% + \let\@tmpA=\@@tmpA + \edef\@@tmpB{\csname#2\romannumeral\@shfB\endcsname}% + \let\@tmpB=\@@tmpB + \expandafter\xdef\csname#2\romannumeral\@shfA\endcsname{\@tmpB}% + \expandafter\xdef\csname#2\romannumeral\@shfB\endcsname{\@tmpA}% + \fi + \advance\@shfctr by 1\relax + \ifthenelse{\equal{#1}{}}{}{ + \@shfA=0% + \loop + \advance\@shfA by1 + \expandafter\xdef\csname#1\romannumeral\@shfA\endcsname{\csname#2\romannumeral\@shfA\endcsname} + \ifnum\@shfA<#3 \repeat + } + }% + %\randomi=\number\old@rando + } + %========================================================% % Random (adapted from aebrandom) % -- cgit v1.2.3