Control vertical space between answers in alterqcm
Werner's answer is fine. Alterqcm uses a tabular and in the last version, I added a longtable option. In fact some problems arrive because one question or one proposition takes a lot of space. The good way is to use a global method like the FACTOR approach or like the LENGTH approach and then you can use a local approach.
You can modify the position of the questions with pq=...
, the questions are moved inside the case. The modifications are global with \begin{alterqcm}[lq=85mm,pq=2mm]
and local with \AQquestion[pq=6mm]{...}
.
If you want more space for a one proposition, you can add something like \AQms(16,14)
. This a rule with no width ( a phantom ) and it's often very useful to put the proposition inside a minipage
to get a correct result.
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage{alterqcm}
\parindent0pt
\begin{document}
\begin{alterqcm}[lq=8cm,language=english,pq=-6mm]
\AQquestion{Question}{%
{Proposition 1},
{Proposition 2},
{Proposition 3}}
\AQquestion[pq=0mm]{Question}{%
{Proposition 1},
{\AQms(16,14) Proposition 2},
{Proposition 3}}
\end{alterqcm}
\end{document}
Update with fractions. The first array is correct but if you use \arraystretch
you need to add pq=- ...
to get a correct placement.
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier}
\usepackage{amsmath,alterqcm}
\begin{document}
\begin{alterqcm}[lq=85mm]
\AQquestion{Pour tout réel $x$, le nombre \[\dfrac{\text{e}^x - 1}{\text{e}^x + 2}\hskip12pt \text{égal à :} \] }
{{$-\dfrac{1}{2}$},
{$\dfrac{\text{e}^{-x} - 1}{\text{e}^{-x} + 2}$},
{$\dfrac{1 - \text{e}^{-x}}{1 + 2\text{e}^{-x}}$}
}
\AQquestion{On pose I $= \displaystyle\int_{\ln 2}^{\ln 3} \dfrac{1}{\text{e}^x - 1}\,\text{d}x$ et J $ = \displaystyle\int_{\ln 2}^{\ln 3} \dfrac{\text{e}^x}{\text{e}^x - 1}\,\text{d}x$ \\ alors le nombre I $-$ J est égal à}
{{$\ln \dfrac{2}{3}$},
{$\ln \dfrac{3}{2}$},
{$\dfrac{3}{2}$}
}
\end{alterqcm}
{\renewcommand{\arraystretch}{2}
\begin{alterqcm}[lq=85mm,pq=-4mm]
\AQquestion{Pour tout réel $x$, le nombre \[\dfrac{\text{e}^x - 1}{\text{e}^x + 2}\hskip12pt \text{égal à :} \] }
{{$-\dfrac{1}{2}$},
{$\dfrac{\text{e}^{-x} - 1}{\text{e}^{-x} + 2}$},
{$\dfrac{1 - \text{e}^{-x}}{1 + 2\text{e}^{-x}}$}
}
\AQquestion{On pose I $= \displaystyle\int_{\ln 2}^{\ln 3} \dfrac{1}{\text{e}^x - 1}\,\text{d}x$ et J $ = \displaystyle\int_{\ln 2}^{\ln 3} \dfrac{\text{e}^x}{\text{e}^x - 1}\,\text{d}x$ \\ alors le nombre I $-$ J est égal à}
{{$\ln \dfrac{2}{3}$},
{$\ln \dfrac{3}{2}$},
{$\dfrac{3}{2}$}
}
\end{alterqcm} }
\end{document}
Since the typesetting of the alterqcm
environment is done in a tabular
, you can perform the same adjustments you normally would for gaining extra row height. Here's a minimal example:
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage{alterqcm}
\setlength{\parindent}{0pt}
\begin{document}
\begin{alterqcm}[lq=8cm,language=english]
\AQquestion{Question}{%
{Proposition 1},
{Proposition 2},
{Proposition 3}}
\end{alterqcm}
\bigskip
% =========== FACTOR approach ===========
{\renewcommand{\arraystretch}{2}
\begin{alterqcm}[lq=8cm,language=english]
\AQquestion{Question}{%
{Proposition 1},
{Proposition 2},
{Proposition 3}}
\end{alterqcm}}
\bigskip
% =========== LENGTH approach ===========
{\setlength{\extrarowheight}{20pt}%
\begin{alterqcm}[lq=8cm,language=english]
\AQquestion{Question}{%
{Proposition 1},
{Proposition 2},
{Proposition 3}}
\end{alterqcm}}
\end{document}
Although I've enlarged the vertical spacing, you can specify a fraction for \arraystretch
or negative lengths for \extrarowheight
.
This controls global changes for the entire alterqcm
environment (header and body).