0

I am typing up some practice problems using the multicol command and notice my ```\cos t=\dfrac{1]{2}`` is not inline with row 2. Any suggestions on aligning the row?


\documentclass[12pt]{exam}
\usepackage[utf8]{inputenc}
\usepackage[margin=.5in]{geometry}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{multicol}
\renewcommand{\arraystretch}{3}


\begin{document}
\begin{questions}

\question Find all $t$, $0\leq t\leq 2\pi:$
    \begin{multicols}{4}
        \begin{parts}
            \part $\sin t=\dfrac{1}{2}$
                \vspace{.5in}
            \part $\cos t=-\dfrac{1}{2}$
                \vspace{.5in}
            \part $\tan t=\sqrt{3}$
                \vspace{.5in}
            \part $\sec t=$ undefined
                \vspace{.5in}
            \part $\cos t =\sqrt{3}$
                \vspace{.5in}
            \part $\sin t=\cos t$
                \vspace{.5in}
            \part $\tan t=\cot t$
                \vspace{.5in}
            \part $\sec t=\dfrac{1}{10}$
                \vspace{.5in}
        \end{parts}
    \end{multicols}
\end{questions}

\end{document}

2 Answers 2

1

For this type of objects I'd use tasks.

\documentclass[12pt]{exam}
\usepackage[utf8]{inputenc}
\usepackage[margin=.5in]{geometry}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tasks}


\begin{document}
\begin{questions}

\question Find all $t$, $0\leq t\leq 2\pi$:
  \begin{tasks}[label=(\alph*),label-width=2em](4)
    \task $\sin t=\dfrac{1}{2}$
    \task $\cos t=-\dfrac{1}{2}$
    \task $\tan t=\sqrt{3}$
    \task $\sec t=$ undefined
    \task $\cos t =\sqrt{3}$
    \task $\sin t=\cos t$
    \task $\tan t=\cot t$
    \task $\sec t=\dfrac{1}{10}$
  \end{tasks}
\end{questions}

\end{document}

The alignment is “horizontal”, rather than vertical, but that's how people read.

enter image description here

0

I agree with egreg's answer, in that a horizontal list is better. But if you want to know a little more about how to manipulate multicols the issue is that it reads all of its contents in, and then tries to figure out how to break it into "chunks", and then balance the vertical space after each chunk. As a result, spacing at the bottom of columns is manipulated and some space commands don't work as expected (even aside from that, \vspace* probably would be better than \vspace). In this case, it's the fraction "1/2" that is throwing off the spacing. Here are four alternative approaches.

\documentclass[12pt]{exam}
\usepackage[utf8]{inputenc}
\usepackage[margin=.5in]{geometry}
\usepackage{amsmath}
\usepackage{multicol}


\begin{document}
\begin{questions}
\question Find all $t$, $0\leq t\leq 2\pi:$
    \begin{multicols}{4}
        \begin{parts}
            \part $\sin t=\dfrac{1}{2}$
                \vspace{.5in}
            \part $\cos t=-\raisebox{0in}[0in][0in]{$\dfrac{1}{2}$}$
                \vspace{.5in}
            \part $\tan t=\sqrt{3}$
                \vspace{.5in}
            \part $\sec t=$ undefined
                \vspace{.5in}
            \part $\cos t =\sqrt{3}$
                \vspace{.5in}
            \part $\sin t=\cos t$
                \vspace{.5in}
            \part $\tan t=\cot t$
                \vspace{.5in}
            \part $\sec t=\dfrac{1}{10}$
                \vspace{.5in}
        \end{parts}
    \end{multicols}
\hrule

\question Find all $t$, $0\leq t\leq 2\pi:$
    \begin{multicols}{4}
        \begin{parts}
            \part $\sin t=\dfrac{1}{2}$
                \vspace*{.5in}
            \part $\cos t=-\dfrac{1}{2}$
                \vspace*{.5in}
            \part $\tan t=\sqrt{3}$
                \vspace*{.5in}
            \part $\sec t=$ undefined
                \vspace*{.5in}
            \part $\cos t =\sqrt{3}$
                \vspace*{.5in}
            \part $\sin t=\cos t$
                \vspace*{.5in}
            \part $\tan t=\cot t$
                \vspace*{.5in}
            \part $\sec t=\dfrac{1}{10}$
                \vspace*{.5in}
        \end{parts}
    \end{multicols}
\hrule

\question Find all $t$, $0\leq t\leq 2\pi:$
    \begin{multicols}{4}
        \begin{parts}
          \itemsep=0.5in
            \part $\sin t=\dfrac{1}{2}$
            \part $\cos t=-\dfrac{1}{2}$
            \part $\tan t=\sqrt{3}$
            \part $\sec t=$ undefined
            \part $\cos t =\sqrt{3}$
            \part $\sin t=\cos t$
            \part $\tan t=\cot t$
            \part $\sec t=\dfrac{1}{10}$
        \end{parts}
    \end{multicols}
\hrule

\question Find all $t$, $0\leq t\leq 2\pi:$
    \begin{multicols}{4}
        \begin{parts}
            \part $\sin t=\dfrac{1}{2}$
            \vspace{0.5in}
            \part $\cos t=-\dfrac{1}{2}$
            \columnbreak
            \part $\tan t=\sqrt{3}$
            \vspace{0.5in}
            \part $\sec t=$ undefined
            \columnbreak
            \part $\cos t =\sqrt{3}$
            \vspace{0.5in}
            \part $\sin t=\cos t$
            \columnbreak
            \part $\tan t=\cot t$
            \vspace{0.5in}
            \part $\sec t=\dfrac{1}{10}$
        \end{parts}
    \end{multicols}
\hrule
\end{questions}

\end{document}

and here's the result enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .