summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2011-08-03 13:56:44 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2011-08-03 13:56:44 +0000
commit802e04882d053670edb5d4e6c87e7f34cea110a0 (patch)
treea13b454980c12154b2506181ce5f0c3aeea64681 /Master/texmf-dist/tex
parent74e9852b0c607417766f22bc3508d9c16c9fa7fc (diff)
alterqcm 3.7c
git-svn-id: svn://tug.org/texlive/trunk@23385 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/alterqcm/alterqcm.sty450
1 files changed, 238 insertions, 212 deletions
diff --git a/Master/texmf-dist/tex/latex/alterqcm/alterqcm.sty b/Master/texmf-dist/tex/latex/alterqcm/alterqcm.sty
index 44414ec3670..b1f7a22dbcd 100644
--- a/Master/texmf-dist/tex/latex/alterqcm/alterqcm.sty
+++ b/Master/texmf-dist/tex/latex/alterqcm/alterqcm.sty
@@ -23,62 +23,63 @@
%% \AQquestion{question}
%% {{proposition},
%% {proposition}}
+
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{alterqcm}
- [2009/03/29 v3.1 qcm creation]
+ [2011/06/01 v3.6 qcm creation]
\DeclareOption{french}{%
- \def\aqlanguage{french}
- \def\aqlabelforquest{Questions}
- \def\aqlabelforrep{R\'eponses}
- \def\aqfoottext{suite sur la page suivante\ldots}}
+ \def\aqlanguage{french}%
+ \def\aqlabelforquest{Questions}%
+ \def\aqlabelforrep{R\'eponses}%
+ \def\aqfoottext{suite sur la page suivante\ldots}}%
\DeclareOption{english}{%
\def\aqlanguage{english}
\def\aqlabelforquest{Questions}
\def\aqlabelforrep{Answers}
- \def\aqfoottext{Continued on the next page\ldots}}
+ \def\aqfoottext{Continued on the next page\ldots}}%
\DeclareOption{german}{%
- \def\aqlanguage{german}
- \def\aqlabelforquest{Fragen}
- \def\aqlabelforrep{Antworten}
- \def\aqfoottext{Fortsetzung nächste Seite\ldots}}
+ \def\aqlanguage{german}%
+ \def\aqlabelforquest{Fragen}%
+ \def\aqlabelforrep{Antworten}%
+ \def\aqfoottext{Fortsetzung nächste Seite\ldots}}%
\ExecuteOptions{french}
\ProcessOptions\relax
\RequirePackage{xkeyval}[2005/11/25]
\RequirePackage{calc}
-\RequirePackage{ifthen,forloop}
+\RequirePackage{ifthen}
\RequirePackage{array}
\RequirePackage{multirow}
\RequirePackage{pifont}%v v1.00
%<--------------------------------------------------------------->
% from RANDOM.TEX v.1 (Donald Arseneau)
%<--------------------------------------------------------------->
-\newcount\randomi % the random number seed (while executing)
-\newcounter{identRow}
-\newcounter{identCol}
-\newcounter{tmp}
-
-\global\randomi\catcode`\@ % scratch variable during definitions
+\newcount\aq@randomi % the random number seed (while executing)
+\newcounter{aq@identRow}
+\newcounter{aq@identCol}
+\newcount\aq@tmp
+\def\aqutil@empty{}
+\global\aq@randomi\catcode`\@ % scratch variable during definitions
\catcode`\@=11
\def\nextrandom{\begingroup
- \ifnum\randomi<\@ne % then initialize with time
- \global\randomi\time
- \global\multiply\randomi388 \global\advance\randomi\year
- \global\multiply\randomi31 \global\advance\randomi\day
- \global\multiply\randomi97 \global\advance\randomi\month
- \message{Randomizer initialized to \the\randomi.}%
+ \ifnum\aq@randomi<\@ne % then initialize with time
+ \global\aq@randomi\time
+ \global\multiply\aq@randomi388 \global\advance\aq@randomi\year
+ \global\multiply\aq@randomi31 \global\advance\aq@randomi\day
+ \global\multiply\aq@randomi97 \global\advance\aq@randomi\month
+ \message{Randomizer initialized to \the\aq@randomi.}%
\nextrandom \nextrandom \nextrandom
\fi
- \count@ii\randomi
+ \count@ii\aq@randomi
\divide\count@ii 127773 % modulus = multiplier * 127773 + 2836
\count@\count@ii
\multiply\count@ii 127773
- \global\advance\randomi-\count@ii % random mod 127773
- \global\multiply\randomi 16807
+ \global\advance\aq@randomi-\count@ii % random mod 127773
+ \global\multiply\aq@randomi 16807
\multiply\count@ 2836
- \global\advance\randomi-\count@
- \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi
+ \global\advance\aq@randomi-\count@
+ \ifnum\aq@randomi<\z@ \global\advance\aq@randomi 2147483647\relax\fi
\endgroup
}
@@ -91,37 +92,45 @@
\@tempcntb 2147483645 % = m - 2 = 2^{31} - 3
\divide\@tempcntb\@tempcnta
\getr@nval
- \advance\ranval#2\relax
- #1\ranval
+ \advance\aq@ranval#2\relax
+ #1\aq@ranval
}
\def\getr@nval{% The values in \@tempcnta and \@tempcntb are parameters
\nextrandom
- \ranval\randomi \advance\ranval\m@ne \divide\ranval\@tempcntb
- \ifnum\ranval<\@tempcnta\else \expandafter\getr@nval \fi
+ \aq@ranval\aq@randomi \advance\aq@ranval\m@ne \divide\aq@ranval\@tempcntb
+ \ifnum\aq@ranval<\@tempcnta\else \expandafter\getr@nval \fi
}
-\catcode`\@=\randomi
-\global\randomi=0
-\newcount\ranval
+\catcode`\@=\aq@randomi
+\global\aq@randomi=0
+\newcount\aq@ranval
%<--------------------------------------------------------------->
-\newtoks\tdml@a
-\newtoks\tdml@b
-\newcount\@alea
-\newcount\n@arg
-\newbox\qcm@tempbox
-\newdimen\qcm@hauteurquest
-\newdimen\qcm@hauteurprop
-\newdimen\qcm@wdquest
-\newdimen\qcm@wdprop
-\newdimen\qcm@dimtmpa
-\newdimen\qcm@dimtmpb
-\newdimen\qcm@dimtmp
+\newtoks\aq@tdml@a
+\newtoks\aq@tdml@b
+\newcount\aq@alea
+\newcount\aq@n@arg
+\newbox\aq@tempbox
+\newdimen\aq@hauteurquest
+\newdimen\aq@hauteurprop
+\newdimen\aq@wdquest
+\newdimen\aq@wdprop
+\newdimen\aq@dimtmpa
+\newdimen\aq@dimtmpb
+\newdimen\aq@dimtmp
\newcounter{AQ@numquestion}\setcounter{AQ@numquestion}{0}%
-\newcounter{qcm@numb}
+\newcounter{aq@numb}
\newcounter{AQ@numprop}\setcounter{AQ@numprop}{0}% v0.93
\newcounter{alea@numfirst}
\newcounter{alea@numlast}
+\newcommand\points[1]{%
+\marginpar{%
+\begin{tabular}{|c|}
+ \hline
+ \textbf{#1}\\
+ \hline\\
+ \hline
+\end{tabular}}}
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
% Début Code QCM
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
@@ -146,6 +155,7 @@
}
\define@cmdkey [AQ] {global} {lq}{}
\define@cmdkey [AQ] {global} {pq}{}
+\define@cmdkey [AQ] {global} {points}{}
\define@cmdkey [AQ] {global} {symb}{}
\define@cmdkey [AQ] {global} {corsymb}{}
\define@cmdkey [AQ] {global} {bonus}{}
@@ -156,6 +166,7 @@
\define@cmdkey [AQ] {global} {tone}{}
\define@cmdkey [AQ] {global} {ttwo}{}
\define@cmdkey [AQ] {global} {numbreak}{}
+\define@cmdkey [AQ] {global} {afterpreskip}{}
\define@boolkey [AQ] {global} {transparent}[true]{}
\define@boolkey [AQ] {global} {VF} [true]{}
\define@boolkey [AQ] {global} {sep} [true]{}
@@ -170,6 +181,7 @@
\presetkeys [AQ] {global} {
lq = 100mm,
pq = 0pt,
+ points = {},
sep = false,
pre = false,
bonus = {0,5},
@@ -177,7 +189,8 @@
VF = false,
long = false,
symb = $\square$,
- corsymb = $\blacksquare$,
+ corsymb = $\blacksquare$,
+ afterpreskip = \medskip,
num = true,
transparent = false,
nosquare = false,
@@ -185,7 +198,7 @@
numstyle = \arabic,
propstyle = \alph,% v0.93
numprop = false,% v0.93
- size = \normalsize,
+ size = {}, %3.7 same size la fonte
title = true,
ttwo = \aqlabelforrep,
tone = \aqlabelforquest,
@@ -194,25 +207,21 @@
\define@cmdkey[AQ]{local}{pq}{}
\define@cmdkey[AQ]{local}{br}{}
\presetkeys[AQ]{local}{br=1,pq= \cmdAQ@global@pq}{}%
-\newcommand{\qcm@pre}{Pour chacune des questions ci-dessous, une seule des r\'eponses propos\'ees est exacte. Vous devez cocher la r\'eponse exacte sans justification.
-Une bonne r\'eponse rapporte \textbf{\cmdAQ@global@bonus\ point}. Une mauvaise r\'eponse enl\`eve \textbf{\cmdAQ@global@malus\ point}. L'absence de r\'eponse ne rapporte ni n'enl\`eve aucun point. Si le total des points est n\'egatif, la note globale attribu\'ee \`a l'exercice est \textbf{0}.}
-\newcommand{\qcm@preVF}{Pour chacune des affirmations ci-dessous, cocher la case V (l'affirmation est vraie) ou la case F (l'affirmation est fausse) sur l'ANNEXE, \`a rendre avec la copie. Les r\'eponses ne seront pas justifi\'ees.
-Une bonne r\'eponse rapporte \textbf{\cmdAQ@global@bonus\ point}. Une mauvaise r\'eponse enl\`eve \textbf{\cmdAQ@global@malus\ point}. L'absence de r\'eponse ne rapporte ni n'enl\`eve aucun point. Si le total des points est n\'egatif, la note globale attribu\'ee \`a l'exercice est \textbf{0}.}
+\newcommand{\aq@pre}{Pour chacune des questions ci-dessous, une seule des r\'eponses propos\'ees est exacte. Vous devez cocher la r\'eponse exacte sans justification.
+Une bonne r\'eponse rapporte \textbf{\cmdAQ@global@bonus\ point}. Une mauvaise r\'eponse enl\`eve \textbf{\cmdAQ@global@malus\ point}. L'absence de r\'eponse ne rapporte ni n'enl\`eve aucun point. Si le total des points est n\'egatif, la note globale attribu\'ee \`a l'exercice est \textbf{0}.}%
+
+\newcommand{\aq@preVF}{Pour chacune des affirmations ci-dessous, cocher la case V (l'affirmation est vraie) ou la case F (l'affirmation est fausse) sur l'ANNEXE, \`a rendre avec la copie. Les r\'eponses ne seront pas justifi\'ees.
+Une bonne r\'eponse rapporte \textbf{\cmdAQ@global@bonus\ point}. Une mauvaise r\'eponse enl\`eve \textbf{\cmdAQ@global@malus\ point}. L'absence de r\'eponse ne rapporte ni n'enl\`eve aucun point. Si le total des points est n\'egatif, la note globale attribu\'ee \`a l'exercice est \textbf{0}.}%
-\newcommand*{\AQms}{\aq@ms}
+\newcommand*{\AQms}{\aq@ms}%
\def\aq@ms(#1,#2){\vrule height #1pt depth #2pt width 0pt}
-\newcommand*{\altersquare}{\vbox{\hrule\hbox to 6pt{\vrule height 5.2pt \hfil\vrule}\hrule}}
-%v1.00
-\newcommand*{\dingsquare}{\ding{114}}
-%v1.00
+\newcommand*{\altersquare}{\vbox{\hrule\hbox to 6pt{\vrule height 5.2pt \hfil\vrule}\hrule}}%
+\newcommand*{\dingsquare}{\ding{114}}%
\newcommand*{\dingchecksquare}{\mbox{\ding{114}\hspace{-.7em}\raisebox{.2ex}[1ex]{\ding{51}}}}
-\newcommand*{\aq@style@title}{\textbf}
-\newcommand*{\aq@style@numquest}{\textbf}
-\newcommand*{\aq@style@numrep}{\textbf}
-
-
-
-\newcommand{\qcm@title}{%
+\newcommand*{\aq@style@title}{\textbf}%
+\newcommand*{\aq@style@numquest}{\textbf}%
+\newcommand*{\aq@style@numrep}{\textbf}%
+\newcommand{\aq@title}{%
\hline%
\hfil{\aq@style@title{\cmdAQ@global@tone}}\hfil%
& \hfil{\aq@style@title{\cmdAQ@global@ttwo}}\hfil\\ \hline%
@@ -229,107 +238,106 @@ Une bonne r\'eponse rapporte \textbf{\cmdAQ@global@bonus\ point}. Une mauvaise r
\newcommand{\AQmessage}[1]{%
\multicolumn{2}{|l|}{%
\begin{minipage}{\textwidth-\tabcolsep*2-\arrayrulewidth*2}%
-
-\smallskip #1 \smallskip
+#1
\end{minipage}}\\ \hline%
}%
-\newcommand{\melange}{%
-\setrannum{\@alea}{1}{\value{qcm@numb}}%
- \ifcase\@alea%
+\newcommand{\aq@melange}{%
+\setrannum{\aq@alea}{1}{\value{aq@numb}}%
+ \ifcase\aq@alea%
\or
- \global\let\qcm@tempfirst\qcm@arga
+ \global\let\aq@tempfirst\aq@arga
\or
- \global\let\qcm@tempfirst\qcm@argb
+ \global\let\aq@tempfirst\aq@argb
\or
- \global\let\qcm@tempfirst\qcm@argc
+ \global\let\aq@tempfirst\aq@argc
\or
- \global\let\qcm@tempfirst\qcm@argd
+ \global\let\aq@tempfirst\aq@argd
\or
- \global\let\qcm@tempfirst\qcm@arge
+ \global\let\aq@tempfirst\aq@arge
\fi
-\setcounter{alea@numfirst}{\@alea}%
-\setrannum{\@alea}{1}{\value{qcm@numb}}%
- \ifcase\@alea%
+\setcounter{alea@numfirst}{\aq@alea}%
+\setrannum{\aq@alea}{1}{\value{aq@numb}}%
+ \ifcase\aq@alea%
\or
- \global\let\qcm@templast\qcm@arga
+ \global\let\aq@templast\aq@arga
\or
- \global\let\qcm@templast\qcm@argb
+ \global\let\aq@templast\aq@argb
\or
- \global\let\qcm@templast\qcm@argc
+ \global\let\aq@templast\aq@argc
\or
- \global\let\qcm@templast\qcm@argd
+ \global\let\aq@templast\aq@argd
\or
- \global\let\qcm@templast\qcm@arge
+ \global\let\aq@templast\aq@arge
\fi
-\setcounter{alea@numlast}{\@alea}%
-\global\let\qcm@temp\qcm@tempfirst%
-\global\let\qcm@tempfirst\qcm@templast%
-\global\let\qcm@templast\qcm@temp%
-\global\expandafter\let\csname qcm@arg\alph{alea@numfirst}%
-\endcsname\qcm@tempfirst%
-\global\expandafter\let\csname qcm@arg\alph{alea@numlast}%
-\endcsname\qcm@templast%
+\setcounter{alea@numlast}{\aq@alea}%
+\global\let\aq@temp\aq@tempfirst%
+\global\let\aq@tempfirst\aq@templast%
+\global\let\aq@templast\aq@temp%
+\global\expandafter\let\csname aq@arg\alph{alea@numfirst}%
+\endcsname\aq@tempfirst%
+\global\expandafter\let\csname aq@arg\alph{alea@numlast}%
+\endcsname\aq@templast%
}%
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
-\newcommand{\qcm@hauteurbox}[1]{%
-\setbox\qcm@tempbox=%
+\newcommand{\aq@hauteurbox}[1]{%
+\setbox\aq@tempbox=%
\vbox{\parbox[t]{\textwidth-\tabcolsep*4-\arrayrulewidth*3-\cmdAQ@global@lq}%
{\cmdAQ@global@symb\quad\mbox{#1}}}% \cmdAQ@global@symb remplace $\square$
-\qcm@dimtmpa\ht\qcm@tempbox\relax%
-\qcm@dimtmpb\dp\qcm@tempbox\relax%
-\advance\qcm@dimtmpa by\qcm@dimtmpb}%
+\aq@dimtmpa\ht\aq@tempbox\relax%
+\aq@dimtmpb\dp\aq@tempbox\relax%
+\advance\aq@dimtmpa by\aq@dimtmpb}%
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
-\newcommand{\qcm@adjust}[1]{%
-\setbox\qcm@tempbox=%
+\newcommand{\aq@adjust}[1]{%
+\setbox\aq@tempbox=%
\vbox{%
\parbox[t]{\cmdAQ@global@lq}{\aq@style@numquest{\number\value{AQ@numquestion}.}\hspace{3pt}#1}}%
-\qcm@dimtmpa\ht\qcm@tempbox%
-\qcm@dimtmpb\dp\qcm@tempbox%
-\qcm@wdquest\wd\qcm@wdquest%
-\advance\qcm@dimtmpa by\qcm@dimtmpb\relax%
-\qcm@hauteurquest=\qcm@dimtmpa%
-\qcm@hauteurbox{\qcm@arga}%
-\qcm@hauteurprop=\qcm@dimtmpa%
-\qcm@hauteurbox{\qcm@argb}%
-\advance\qcm@hauteurprop by\qcm@dimtmpa\relax%
-\ifnum\value{qcm@numb}>2\relax%
-\qcm@hauteurbox{\qcm@argc}%
-\advance\qcm@hauteurprop by\qcm@dimtmpa\relax\fi
-\ifnum\value{qcm@numb}>3\relax%
-\qcm@hauteurbox{\qcm@argd}%
-\advance\qcm@hauteurprop by\qcm@dimtmpa\relax\fi
-\ifnum\value{qcm@numb}>4\relax%
-\qcm@hauteurbox{\qcm@arge}%
-\advance\qcm@hauteurprop by\qcm@dimtmpa\relax\fi
-\ifdim\qcm@hauteurquest<\qcm@hauteurprop%
-\global\qcm@dimtmp=0pt
-\qcm@dimtmpa\ht\qcm@tempbox%
-\qcm@dimtmpb\dp\qcm@tempbox%
-\advance\qcm@dimtmpa by3pt%
-\advance\qcm@dimtmpb by2pt%
-\vrule height\qcm@dimtmpa depth\qcm@dimtmpb width0pt%
+\aq@dimtmpa\ht\aq@tempbox
+\aq@dimtmpb\dp\aq@tempbox
+\aq@wdquest\wd\aq@wdquest
+\advance\aq@dimtmpa by\aq@dimtmpb\relax%
+\aq@hauteurquest=\aq@dimtmpa
+\aq@hauteurbox{\aq@arga}%
+\aq@hauteurprop=\aq@dimtmpa
+\aq@hauteurbox{\aq@argb}%
+\advance\aq@hauteurprop by\aq@dimtmpa\relax%
+\ifnum\value{aq@numb}>2\relax
+\aq@hauteurbox{\aq@argc}%
+\advance\aq@hauteurprop by\aq@dimtmpa\relax\fi
+\ifnum\value{aq@numb}>3\relax
+\aq@hauteurbox{\aq@argd}%
+\advance\aq@hauteurprop by\aq@dimtmpa\relax\fi
+\ifnum\value{aq@numb}>4\relax
+\aq@hauteurbox{\aq@arge}%
+\advance\aq@hauteurprop by\aq@dimtmpa\relax\fi
+\ifdim\aq@hauteurquest<\aq@hauteurprop%
+\global\aq@dimtmp=0pt
+\aq@dimtmpa\ht\aq@tempbox
+\aq@dimtmpb\dp\aq@tempbox
+\advance\aq@dimtmpa by3pt
+\advance\aq@dimtmpb by2pt
+\vrule height\aq@dimtmpa depth\aq@dimtmpb width0pt
\else
-\advance\qcm@hauteurquest by-\qcm@hauteurprop%
-\divide\qcm@hauteurquest by\theqcm@numb\relax%
-\divide\qcm@hauteurquest by2\relax%
-\global\qcm@dimtmp=\qcm@hauteurquest\fi
+\advance\aq@hauteurquest by-\aq@hauteurprop
+\divide\aq@hauteurquest by\theaq@numb\relax
+\divide\aq@hauteurquest by2\relax%
+\global\aq@dimtmp=\aq@hauteurquest\fi
}%
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
-\newcommand{\qcm@prop}[2]{%
-\setbox\qcm@tempbox=\vbox{#1}%
-\qcm@wdprop\wd\qcm@tempbox%
-\qcm@dimtmpa\ht\qcm@tempbox\advance\qcm@dimtmpa by4pt\advance\qcm@dimtmpa by\qcm@dimtmp\relax%
-\qcm@dimtmpb\dp\qcm@tempbox\advance\qcm@dimtmpb by3pt\advance\qcm@dimtmpb by\qcm@dimtmp\relax%
-\ifAQ@global@VF\hfil\fi%
+\newcommand{\aq@prop}[2]{%
+\setbox\aq@tempbox=\vbox{#1}%
+\aq@wdprop\wd\aq@tempbox
+\aq@dimtmpa\ht\aq@tempbox\advance\aq@dimtmpa by4pt\advance\aq@dimtmpa by\aq@dimtmp\relax
+\aq@dimtmpb\dp\aq@tempbox\advance\aq@dimtmpb by3pt\advance\aq@dimtmpb by\aq@dimtmp\relax
+\ifAQ@global@VF\hfil\fi
\ifAQ@global@transparent\def\cmdAQ@global@corsymb{$\bigcirc$}%
-\def\cmdAQ@global@symb{}\fi%
+\def\cmdAQ@global@symb{}\fi
\ifAQ@global@numprop\stepcounter{AQ@numprop}%
{\aq@style@numrep{(\cmdAQ@global@propstyle{AQ@numprop})}}%
\else
- \ifAQ@global@nosquare%
+ \ifAQ@global@nosquare
\else%
- \ifAQ@global@correction%
+ \ifAQ@global@correction
\def\@stop{1}
\@for\goodrep:=\cmdAQ@local@br\do{%
\ifnum\@stop<6 %
@@ -343,76 +351,80 @@ Une bonne r\'eponse rapporte \textbf{\cmdAQ@global@bonus\ point}. Une mauvaise r
\cmdAQ@global@symb\hspace*{6pt}%
\fi
\fi
- \fi%
+ \fi
\ifAQ@global@transparent
- \vrule height0pt depth0pt width\qcm@wdprop
+ \vrule height0pt depth0pt width\aq@wdprop
\else
\ignorespaces#1%
\fi
- \vrule height\qcm@dimtmpa depth\qcm@dimtmpb width0pt%
+ \vrule height\aq@dimtmpa depth\aq@dimtmpb width0pt
\ifAQ@global@VF\hfil\fi}%
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
\newcommand{\AQquestion}[3][]{%
\setkeys[AQ]{local}{#1}%
\stepcounter{AQ@numquestion}%
\setcounter{AQ@numprop}{0} % v0.93
-\setcounter{qcm@numb}{0}%
+\setcounter{aq@numb}{0}%
\@for\liste:=#3\do{%
-\stepcounter{qcm@numb}%
-\global\expandafter\let\csname qcm@arg\alph{qcm@numb}\endcsname\liste}%
-\ifAQ@global@alea\ifAQ@global@VF\else%
-\n@arg=0 %
-\loop\ifnum\n@arg<\value{qcm@numb}\melange\advance\n@arg by1\repeat\fi\fi%
-\qcm@adjust{#2}%
+\stepcounter{aq@numb}%
+\global\expandafter\let\csname aq@arg\alph{aq@numb}\endcsname\liste}%
+\ifAQ@global@alea\ifAQ@global@VF
+\else
+\aq@n@arg=0 %
+\loop\ifnum\aq@n@arg<\value{aq@numb}\aq@melange\advance\aq@n@arg by1\repeat\fi
+\fi
+\aq@adjust{#2}%
\multirow{1}{\cmdAQ@global@lq}[\cmdAQ@local@pq]{%
\ifAQ@global@num\aq@style@numquest{\cmdAQ@global@numstyle{AQ@numquestion}.}%
-\hspace{3pt}\fi%
+\hspace{3pt}\fi
\ifAQ@global@transparent%
-\hrule height0pt depth0pt width\qcm@wdquest%
-\else%
-#2\vss%
-\fi%
+\hrule height0pt depth0pt width\aq@wdquest%
+\else
+#2\vss
+\fi
}%
&\setkeys[AQ]{local}{#1}%
- \qcm@prop{\qcm@arga}{1}\\%
- \ifAQ@global@sep\cline{2-2}\fi%
+ \aq@prop{\aq@arga}{1}\\%
+ \ifAQ@global@sep\cline{2-2}\fi
&\setkeys[AQ]{local}{#1}%
- \qcm@prop{\qcm@argb}{2}\\%
- \ifAQ@global@sep\cline{2-2}\fi%
- \ifnum\value{qcm@numb}=2\hline\else\ifAQ@global@sep\cline{2-2}\fi%
+ \aq@prop{\aq@argb}{2}\\
+ \ifAQ@global@sep\cline{2-2}\fi
+ \ifnum\value{aq@numb}=2\hline\else\ifAQ@global@sep\cline{2-2}\fi
&\setkeys[AQ]{local}{#1}%
- \qcm@prop{\qcm@argc}{3}\\%
- \ifnum\value{qcm@numb}=3\hline\else\ifAQ@global@sep\cline{2-2}\fi%
+ \aq@prop{\aq@argc}{3}\\
+ \ifnum\value{aq@numb}=3\hline\else\ifAQ@global@sep\cline{2-2}\fi
&\setkeys[AQ]{local}{#1}%
- \qcm@prop{\qcm@argd}{4}\\%
- \ifnum\value{qcm@numb}=4\hline\else\ifAQ@global@sep\cline{2-2}\fi%
+ \aq@prop{\aq@argd}{4}\\
+ \ifnum\value{aq@numb}=4\hline\else\ifAQ@global@sep\cline{2-2}\fi
&\setkeys[AQ]{local}{#1}%
- \qcm@prop{\qcm@arge}{5}\\%
+ \aq@prop{\aq@arge}{5}\\
\hline\fi\fi\fi}%
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
-\newcommand{\qcm@questionVF}[2][]{%
+\newcommand{\aq@questionVF}[2][]{%
\setkeys[AQ]{local}{#1}
\stepcounter{AQ@numquestion}%
\setcounter{AQ@numprop}{0}% v0.93
-\protected@xdef\qcm@arga{\textbf{V}}
-\protected@xdef\qcm@argb{\textbf{F}}
-\setcounter{qcm@numb}{2}%
-\qcm@adjust{#2}%
+\protected@xdef\aq@arga{\textbf{V}}
+\protected@xdef\aq@argb{\textbf{F}}
+\setcounter{aq@numb}{2}%
+\aq@adjust{#2}%
\multirow{3}{\cmdAQ@global@lq}[\cmdAQ@local@pq]{%
-\ifAQ@global@num\aq@style@numquest{\cmdAQ@global@numstyle{AQ@numquestion}.}\hspace{3pt}\fi%
+\ifAQ@global@num\aq@style@numquest{\cmdAQ@global@numstyle{AQ@numquestion}.}\hspace{3pt}\fi
#2\vss}%
- &\setkeys[AQ]{local}{#1}\qcm@prop{\qcm@arga}{1}\\
-\ifAQ@global@sep \cline{2-2}\fi%
- &\setkeys[AQ]{local}{#1}\qcm@prop{\qcm@argb}{2}\\
+ &\setkeys[AQ]{local}{#1}\aq@prop{\aq@arga}{1}\\
+\ifAQ@global@sep \cline{2-2}\fi
+ &\setkeys[AQ]{local}{#1}\aq@prop{\aq@argb}{2}\\
\hline}%
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
\newenvironment{alterqcm}[1][]{%
-\ifAQ@global@numprop \setkeys [AQ] {global} {nosquare = true}{}\fi% %
+\ifAQ@global@numprop \setkeys [AQ] {global} {nosquare = true}{}\fi
\setkeys[AQ]{global}{#1}%
+\ifx\aqutil@empty\cmdAQ@global@points \else
+\points{\cmdAQ@global@points}
+\fi
\setcounter{AQ@numquestion}{\cmdAQ@global@numbreak}%
-\ifAQ@global@VF\let\AQquestion\qcm@questionVF\let\qcm@pre\qcm@preVF\fi%
-\ifAQ@global@pre\qcm@pre\par\medskip\fi%
-\hfill\break%
+\ifAQ@global@VF\let\AQquestion\aq@questionVF\let\aq@pre\aq@preVF\fi
+\ifAQ@global@pre\aq@pre\par\cmdAQ@global@afterpreskip\fi
\ifAQ@global@long%
\setlength\LTleft{0pt}%
\setlength\LTright\fill%
@@ -428,13 +440,13 @@ Une bonne r\'eponse rapporte \textbf{\cmdAQ@global@bonus\ point}. Une mauvaise r
\textwidth-\tabcolsep*4-\arrayrulewidth*3-\cmdAQ@global@lq}%
|@{}}%
\fi
- \ifAQ@global@title\qcm@title\else\hline\fi%
+ \ifAQ@global@title\aq@title\else\hline\fi%
}%
-{\ifAQ@global@long%
+{\ifAQ@global@long
\end{longtable}%
\else
\end{tabular}%
- \fi%
+ \fi
}%
%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
@@ -442,77 +454,91 @@ Une bonne r\'eponse rapporte \textbf{\cmdAQ@global@bonus\ point}. Une mauvaise r
% code de JC Charpentier
%----------------------------------------------------------%
-\newcommand\InputQuestionList[3]{%
-
- \tdml@a={}%
- \tdml@b={}%
- \ifx\relax#3\relax\else %
- \tdml@#3,\@nil,%
- \expandafter\tdml@clean\the\tdml@a\@nil
+\newcommand\InputQuestionList[3]{%
+ \aq@tdml@a={}%
+ \aq@tdml@b={}%
+ \ifx\relax#3\relax\else
+ \tdml@#3,\@nil,\expandafter\tdml@clean\the\aq@tdml@a\@nil
\fi
- \expandafter\gdef\expandafter\last@val\expandafter{\the\tdml@b}
- \AQ@TA{#1}{#2}{\the\tdml@a}%
+ \expandafter\gdef\expandafter\last@val\expandafter{\the\aq@tdml@b}%
+ \AQ@TA{#1}{#2}{\the\aq@tdml@a}%
\AQ@TB{#1}{#2}{\last@val}}
%----------------------------------------------------------%
\long\def\tdml@#1,{%
\ifx\@nil#1\relax
\else
- \expandafter\addtotoks\the\tdml@b,\to\tdml@a
- \tdml@b={#1}%
+ \expandafter\addtotoks\the\aq@tdml@b,\to\aq@tdml@a
+ \aq@tdml@b={#1}%
\expandafter\tdml@
\fi
}
%----------------------------------------------------------%
\long\def\addtotoks#1\to#2{%
#2=\expandafter{\the#2#1}%
-}
+}%
%----------------------------------------------------------%
\long\def\tdml@clean,#1\@nil{%
\ifx\relax#1\relax
- \tdml@a{}%
+ \aq@tdml@a{}%
\else
\tdml@@clean#1\@nil
\fi
}
%----------------------------------------------------------%
\long\def\tdml@@clean#1,\@nil{%
- \tdml@a{#1}%
-}
+ \aq@tdml@a{#1}%
+}%
%----------------------------------------------------------%
%----------------------------------------------------------%
\newcommand\AQ@TA[3]{\@for\nb:=#3\do{%
-\input #1#2\nb}
-}
-
+\input #1#2\nb}%
+}%
\newcommand\AQ@TB[3]{\input#1#2#3}%
+%----------------------------------------------------------%
+% from forloop.sty
+\newcommand{\aq@forLoop}[5][1]
+{%
+\setcounter{#4}{#2}%
+\ifthenelse{\value{#4}<#3}%
+{#5\addtocounter{#4}{#1}%
+\aq@forLoop[#1]{\value{#4}}{#3}{#4}{#5}%
+}%
+{\ifthenelse{\value{#4}=#3}%
+{#5}{}}}%
+
%----------------------------------------------------------%
-%----------------------------------------------------------%
-\newcount\prop
\def\aq@tvi(#1,#2){\vrule height #1pt depth #2pt width 0pt}
\define@cmdkey [AQ] {ann} {propstyle}[true]{}
-\define@boolkey [AQ] {ann} {VF}[true]{}
-\presetkeys [AQ] {ann} {propstyle = \arabic,
- VF = false}{}
-
+\define@boolkey[AQ] {ann} {VF}[true]{}
+\presetkeys [AQ] {ann} {propstyle = \arabic,
+ VF = false}{}
\newcommand*{\AQannexe}[4][]{%
\setkeys[AQ]{ann}{#1}%
-\setcounter{tmp}{#4}%
-\stepcounter{tmp}%
-\begin{tabular}{*{\number\value{tmp}}{|>{\hfill}c}|}\hline%
+\aq@tmp=#4 %
+\advance\aq@tmp by 1 %
+\begin{tabular}{*{\number\aq@tmp}{|>{\hfill}c}|}\hline%
\ifAQ@ann@VF%
N&V&F%
\else
-N\forLoop{1}{#4}{identCol}%
- {& \cmdAQ@ann@propstyle{identCol}}\fi
+N\aq@forLoop{1}{#4}{aq@identCol}%
+ {& \cmdAQ@ann@propstyle{aq@identCol}}\fi
\tabularnewline\hline%
-\forLoop{#2}{#3}{identRow}
- {\number\value{identRow}&%
- \forLoop{2}{\number\value{tmp}}{identCol}%
+\aq@forLoop{#2}{#3}{aq@identRow}
+ {\number\value{aq@identRow}&%
+ \aq@forLoop{2}{\number\aq@tmp}{aq@identCol}%
{$\ $%
- \ifthenelse{\equal{\value{identCol}}{#4}}{}{&}%
+ \ifthenelse{\equal{\value{aq@identCol}}{#4}}{}{&}%
}%
\tabularnewline\hline}%
\end{tabular}%
}%
-
+%----------------------------------------------------------%
+\newcommand\AQpoints[1]{%
+\marginpar{%
+\begin{tabular}{|c|}
+ \hline
+ \textbf{#1}\\
+ \hline\\
+ \hline
+\end{tabular}}}
\endinput