Forums » Using AMC (english) »
How do I adjust (reduce) the white space between each question (on the subject)?
Added by Jonathan Sleepless over 11 years ago
I love AMC and I even have installed Ubuntu in a Virtual Machine just for this program. But I cannot figure out how to reduce the white space between each question on the subject. This would be very helpful to save space on the actual test sheet.
I am already changing the vspace option in the beginning of the document but this seems to merely change the beginning part of the question as opposed to the white space between the first question and the second question (for example).
\def\AMCbeginQuestion#1#2{\par\noindent{\bf Question #1} #2\hspace*{0.0em}\vspace*{-0.1cm}}
And then it also appears that I can change the distance between the checkboxes using the \AMCinterBrep option with \AMCBoxedAnswers.
I have found these two things but still cannot find a way to decrease the white space between questions. Is there an easy way to do this? I tried to search the forums and documentation for the answer and I apologize if this issue has been addressed already.
For the record, I am using AMC 1.1.0 (SVN:1075) on Lubuntu 12.04 running within VMWare Player.
sleepless
Replies (13)
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Alexis Bienvenüe over 11 years ago
Not perfect at all, but as you can't control the space at the end of the question, perhaps you can add a negative vspace before the beginning of each question. Perhaps this will need some adjustments before the first question, however.
\def\AMCbeginQuestion#1#2{\vspace*{-0.1cm}\par\noindent{\bf Question #1} #2\hspace*{0.0em}}
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Alexis Bienvenüe over 11 years ago
You can also try the attached package (using \usepackage{qvspace}
after \usepackage{automultiplechoice}
, with the qvspace.sty
file in the same directory as the source file), which rewrites the question
environment, so that you can modify the vertical space after the questions, which have the following default values :
\AMCafterQbloc=3ex
when using the box
package option, and
\AMCafterQ=0pt
without the box
option.
If you find this rewrite useful, I will incorporate it to the development version of AMC.
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Jonathan Sleepless over 11 years ago
Wow, I tried the first tip which worked well. Then I tried your .sty sheet which worked amazingly well and will be extremely useful for making streamlined tests. Thank you.
As I was experimenting with this, I noticed that with the box option, my "short answer" type question (using "\AMCOpen") still has more space than the rest of the questions. But, when I take away the box package option, everything behaves great including the \AMCOpen questions; there is no extra white space. To replicate the issue, all that is needed is to remove the box package option from the code below to see that it works fine without the box option. It appears that the box option puts some extra space on this type of question or something. Any ideas on how to get this to work with the box package option? The question type that has extra white space is written like:
\element{general}{ \begin{question}{Yaounde} What is the capital city of Cameroon? \AMCOpen{lineup=true,hspace=0.1mm,boxmargin=0.1ex,Treserved=Cam}{\wrongchoice[N]{N}\scoring{1}\correctchoice[Y]{Y}\scoring{2}} \end{question} }
Complete code is attached.
space.tex (2.9 kB)
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Alexis Bienvenüe over 11 years ago
This should be a little better with this new version of qvspace
...
qvspace.sty - LaTeX package to customize vertical space after questions (883 Bytes)
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Jonathan Sleepless over 11 years ago
Great! That works perfectly.
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Alexis Bienvenüe over 11 years ago
This patch is included in AMC development version since revision r1351, but I changed the names of the dimensions a little for the sake of consistency with other old dimension names: they are \AMCinterIquest
and \AMCinterBquest
instead of \AMCafterQ
and \AMCafterQbloc
.
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Jonathan Sleepless over 11 years ago
As I was experimenting, I found that there is a large inconsistent gap of white space if there is a "choicescustom" question followed by an "\AMCOpen" question. The gap is actually after the "\AMCOpen" question but it only seems to appear if there is a "choicescustom" question before it. I am not sure if this is helpful but I did want to point it out just in case. Then, if the "box" option is removed, it appears that the "choicescustom" questions also appear in a very strange way.
It happens in this instance:
\element{general}{ \begin{question}{id2} \begin{choicescustom}[o] \wrongchoice[T]{} \correctchoice[F]{} \end{choicescustom} This is a True or False question. \end{question} } \element{general}{ \begin{question}{Yaounde} What is the capital city of Cameroon? \AMCOpen{lineup=true,hspace=0.1mm,boxmargin=0.1ex,Treserved=Cam}{\wrongchoice[>]{>}\scoring{1}\correctchoice[<]{<}\scoring{2}} \end{question} }
I have attached the full source code and removed the shuffle option to shows this.
spacing.tex (6.3 kB)
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Alexis Bienvenüe over 11 years ago
I'm not sure this comes from the choicescustom before. Can you try removing the blank line just before the following question
environment (question id3
)?
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Jonathan Sleepless over 11 years ago
Yes that did it...sorry about my oversight.
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Jonathan Sleepless over 11 years ago
I am not planning on using it without the box option...but when I do take the box package option out, it still looks like the choicescustom question type is still noticeably misaligned.
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Alexis Bienvenüe over 11 years ago
Where exactly ?
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Jonathan Sleepless over 11 years ago
With the box user package removed, whenever there is a question after a "choicescustom" question, with the settings I have, this question is written on top of the previous question. Although the other types of questions seem to be behaving properly with my settings. Of course this very well could be something on my end as well but if it is I cannot see it (and there is no problem with the same exact code using the box option and a similar spacing setting (\AMCafterQbloc=1.0ex). I have attached a pdf to show what is happening along with the source tex file (and I am using the latest qvspace.sty file that was previously uploaded).
spacing.pdf - pdf file that shows the overlapping text (71.6 kB)
spacing.tex - Source .tex file (6 kB)
RE: How do I adjust (reduce) the white space between each question (on the subject)? - Added by Jonathan Sleepless over 11 years ago
Thanks to the instructions on the wiki I was able to build AMC from the repository and I now have v.1.1.1315 (svn:1361). I was able to duplicate the same issue using the new \AMCinterIquest option. So I have attached everything from the last post again using the new version and new verbage (not the qvspace.sty).
spacing.pdf - pdf file that shows the overlapping text (71.6 kB)
spacing.tex - Source .tex file (6 kB)
(1-13/13)