Multicols environment doesn't work for choicescustom (Bug #342)


Added by David Dixon over 10 years ago. Updated over 4 years ago.


Status:Closed Start date:03/16/2015
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:-
Target version:-

Description

I use choicescustom for quiz slides because choices doesn't provide enough space between answers. If I try to get 2 columns using multicols environment, it works with choices, but not choicescustom.


Ch2_Quiz_TestB.tex (5.1 kB) David Dixon, 11/05/2017 10:26 am


History

Updated by Alexis Bienvenüe over 7 years ago

Maybe I'm too late…
Please provide a minimal complete source file that shows your problem.

  • Status changed from New to Feedback

Updated by David Dixon over 7 years ago

%% LyX 2.2.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,english]{article}
\usepackage[scaled=0.92]{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[landscape,letterpaper]{geometry}
\geometry{verbose}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[authoryear]{natbib}

\makeatletter
\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[insidebox,separateanswersheet,automarks]{automultiplechoice}
\usepackage{multicol}

%%%
%%% Remove paragraph indentation
%%%
\parindent=0pt
\setlength{\parskip}{0.8\baselineskip}
\raggedright

%%%
%%% Set up AMC environment
%%%
\AMCtext{draft}{}
\AMCtext{message}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% begin document
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\makeatother

\usepackage{babel}
\begin{document}
\newcommand{\course}{303}
\newcommand{\coursechap}{2}

\element{chapter2}{
\begin{question}{Question 2}
Suppose that Jones builds a new house, then she sells it to Smith,
and then Smith sells it to Williams. The total net investment from
these transactions is: 
\begin{multicols}{2}
\begin{choicescustom}
\wrongchoice{zero. }
\correctchoice{1 house. }
\wrongchoice{2 houses. }
\wrongchoice{3 houses.}
\end{choicescustom}
\end{multicols}
\end{question}
}

\element{chapter2}{
\begin{question}{Question 2}
Suppose that Jones builds a new house, then she sells it to Smith,
and then Smith sells it to Williams. The total net investment from
these transactions is: 
\begin{multicols}{2}
\begin{choices}
\wrongchoice{zero. }
\correctchoice{1 house. }
\wrongchoice{2 houses. }
\wrongchoice{3 houses.}
\end{choices}
\end{multicols}
\end{question}
}

\title{ECON \course}
\author{Quiz on Chapter \coursechap{} reading}
\maketitle
\onecopy{1}{
  \insertgroup{chapter\coursechap} 
}
\end{document}

Updated by David Dixon over 7 years ago

I do a lot more with it to make the slides look like Beamer, and the code is modular so I can swap in different questions easily. I use AMC because I teach multiple sections of this course and I want the quiz to be different (order of questions, order of answers) for each section. I did my best to trim it down to the bare minimum, but I didn't strip out the LyX stuff.

Updated by Alexis Bienvenüe over 7 years ago

It seems to me that, in the first question, you don't see there is a second column because the 4 answers don't fill the first column.
If you add a paragraph break after each answer for exemple, you will see the second column (add the folowing right after \begin{document}).

\def\AMCanswer#1#2{#1 #2\par}

Updated by David Dixon over 7 years ago

David Dixon wrote:
But that doesn't explain why it makes two columns with choices but not choicescustom. The \par does work pretty cool, however - but I can't seem to adjust any other vertical spacing when I end with \par.

Updated by Alexis Bienvenüe over 7 years ago

But that doesn't explain why it makes two columns with choices but not choicescustom.

I think it does make two columns with choicescustom. But if you provide text that does not fill one line of one column, you don't see the second column.

Please send code as attached files (Click on Files just under the text) instead of pasting it in the text.

Updated by David Dixon over 7 years ago

Updated by David Dixon over 7 years ago

So what I'm inferring is that choices does something like

   \def\AMCanswer#1#2{#1 #2\par} 

so I have to do something like that in choicescustom to get it to make columns. So in that sense, I concede, user error :)

What I was doing was

  \def\AMCanswer#1#2{\par\choicelabel{#1}\hspace{24bp}\choiceanswer{#2}\vspace*{12bp}}

If I put the \par at the end

  \def\AMCanswer#1#2{\choicelabel{#1}\hspace{24bp}\choiceanswer{#2}\vspace*{12bp}\par}

it doesn't help. It only works if I get rid of the \vspace*{12bp}, but I want that space.

Updated by Alexis Bienvenüe over 7 years ago

Maybe you can use (with standard choices environment)

\AMCinterIrep=24bp

to add space between answers.
Also, consider using the plain package option (do avoid interferences with AMC layout), and maybe also the pdfform one (with AMC development version)?

Updated by Alexis Bienvenüe over 4 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF