Forums » Using AMC (english) »
Answer Sheet Options On Two Lines
Added by Devin Casenhiser about 11 years ago
On my answer sheet, I have the options printed in two columns to save room. Some of my questions, however, have more answers than will fit on a single line. They therefore wrap around to the next line. This causes two formatting issues that I'm not sure how to resolve:
1) I've used a hanging indent to try to line up the second line with the first when it wraps. This works for lines with single digit numbers, but not for lines with double digit numbers. Does anyone know how to fix this? Here is the command I'm currently using:
\def\AMCformQuestion#1{\vspace{AMCformVSpace}\par\hangindent=3.5em {\sc #1}}
2) More troublesome is the fact that the boxes and their labels are split in two lines such that the box for choice "I" (for example" is on line one of the answer, but the label "I" is on the second line. Any suggestions for fixing this? Can I perhaps use something like \AMCBoxedAnswers on the answersheet?
Thanks much!
Cheers!
Devin
ScreenShot.png - Screen Shot of Answer Sheet Formatting Problem (100 kB)
Replies (5)
RE: Answer Sheet Options On Two Lines - Added by Alexis Bienvenüe about 11 years ago
- Perhaps something like that (including the question number in a fixed-size box)?
\def\AMCformQuestion#1{\vspace{\AMCformVSpace}\par\hangindent=4em\hbox to 4em{\sc #1}}
- This is a bug, I think this should never happend. You can correct it with the following redefinition of
AMCformBox
(just after thebegin{document}
):\makeatletter \renewcommand\AMCformBox[4]{% \ifAMC@outside@box% letter to be written outside the box \AMC@boxedchar{}{#3}{#4}{#2}\nobreak\hspace{.1em}{\textbf{#1}}% \else% \AMC@boxedchar{#1}{#3}{#4}{#2}% \fi% } \makeatother
(not tested - post your source file so that we can test)
RE: Answer Sheet Options On Two Lines - Added by Devin Casenhiser about 11 years ago
Thanks Alexis!
The fix in (1) solves both problems, although it does allow the second line to break across columns. Any way to prevent that as well?
NOTE: The code above has a typo: there should be a \ before AMCformVSpace as in:
\def\AMCformQuestion#1{\vspace{\AMCformVSpace}\par\hangindent=4em\hbox to 4em{\sc #1}}
As for (2): This does indeed solve the problem. The boxes stay with the letters!
Source file attached.
Cheers!
Devin
TwoLineAnswerSheet.tex (8.6 kB)
RE: Answer Sheet Options On Two Lines - Added by Alexis Bienvenüe about 11 years ago
NOTE: The code above has a typo
Corrected, thanks.
it does allow the second line to break across columns
You can tell LaTeX not to break paragraphs with \widowpenalties
(see http://tex.stackexchange.com/questions/21983/how-to-avoid-page-breaks-inside-paragraphs):
\begin{multicols}{2} \widowpenalties 1 10000 \AMCform \end{multicols}
Testing with your source file, it appears that the following
AMCformQuestion
is slightly better:\def\AMCformQuestion#1{\vspace{\AMCformVSpace}\par\noindent\hangindent=2.5em\hbox to 1.8em{\hfill #1:}}
RE: Answer Sheet Options On Two Lines - Added by Alexis Bienvenüe about 11 years ago
Looking at the source you provided, it seems like a waste to draw all the boxes on the question, as they are only useful on the answer sheet.
From revision r1463, you can use \AMCBoxOnly
:
\begin{question}{BrainSection1} Which letter refers to the insula? \AMCBoxOnly{help=(insula),ordered=true}{ \wrongchoice[a]{} \wrongchoice[b]{} \wrongchoice[c]{} \wrongchoice[d]{} \wrongchoice[e]{} \wrongchoice[f]{} \wrongchoice[g]{} \wrongchoice[h]{} \wrongchoice[i]{} \wrongchoice[j]{} \wrongchoice[k]{} \wrongchoice[l]{} \wrongchoice[m]{} \correctchoice[n]{} \wrongchoice[o]{} \wrongchoice[p]{} \wrongchoice[q]{} } \end{question}
The
help
option helps the student to make the correspondence between questions and question numbers, but also helps them to cheat: use it or not as you prefer.RE: Answer Sheet Options On Two Lines - Added by Devin Casenhiser about 11 years ago
Awesome! The AMCBoxOnly command is a great space-saver!
Thanks!
Updated source file attached.
Cheers!
Devin
TwoLineAnswerSheet.tex (4.7 kB)
(1-5/5)