summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.pdfbin493715 -> 453136 bytes
-rw-r--r--Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.tex2
-rw-r--r--Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.pdfbin505069 -> 460454 bytes
-rw-r--r--Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.tex2
-rw-r--r--Master/texmf-dist/doc/latex/esami/doc/examples/master-sol.tex96
-rw-r--r--Master/texmf-dist/doc/latex/esami/doc/examples/master.tex96
-rw-r--r--Master/texmf-dist/tex/latex/esami/esami.sty75
7 files changed, 251 insertions, 20 deletions
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 fae5223ff85..ee5b341b2ab 100644
--- a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.pdf
+++ b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-en.pdf
Binary files 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 f12342dd08b..feb51f1be23 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
@@ -108,7 +108,7 @@ The package allows to write various type of exercises (multiple choiche question
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: 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.}:
+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.}:
\begin{enumerate}
\item \pkgname{fp}: for mathematical operations;
\item \pkgname{currfile}: to obtain the file and folder names;
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 413e11f8a84..35dfdbee287 100644
--- a/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.pdf
+++ b/Master/texmf-dist/doc/latex/esami/doc/esami-doc-it.pdf
Binary files 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 8e7fa8a648b..d977b749b47 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
@@ -107,7 +107,7 @@ Il pacchetto consente di scrivere esercizi di vario tipo (a risposta multipla co
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 è: 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.}
+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.}
\begin{enumerate}
\item \pkgname{fp}: per le operazioni matematiche;
\item \pkgname{currfile}: per ottenere il nome del file e della cartella di lavoro;
diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/master-sol.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/master-sol.tex
new file mode 100644
index 00000000000..2882a372459
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/esami/doc/examples/master-sol.tex
@@ -0,0 +1,96 @@
+\documentclass[a4paper,italiano]{article}
+
+\usepackage[shuffle,xyz,pointsonright,solutions,noquizsolutions,twocolumns]{esami}%%%%% TEMA
+
+%%%% substitute "xyz" with your own config file
+
+%%% some packages we use
+
+ \usepackage{fixltx2e}
+ \usepackage[T1]{fontenc}
+ \usepackage[utf8]{inputenc}
+ \usepackage{lmodern,textcomp}
+
+% +=============================+
+% | 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 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}
+
+\whiledo{\thevers<\numcompiti}{\stepvers
+% +=============================+
+% | THE SEED |
+% +=============================+
+
+\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(1+abs(\thenomefile/(\thevers)+sin(\thevers)*(\thevers)^(2)):0)}
+
+\randomi=\seme
+
+\permuta
+% +=============================+
+% | STUFF DEFINED IN CFG FILE |
+% +=============================+
+
+\testa%%% the heading
+\istruzionii%%% some instructions
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section*{Part One}
+
+
+\begin{test}[8]
+\begin{questions}
+%%% this is an example of "esdb"
+
+\begin{esdb}{mydb} %% some exercises from 2 files
+ \selectrandomlyn{3}{test2}
+ \selectrandomlyn{2}{test3}
+ \end{esdb}
+
+%%%% this is an example of "esercizi"
+
+\esercizi{
+test14,
+test1,
+test4,
+test9,
+test5-fillin
+}
+%%% all the problems of a file
+\selectallproblems[random]{test11}
+
+
+\end{questions}
+
+%%%% You can write other questions here using \begin{questions}... \end{question}
+
+\end{test}
+
+\section*{Part two}
+\istruzioniii%%% Some other instructions
+
+%%%% This is an example of open question problem
+
+\esercizi{problem1}
+\closevers
+\newpage %
+ %
+\setcounter{page}{1} %%% dvi
+}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/esami/doc/examples/master.tex b/Master/texmf-dist/doc/latex/esami/doc/examples/master.tex
new file mode 100644
index 00000000000..6f102384957
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/esami/doc/examples/master.tex
@@ -0,0 +1,96 @@
+\documentclass[a4paper,italiano]{article}
+
+\usepackage[shuffle,xyz,pointsonright,nosolutions,noquizsolutions,twocolumns]{esami}%%%%% TEMA
+
+%%%% substitute "xyz" with your own config file
+
+%%% some packages we use
+
+ \usepackage{fixltx2e}
+ \usepackage[T1]{fontenc}
+ \usepackage[utf8]{inputenc}
+ \usepackage{lmodern,textcomp}
+
+% +=============================+
+% | 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 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}
+
+\whiledo{\thevers<\numcompiti}{\stepvers
+% +=============================+
+% | THE SEED |
+% +=============================+
+
+\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(1+abs(\thenomefile/(\thevers)+sin(\thevers)*(\thevers)^(2)):0)}
+
+\randomi=\seme
+
+\permuta
+% +=============================+
+% | STUFF DEFINED IN CFG FILE |
+% +=============================+
+
+\testa%%% the heading
+\istruzionii%%% some instructions
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section*{Part One}
+
+
+\begin{test}[8]
+\begin{questions}
+%%% this is an example of "esdb"
+
+\begin{esdb}{mydb} %% some exercises from 2 files
+ \selectrandomlyn{3}{test2}
+ \selectrandomlyn{2}{test3}
+ \end{esdb}
+
+%%%% this is an example of "esercizi"
+
+\esercizi{
+test14,
+test1,
+test4,
+test9,
+test5-fillin
+}
+%%% all the problems of a file
+\selectallproblems[random]{test11}
+
+
+\end{questions}
+
+%%%% You can write other questions here using \begin{questions}... \end{question}
+
+\end{test}
+
+\section*{Part two}
+\istruzioniii%%% Some other instructions
+
+%%%% This is an example of open question problem
+
+\esercizi{problem1}
+\closevers
+\newpage %
+ %
+\setcounter{page}{1} %%% dvi
+}
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/esami/esami.sty b/Master/texmf-dist/tex/latex/esami/esami.sty
index f8c6930ea99..d198f79e5bc 100644
--- a/Master/texmf-dist/tex/latex/esami/esami.sty
+++ b/Master/texmf-dist/tex/latex/esami/esami.sty
@@ -34,7 +34,7 @@
% +=============================+
% | THE OPTIONS |
% +=============================+
-\usepackage{etex}
+%\usepackage{etex}
\newif\ifes@language \es@languagefalse
\DeclareOption{italian}{\InputIfFileExists{es-\CurrentOption.lng}%
{ \es@languagetrue \typeout{esami: Verrà usata la lingua italiana}}%
@@ -77,8 +77,8 @@
\DeclareOption{shufflerandom}{\es@shuffleQuestionstrue \es@fissafalse}%% the exercises are randomly shuffled
\DeclareOption{noshuffle}{\es@shuffleQuestionsfalse}
%%% 2013-06-03 eliminata opzione
-\DeclareOption{fillb}{}
\newif\ifes@fillin \es@fillinfalse
+\DeclareOption{fillb}{\es@fillintrue}
\newif\ifes@pointsonright \es@pointsonrightfalse%%% the box with the points on the right side (from eqexam)
\DeclareOption{pointsonright}{\es@pointsonrighttrue \AtEndOfPackage{\PointsOnRight}}
\newif\ifes@solutions \es@solutionsfalse
@@ -533,8 +533,8 @@
\newcommand\fillinproblem{\es@fillintrue%
\ifes@solutions
\immediate\openout\parametri=qf\nome q\romannumeral\tmp@quest e\thevers.parametri.tex
-\fi}
-%%%%
+\fi
+}
\ifes@solutions
\def\fill@ans@color#1{\bfseries\color{red}{#1}}%%% with solutions answers are in red by default
\else
@@ -564,7 +564,8 @@
%%%%% Other commands %%%%%%
\newcommand\stepvers{\stepcounter{vers}\ifes@solutions
-\immediate\write\sols{\string\begin{minipage}{.33\string\textwidth}\string\large\string\textbf{\es@solutionname\ \versionname\ n. \thevers}}
+\immediate\write\sols{\string\begin{minipage}{.33\string\textwidth}
+{\string\large\string\textbf{\es@solutionname\ \versionname\ n. \thevers}}}
\immediate\write\loe{\versionname\space n. \thevers}\fi}
\newcommand\closevers{\newpage\setcounter{page}{1}\setcounter{ex@no}{0}\ifes@solutions\immediate\write\sols{\string\end{minipage}
\string\vspace{5ex}}
@@ -611,7 +612,7 @@
\string}\string\newline}}
\else
\newcommandx{\FPsetpar}[5][1=\seme,5={}]{%
-\ifnum#3<#4\else\PackageError{esami}{\es@fpsetparerrshort{#2}}{\es@fpsetparerrlong{#2}}\fi%% NEW 2015
+\ifnum#3>#4\PackageError{esami}{\es@fpsetparerrshort{#2}}{\es@fpsetparerrlong{#2}}\fi%% NEW 2015
\@ifundefined{nome}{\setcounter{fp@contatore}{-2}}{
\@ifundefined{base\nome}{\setcounter{fp@contatore}{-2}}{\setcounter{fp@contatore}{-\csname base\nome \endcsname}}}
\FPval{randomico}{\thevers+\then@par+\thequestionno+#1}
@@ -913,6 +914,12 @@
\let\nome\currfilebase
\global\def\problabel{e:\thevers-file:\nome}
\global\def\probnumber{q:\romannumeral\tmp@quest}
+\ifes@fillin
+\ifes@solutions%%% to write the string of solutions
+\immediate\openout\parametri=qf\nome q\romannumeral\tmp@quest e\thevers.parametri.tex
+\fi
+\fi
+
\expandafter\global\expandafter\newcommand\csname @prob-\problabel-\probnumber \endcsname{\unexpanded{#1}}
\expandafter\global\expandafter\newcommand\csname @probi-\problabel-\probnumber\endcsname{#1}%%% it assigns a unique name to exercise
\fi
@@ -1069,7 +1076,7 @@
}
-\def\@getitems#1#2#3{\rand@getitems{#2}{#3}[#1]}%
+%\def\@getitems#1#2#3{\rand@getitems{#2}{#3}[#1]}%
\newcommand{\esercizidb}[1]{
\icount=0
@@ -1774,20 +1781,17 @@
\renewcommand{\theshuf@lop}{\arabic{shuf@lop}}%
}
-%%% the command \es@estrai choices in list #1: #2=name input file, #3=name output file, #4=counter name
-\newcommand{\es@estrai}[4]{\sh@max=0\sh@chex{#1}{#2}\@getitems{#2}{#4}{#3}}
-
%%% the command \es@randestrai choices in the list #2 leaving out #1 elements. #3=name input file, #4=name output file, #5=total number of file
\newcommand{\es@randestrai}[5][0]{\sh@max=#1\sh@chex{#2}{#3}\rand@getitems{#5}{#4}[#3]}%
-\newcommand{\es@trai}[3][0]{%%% it extracts objects from the list #2 leaving out #1 elements. The objects will be named #3i, #3ii, ecc.
+\newcommand{\randes@trai}[3][0]{%%% it extracts objects from the list #2 leaving out #1 elements. The objects will be named #3i, #3ii, ecc.
\es@randestrai[#1]{#2}{tmp@in}{#3}{\theshuf@lop}
}
-%%% \estrai is the user command to extract objects from the list #2 leaving out #1 elements.
-%%% \estraialfa extracts #1 random objects from the list #2 preserving order and naming them #3i,#3ii, ecc.
+%%% \randestrai is the user command to randomly extract objects from the list #2 leaving out #1 elements.
+%%% \randestraialfa extracts #1 random objects from the list #2 preserving order and naming them #3i,#3ii, ecc.
\ifes@param%%% for parametric version
-\newcommand{\estrai}[3][0]{
-\es@trai[#1]{#2}{tmp@out}
+\newcommand{\randestrai}[3][0]{
+\randes@trai[#1]{#2}{tmp@out}
\tmp@cntb=\value{shuf@lop}
\advance\tmp@cntb by -#1
\loop
@@ -1808,8 +1812,8 @@
\immediate\write\params{\es@EstraiMessage{#2}{#3}}%%% writes to a file
}
\else
-\newcommand{\estrai}[3][0]{
-\es@trai[#1]{#2}{tmp@out}
+\newcommand{\randestrai}[3][0]{
+\randes@trai[#1]{#2}{tmp@out}
\tmp@cntb=\value{shuf@lop}
\advance\tmp@cntb by -#1
\loop
@@ -1834,9 +1838,44 @@
}
\fi
+%%% the command \es@estrai choices in list #2 leaving out #1 elements. #3=name input file, #4=name output file, #5=counter name
+\newcommand{\es@estrai}[5][0]{\sh@max=#1\sh@chex{#2}{#3}\@getitems{#3}{#5}{#4}}
+
+\newcommand{\es@trai}[3][0]{%%% it extracts objects from the list #2 leaving out #1 elements. The objects will be named #3i, #3ii, ecc.
+\es@estrai[#1]{#2}{tmp@in}{#3}{\theshuf@lop}
+}
+%%% \estrai is the user command to extract objects from the list #2 leaving out #1 elements.
+%%% \estraialfa extracts #1 random objects from the list #2 preserving order and naming them #3i,#3ii, ecc.
+
+\ifes@param%%% for parametric version
+\newcommand{\estrai}[3][0]{
+\es@trai[#1]{#2}{tmp@out}
+ \tmp@cntb=\value{shuf@lop}
+ \advance\tmp@cntb by -#1
+ \loop
+ \expandafter\edef\csname #3\romannumeral\tmp@cntb\endcsname{#3\romannumeral\tmp@cntb}%
+ \advance\tmp@cntb by-1
+ \ifnum\tmp@cntb>0
+ \repeat
+\immediate\write\params{\es@EstraiMessage{#2}{#3}}%%% writes to a file
+ \immediate\closeout\params
+}
+\else
+\newcommand{\estrai}[3][0]{
+\es@trai[#1]{#2}{tmp@out}
+ \tmp@cntb=\value{shuf@lop}
+ \advance\tmp@cntb by -#1
+ \loop
+ \expandafter\edef\csname #3\romannumeral\tmp@cntb\endcsname{\csname tmp@out\romannumeral\tmp@cntb\endcsname}%
+ \advance\tmp@cntb by-1
+ \ifnum\tmp@cntb>0
+ \repeat
+ }%
+\fi
+
%%% \esestrai is the user command to extract exercises from the list #2 leaving out #1 elements.
-\newcommand{\estraies}[2][0]{\es@trai[#1]{#2}{tmp@out}
+\newcommand{\estraies}[2][0]{\randes@trai[#1]{#2}{tmp@out}
\tmp@cnt=\value{shuf@lop}
\advance\tmp@cnt by -#1
\loop