1

This question follows this one How to reduce the spacing between responses in the alterqcm package?

The solution given by @UlrikeFischer to reduce the spacing between answers is not compatible with the True/False MCQs of the alterqcm package. In this case, the question often overlaps with the next question as you can see (highlighted in yellow on the screenshot).

Is there a solution to this problem?

screen shot

Simon Dispa solution

These settings work fine when the question text takes up more vertical space than the True/False choices, but when the question takes up less space, it spills over onto the line (I highlighted it in yellow). Here, I set the bottom parameter to -0.9em and the other to -0.8em

screenshot

\documentclass[12pt]{article}
\usepackage{etoolbox,tikzducks}% http://ctan.org/pkg/etoolbox
\usepackage[french]{alterqcm}
\usepackage{siunitx}
\usepackage[right]{eurosym}
\def\square{\tikz[scale=0.2]\duck;} %
\def\nogreekalph{??} % 
\parindent0pt
\makeatletter
\newcommand\aqheightadvance{4pt}
\newcommand\aqdepthadvance{3pt}
\patchcmd \aq@prop {4pt}{\aqheightadvance}{}{\fail}
\patchcmd \aq@prop {3pt}{\aqdepthadvance}{}{\fail}
\makeatother

\begin{document}

\renewcommand\aqheightadvance{0pt} \renewcommand\aqdepthadvance{0pt}

\begin{alterqcm}[lq=8cm] \AQquestion{Question}{% {Proposition 1}, {Proposition 2}, {Proposition 3}} \end{alterqcm}

\bigskip \begin{alterqcm}[lq=.78\textwidth,VF,num=false,symb = \dingsquare] \renewcommand{\arraystretch}{0.8} \AQquestion{Dans une recette, il faut 3 \oe ufs pour faire un gâteau pour 4 personnes. Il en faudra 6 pour faire un gâteau pour 8 personnes.} \AQquestion{La pointure moyenne des chaussures d'un enfant est proportionnelle à son âge.} \AQquestion{Une paquet de macaronis pesant \SI{250}{g} est vendue \EUR{0,90}. Un paquet de \SI{500}{g} de ces mêmes macaronis est vendu \EUR{1,70}. Le prix des paquets de macaronis est proportionnel à leur masse. } \end{alterqcm}

\begin{minipage}{.6\textwidth} \begin{alterqcm}[lq=20mm,num=false,title=false,symb = \dingsquare] \AQquestion{$11-9\div3$}{% {je commence par $11-9$}, {dans l'ordre que je veux}, {je commence par $9\div3$}} \AQquestion{$8\times(3+4)$}{% {je commence par $8\times3$}, {dans l'ordre que je veux}, {je commence par $3+4$}} \end{alterqcm} \end{minipage} \end{document}

AndréC
  • 24,137
  • I posted an updated output. Please tell me if it is what you want or if you need some changes. – Simon Dispa Apr 19 '21 at 20:08
  • @SimonDispa There is real progress, but when the question has multiple lines, like 3 or 4 lines, then the space above the first line is more important than the space below the last line. The text of the questions should be centered vertically. – AndréC Apr 19 '21 at 20:17
  • Will this be the only requirement left to accept the answer? – Simon Dispa Apr 19 '21 at 20:25
  • @SimonDispa Yes, because the choice of answers is vertically centered. – AndréC Apr 19 '21 at 20:34
  • I updated the answer using also numbered questions. – Simon Dispa Apr 19 '21 at 21:35
  • There are two marked lines in the code to adjust/reduce the spaces above and below the text. The minimum vertical space is determined by the height of V/F assembly. – Simon Dispa Apr 20 '21 at 12:10
  • These settings work fine when the question text takes up more vertical space than the True/False choices, but when the question takes up less space, it spills over onto the line (I highlighted it in yellow in my question). Here, I set the bottom parameter to -0.9em and the other to -0.8em – AndréC Apr 20 '21 at 13:40
  • -0.8em and the lower -0.6emare the obvious limits. The space available can not be less to V/F in a vertical disposition. There are two heights, the higher wins. – Simon Dispa Apr 20 '21 at 14:49
  • Is it possible to automatically take into account the text that occupies the most space, i.e. that the adjustments differ depending on whether the question is longer than the True/False choices or whether the question is shorter than the True/False choice? – AndréC Apr 20 '21 at 15:00
  • Everything could be possible. In my opinion, the more airy the cell, the better the understanding of the text. Also, non-homogeneous behavior will not look good, with some cells more compressed than others. Do you have a real need? Please explain. – Simon Dispa Apr 20 '21 at 15:08
  • I usually make short evaluations of a quarter of an hour by saving paper in a so-called eco-responsible approach, which is fashionable at the moment. On an A4 sheet, there are two subjects in A5 format on both sides. Thus, it is important that on small formats A5, there is the least loss of space possible because it saves paper... – AndréC Apr 20 '21 at 16:32
  • I suggest you post another question, adding all the MC question types that you normally use and questions with assorted real lengths, asking for ideas to minimize the use of paper. – Simon Dispa Apr 20 '21 at 17:16

1 Answers1

2

Is this closer to your goal?

x

This code is only valid for the True/False alternative for MCQs of the alterqcm package.

\documentclass[12pt]{article}
\usepackage{etoolbox,tikzducks}% http://ctan.org/pkg/etoolbox
\usepackage[french]{alterqcm}

\usepackage{siunitx} \usepackage[right]{eurosym} \def\square{\tikz[scale=0.2]\duck;} % \def\nogreekalph{??} % \parindent0pt

\makeatletter \renewcommand{\aq@questionVF}[2][]{% \setkeys[AQ]{local}{#1} \stepcounter{AQ@numquestion}% \setcounter{AQ@numprop}{0}% v0.93 \ifcase\locall@ng \protected@xdef\aq@arga{\textbf{V}} \protected@xdef\aq@argb{\textbf{F}} \or \protected@xdef\aq@arga{\textbf{T}} \protected@xdef\aq@argb{\textbf{F}} \or \protected@xdef\aq@arga{\textbf{R}} \protected@xdef\aq@argb{\textbf{F}} \or \protected@xdef\aq@arga{\textbf{Σ}} \protected@xdef\aq@argb{\textbf{Λ}} \fi \setcounter{aq@numb}{2}% &\[-0.3em] %<<<<<<<<<< adjust upper blank space \ifAQ@global@num \parbox{\cmdAQ@global@lq}{\aq@style@numquest{\cmdAQ@global@numstyle{AQ@numquestion}.}\hspace{3pt}#2} & \hspace{2em}\multirow[t]{1}{\z@}{\parbox{\z@}{\aq@prop{\aq@arga}{1}\aq@prop{\aq@argb}{2}}}\[-0.2em] %<<<<<<<<<< adjust lower blank space \else \parbox{\cmdAQ@global@lq}{#2} & \hspace{2em}\multirow[t]{1}{\z@}{\parbox{\z@}{\aq@prop{\aq@arga}{1}\aq@prop{\aq@argb}{2}}}\[-0.2em] %<<<<<<<<<< adjust lower blank space \fi \ifAQ@global@sep \cline{2-2}\fi &\ \hline}% \makeatother

\begin{document}

\begin{alterqcm}[lq=8cm]
    \AQquestion{Question}{%
        {Proposition 1},
        {Proposition 2},
        {Proposition 3}}
\end{alterqcm}

\bigskip

\begin{alterqcm}[lq=.78\textwidth,VF,num=false,symb = \dingsquare]      
    \AQquestion{Dans une recette, il faut 3 \oe ufs pour faire un gâteau pour 4 personnes. Il en faudra 6 pour faire un gâteau pour 8 personnes.}
    \AQquestion{La pointure moyenne des chaussures d'un enfant.}
    \AQquestion{Une paquet de macaronis pesant \SI{250}{g} est vendue \EUR{0,90}. Un paquet de \SI{500}{g} de ces mêmes macaronis est vendu \EUR{1,70}. Le prix des paquets de macaronis est proportionnel à leur masse.}
\end{alterqcm}

\bigskip

\begin{alterqcm}[lq=.78\textwidth,VF,num=true,symb = \dingsquare]      
\AQquestion{Dans une recette, il faut 3 \oe ufs pour faire un gâteau pour 4 personnes. Il en faudra 6 pour faire un gâteau pour 8 personnes.}
\AQquestion{La pointure moyenne des chaussures d'un enfant.}
\AQquestion{Une paquet de macaronis pesant \SI{250}{g} est vendue \EUR{0,90}. Un paquet de \SI{500}{g} de ces mêmes macaronis est vendu \EUR{1,70}. Le prix des paquets de macaronis est proportionnel à leur masse.}

\end{alterqcm}

\end{document}

There are two marked lines in the code to adjust/reduce the spaces above and below the text. The minimum vertical space is determined by the height of V/F assembly. Can be obtained with

&\\[-0.8em] %<<<<<<<<<< adjust upper blank space

and ... aq@prop{\aq@argb}{2}}}\\[-0.6em] %<<<<<<<<<< adjust lower blank space (two places)

m

Simon Dispa
  • 39,141
  • Thank you for your interest in this question. Your solution is to use the native settings of alterqcm, which does not allow to reduce the space between the answers as Ulricke Fischer's solution did. – AndréC Apr 19 '21 at 05:24
  • It's a great improvement since the text is centered vertically, it just remains to remove the space above and below the text of the question so that it harmonizes with the others. I added MCQs in the question so you can see the space above and below the text. I hope this is feasible. – AndréC Apr 20 '21 at 06:25