Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the multicol package with the exam class to create 2 sub-columns within a multicols environment for checkbox answers when the answers are short and one word. There is a significant amount of whitespace between answers in the sub-columns, however, and \setlength\columnsep{Xpt} doesn't seem to bring them closer together.

In the example below, the space between the two columns in the second question needs to be compacted:

\documentclass[10pt]{exam}
\usepackage{multicol}
\setlength\columnsep{40pt}
\begin{document}
\begin{multicols}{2}[\section{My Form}]
\begin{questions}
\question Is this a question\hfill
\mbox{
    \begin{oneparcheckboxes}
        \choice Yes
        \choice No
    \end{oneparcheckboxes}
}
\question These columns are too far apart
\begin{multicols}{2}
    \begin{checkboxes}
        \choice Apple
        \choice Banana
        \choice Cucumber
        \choice Eggplant
        \choice Fruit
        \choice Grapes
    \end{checkboxes}
\end{multicols}
\question Comments:\ \hrulefill
\end{questions}
\end{multicols}
\end{document}
share|improve this question
    
Your MWE is missing packages. –  Peter Grill Dec 1 '11 at 16:30
    
What package(s) is it missing? As far as I know, everything there is supplied by the multicol package or exam class. –  Scribblemacher Dec 1 '11 at 16:33
    
Yes, but you had forgotten to include multicol, I added that for you. –  Torbjørn T. Dec 1 '11 at 16:34

1 Answer 1

up vote 3 down vote accepted

But changing columnsep reduces the spacing (perhaps I am misunderstanding the problem?):

\documentclass[10pt]{exam}
\usepackage{multicol}
\setlength\columnsep{40pt}
\begin{document}

\begin{multicols}{2}[\section{My Form}]

\begin{questions}
\question Is this a question\hfill
\mbox{
    \begin{oneparcheckboxes}
        \choice Yes
        \choice No
    \end{oneparcheckboxes}
}
\question These columns are closer now
\setlength\columnsep{-1cm}
\begin{multicols}{2}
    \begin{checkboxes}
        \choice Apple
        \choice Banana
        \choice Cucumber
        \choice Eggplant
        \choice Fruit
        \choice Grapes
    \end{checkboxes}
\end{multicols}
\question Comments:\ \hrulefill
\end{questions}
\end{multicols}
\end{document}

enter image description here

share|improve this answer
    
That worked. It was the negative value that seemed to make the difference. 0 or a positive value less than my original columnsep seemed to have little effect. –  Scribblemacher Dec 1 '11 at 16:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.