Text Formattingmulticol | Several Alignment Problems

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

multicol | Several Alignment Problems

Post by coachbennett1981 »

Good morning,

I have three questions about an exam I am writing.
  1. How can I align the first answer choice up with the first word of the question?
  2. How do I get rid of the line between the answer choices in the first question.
  3. How can I space out the columns in the first answer.
Thank you for you time.

Code: Select all

\documentclass[12pt]{exam}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts} 
\usepackage{multicol}
\usepackage{amsmath}

\begin{document}

\begin{questions}
\setlength{\columnsep}{45pt}
\setlength{\columnseprule}{1pt}
\begin{multicols*}{2}
\fullwidth{\textbf{Read each question. Then write the letter of the correct answer on your paper.}}
	\question What is the solution to \[3x-6=4x+8?\]
		\begin{multicols}{2}
			\begin{choices}
				\choice -2
				\choice 2
				\choice -14
				\choice 14
				\choice -1
			\end{choices}
		\end{multicols} 	
\end{multicols*}
\end{questions}
\end{document}


Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

multicol | Several Alignment Problems

Post by Stefan Kottwitz »

Hi,

since the choices environment is a normal LaTeX list environment, we can change the appearance by modifying list parameters, and the class provides hooks for this.

Try for example:

Code: Select all

\renewcommand{\choiceshook}{%
  \setlength{\itemsep}{0pt}
  \setlength{\leftmargin}{1em}
}
Stefan
LaTeX.org admin
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Re: multicol | Several Alignment Problems

Post by coachbennett1981 »

Thanks dude. Works great
Post Reply