1

This question has a continuation here How to reduce the spacing between responses in True/False MCQs of the alterqcm package?


The alterqcm package is no longer maintained by Alain Matthes. Two other developers maintain it. I wrote to them 15 days ago by email to report the error reported here: Is there a conflict between the xkeyval and alterqcm packages? I have not received a reply.

I am trying to reduce the spacing between the lines of the QCM as indicated in this solution by @Werner and it does not work.

In addition, by using the David Carlisle's code given in the chat, I get an X instead of a square.

screenshot

Full code of the screenshot:

\documentclass[12pt]{article}
%\usepackage[utf8]{inputenc}
%\usepackage[upright]{fourier}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\usepackage[english]{alterqcm}
\def\square{X} % <---------- David Carlisle comment
\def\nogreekalph{??} % <---- David Carlisle comment
\parindent0pt
\begin{document}
% Original display
\begin{alterqcm}[lq=8cm]
 \AQquestion{Question}{%
 {Proposition 1},
 {Proposition 2},
 {Proposition 3}}
\end{alterqcm}

\bigskip

% Smashed display !!!!!! Dont work now {\begin{alterqcm}[lq=8cm] \AQquestion{Question}{% {\smash{Proposition 1}}, {\smash{Proposition 2}}, {\smash{Proposition 3}}} \end{alterqcm}}

\bigskip

% Global smashed display !!!! Dont work now \makeatletter \patchcmd{\aq@prop}{\vbox{#1}}{\vbox{\smash{#1}}}{}{}% patch \aq@prop \makeatother \begin{alterqcm}[lq=8cm] \AQquestion{Question}{% {Proposition 1}, {Proposition 2}, {Proposition 3}} \end{alterqcm}

\end{document}

Is there a solution?

AndréC
  • 24,137

1 Answers1

3

You can redefine the \square command to whatever you want. The X from David was only a placeholder.

The extra spacing is hard coded, so to change it you will have to patch an internal command:

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

\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}
\begin{alterqcm}[lq=8cm]
 \AQquestion{Question}{%
 {Proposition 1},
 {Proposition 2},
 {Proposition 3}}
\end{alterqcm}

\bigskip

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

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


\end{document}

enter image description here

Ulrike Fischer
  • 327,261