1

I'm trying to write solutions to a recently-given test. One of the problems is a list of "True/False & Justify" questions.

MWE of Questions:

\documentclass{article}
\usepackage{tkz-euclide}
\begin{document}
\begin{enumerate}
    \item If $AM = MB$, then $M$ is the midpoint of $\overline{AB}$.\vfill
    \item A right triangle cannot be isosceles.\vfill
    \item The supplement of an acute angle is acute.\vfill
\end{enumerate}
\end{document}

I would like to be able to keep this vertical spacing exactly (i.e., the amount of whitespace between each enum-item is the same), but be able to go through and add answers after each. I know if each answer were exactly the same vertical height it wouldn't matter, but if they aren't (such as...)?

MWE of Not-Quite-Answers:

\documentclass{article}
\usepackage{tkz-euclide}
\begin{document}
\begin{enumerate}
    \item If $AM = MB$, then $M$ is the midpoint of $\overline{AB}$.\\
        False: For example, if $\triangle ABM$ is equilateral then $AM = MB$ but not the midpoint of $\overline{AB}$.
        \begin{center}\begin{tikzpicture}[scale=2]\begin{scope}[thick]
            \draw (0,0) node[below left] {$A$} -- (60:1) node[above] {$M$} -- (1,0) node[below right] {$B$} -- (0,0);
            \draw (60:.5)++(-30:.1) -- ++(-30:-.2);
            \draw (1,0)++(120:.5)++(30:.1) -- ++(30:-.2);
            \draw (.5,.1) -- (.5,-.1);
          \end{scope}\end{tikzpicture}\end{center}\vfill
    \item A right triangle cannot be isosceles.\\
        False: If a triangle has angles of measures $45^\circ$, $45^\circ$, and $90^\circ$, then the triangle is both isosceles and right.
        \begin{center}\begin{tikzpicture}[scale=2]\begin{scope}[thick]
            \draw (0,0) node[below left] {$C$} -- (0,1) node[above] {$A$} -- (1,0) node[below right] {$B$} -- (0,0);
            \draw (0,0) rectangle (.2, .2);
            \draw (-.1,.5) -- (.1,.5);
            \draw (.5,.1) -- (.5,-.1);
          \end{scope}\end{tikzpicture}\end{center}\vfill
    \item The supplement of an acute angle is acute.\\
        False: The supplement of $\angle A$ has measure $180^\circ - m\angle A$. If $\angle A$ is acute, then $m\angle A < 90^\circ$ and its supplement has measure $>90^\circ$, which means it is obtuse.\vfill
\end{enumerate}
\end{document}
D.J.
  • 159
  • Your second MWE doesn't work, the \measuredangle macro is undefined. – Torbjørn T. Dec 29 '16 at 20:19
  • Sorry about that. I forgot \measuredangle isn't native. – D.J. Dec 30 '16 at 02:16
  • If just the pictures make the difference, use overlay, maybe. Otherwise, lie. Put them all in boxes and tell LaTeX they are all the same height and depth e.g. 0pt, whatever. – cfr Dec 30 '16 at 02:39
  • I don't know if I have understood correctly: do you mean to keep the answer at exactly the same distance of the first mwe and add the question in the white spaces? – CarLaTeX Dec 30 '16 at 04:04
  • I would like for the two MWEs to align perfectly, say when printed. As in the enumerations would appear at exactly the same height on the page, even though #2 has additional text filled in. – D.J. Dec 30 '16 at 13:47
  • I've added a new version of my answer, I hope that it could be good for you. – CarLaTeX Feb 19 '17 at 18:53

1 Answers1

1

Edit: Thank to this answer I've found a better solution.

You may use a new command defined like this:

\newcommand{\mysol}[1]{\phantom{\parbox{\linewidth}{#1}}}

for student version, and like this:

\newcommand{\mysol}[1]{#1}

for teacher version, and you can comment one of the versions depending on which version you're printing.

Here's the code:

\documentclass{article}
\newcommand{\mysol}[1]{\phantom{\parbox{\linewidth}{#1}}}% for student version
%\newcommand{\mysol}[1]{#1}% for teacher version
\usepackage{tkz-euclide}
\begin{document}
    \begin{enumerate}
        \item If $AM = MB$, then $M$ is the midpoint of $\overline{AB}$.\\
        \mysol{False: For example, if $\triangle ABM$ is equilateral then $AM = MB$ but not the midpoint of $\overline{AB}$.
        \begin{center}\begin{tikzpicture}[scale=2]\begin{scope}[thick]
            \draw (0,0) node[below left] {$A$} -- (60:1) node[above] {$M$} -- (1,0) node[below right] {$B$} -- (0,0);
            \draw (60:.5)++(-30:.1) -- ++(-30:-.2);
            \draw (1,0)++(120:.5)++(30:.1) -- ++(30:-.2);
            \draw (.5,.1) -- (.5,-.1);
            \end{scope}\end{tikzpicture}\end{center}
        }\vfill
        \item A right triangle cannot be isosceles.\\
        \mysol{False: If a triangle has angles of measures $45^\circ$, $45^\circ$, and $90^\circ$, then the triangle is both isosceles and right.
        \begin{center}\begin{tikzpicture}[scale=2]\begin{scope}[thick]
            \draw (0,0) node[below left] {$C$} -- (0,1) node[above] {$A$} -- (1,0) node[below right] {$B$} -- (0,0);
            \draw (0,0) rectangle (.2, .2);
            \draw (-.1,.5) -- (.1,.5);
            \draw (.5,.1) -- (.5,-.1);
            \end{scope}\end{tikzpicture}\end{center}}\vfill
        \item The supplement of an acute angle is acute.\\
        \mysol{False: The supplement of $\angle A$ has measure $180^\circ - m\angle A$. If $\angle A$ is acute, then $m\angle A < 90^\circ$ and its supplement has measure $>90^\circ$, which means it is obtuse.}\vfill
    \end{enumerate}
\end{document}

Student version:

enter image description here

Teacher version:

enter image description here

Previous answer: What about something like using an explicit \vspace{.3\textheight}, for the empty questions, and some minipages of the same height, for the version with the answers? Could it be OK?

\documentclass{article}
\usepackage{tkz-euclide}
\begin{document}
\begin{enumerate}
    \item If $AM = MB$, then $M$ is the midpoint of $\overline{AB}$.\vspace{.3\textheight}
    \item A right triangle cannot be isosceles.\vspace{.3\textheight}
    \item The supplement of an acute angle is acute.\vspace{.3\textheight}
\end{enumerate}
\clearpage
\begin{enumerate}
    \item If $AM = MB$, then $M$ is the midpoint of $\overline{AB}$.\\
        \begin{minipage}[t][.3\textheight]{\linewidth}
            False: For example, if $\triangle ABM$ is equilateral then $AM = MB$ but not the midpoint of $\overline{AB}$.
            \begin{center}
            \begin{tikzpicture}[scale=2]
            \begin{scope}[thick]
                \draw (0,0) node[below left] {$A$} -- (60:1) node[above] {$M$} -- (1,0) node[below right] {$B$} -- (0,0);
                \draw (60:.5)++(-30:.1) -- ++(-30:-.2);
                \draw (1,0)++(120:.5)++(30:.1) -- ++(30:-.2);
                \draw (.5,.1) -- (.5,-.1);
            \end{scope}
            \end{tikzpicture}
            \end{center}
        \end{minipage}
    \item A right triangle cannot be isosceles.\\
        \begin{minipage}[t][.3\textheight]{\linewidth}
            False: If a triangle has angles of measures $45^\circ$, $45^\circ$, and $90^\circ$, then the triangle is both isosceles and right.
            \begin{center}
            \begin{tikzpicture}[scale=2]
            \begin{scope}[thick]
                \draw (0,0) node[below left] {$C$} -- (0,1) node[above] {$A$} -- (1,0) node[below right] {$B$} -- (0,0);
                \draw (0,0) rectangle (.2, .2);
                \draw (-.1,.5) -- (.1,.5);
                \draw (.5,.1) -- (.5,-.1);
            \end{scope}
            \end{tikzpicture}
            \end{center}
        \end{minipage}
    \item The supplement of an acute angle is acute.\\
        \begin{minipage}[t][.3\textheight]{\linewidth}
            False: The supplement of $\angle A$ has measure $180^\circ - m\angle A$. If $\angle A$ is acute, then $m\angle A < 90^\circ$ and its supplement has measure $>90^\circ$, which means it is obtuse.
        \end{minipage}
\end{enumerate}
\end{document}

enter image description here

enter image description here

CarLaTeX
  • 62,716