diff options
author | Karl Berry <karl@freefriends.org> | 2016-07-30 23:11:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-07-30 23:11:21 +0000 |
commit | ef63475b97ba5f335f4b642c65af6f39982a00d2 (patch) | |
tree | 4a855450950adb4559fa2cbbe4b01a171602d2a5 /Master/texmf-dist/doc/latex/esami/esami-xyz.cfg | |
parent | 467990204e7f3a87879281268759ba31fe0ac56d (diff) |
esami (27jul16)
git-svn-id: svn://tug.org/texlive/trunk@41774 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/esami/esami-xyz.cfg')
-rw-r--r-- | Master/texmf-dist/doc/latex/esami/esami-xyz.cfg | 123 |
1 files changed, 120 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg b/Master/texmf-dist/doc/latex/esami/esami-xyz.cfg index a9c42402732..2a2faf91ba4 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-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 @@ n. \thevers} -- %% \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@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@PTs{#1}\ifx\es@PTs\@empty\gdef\es@PTs{1}\fi + \global\let\esPTs=\es@PTs\global\let\es@PTs=\@empty + \if\es@star*\else\PTs@Hook\fi +} +\renewcommand{\checkpoints}{% +\ifdim\punteggio=\punti pt %% NEW 2016/04/11 to check the total score of exercises + \else +\PackageError{esami}{\es@pointerrorshort} {\es@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@quest=0 +%\input{#1}%%%%% +%\firstpassfalse%%% now prints the question +%\tmp@quest=0 +%\input{#1} +%\@ifundefined{base\nome}{\old@random=\number\randomi %%% 2015/01/16 +%\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)} +%\ifcase\@probN\or +%\def\j@n{1}%%% just one variant +%\or%%% 2 variants +%\ifthenelse{\isodd{\thevers}}{\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 +%\def\j@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@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@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@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@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)} +%\fi +%\def\probchosen{\problabel-q:\romannumeral\j@n} +%\ifes@test +%\csname @probi-\problabel-q:\romannumeral\j@n \endcsname \vspace{5mm} +%\Acapo +%\else +%\csname @probi-\problabel-q:\romannumeral\j@n \endcsname \vspace{5mm} +%\Acapo +%\fi +% \ifes@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@testfalse +%%\begin{minipage}{\linewidth} %%% new 2016/02/19 +%\renewcommand{\punti}{#1} +%\ifes@solutionsonly\else\examenddef\fi +%\begin{exercise} +%\ifes@prova +%\else +%\ifes@solutions +%\immediate\write\loe{\es@exercisename\space \theex@no:\space \probchosen} +%\fi +%\fi +%} +%{ +%\end{exercise} +%%\end{minipage}%%% new 2016/02/19 +%\ifes@param +%\immediate\closeout\params +%\fi} +% +%\renewenvironment{problem*}[1][]{\es@testfalse +%%\begin{minipage}{\linewidth} %%% new 2016/02/19 +%\renewcommand{\punti}{#1} +%\ifes@solutionsonly\else\examenddef\fi +%\begin{exercise*} +%\ifes@prova +%\else +%\ifes@solutions +%\immediate\write\loe{\es@exercisename\space \theex@no:\space \probchosen} +%\fi +%\fi +%} +%{ +%\end{exercise*} +%%\end{minipage}%%% new 2016/02/19 +%\ifes@param +%\immediate\closeout\params +%\fi } +%} |