1

I'm trying to write a group of questions, like they look like in a textbook. Using the multicol package, I have been able to write it, but instead of doing

a  e

b  f

c

d

I want

a b c d 

e f

My MWE:

\documentclass[addpoints ,class=exam, crop=false]{exam}
\usepackage[colorlinks=true]{hyperref}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{import}
\usepackage{mathtools}


\usepackage{multicol}
% Usage: \Problem{n}{operation}{m}
\newcommand\Problem[3]{$\begin{array}[t]{r}#1\\#2#3\\\hline\quad\end{array}$}


\begin{document}
\begin{questions}

\question[30] Write as a power of 2
\droppoints

 \begin{multicols}{5}
 \begin{parts}
 \part 8
 \part 32
 \part $8^2$
 \part $4^3$
 \part $16^{-4}$ 
 \part $\frac{1}{2}$
 \part 32$^{\frac{2}{3}}$ 
 \part $64^{\frac{3}{2}}$
 \part 4$^x$     
 \part 8$^{2x}$  
 \part 128$^{-4x}$   
 \part 4$^{\frac{2x}{3}}$ 
 \part 16$^{-\frac{4}{3}x}$ 
 \part 16$^{x+1}$ 
 \part 4$^{2x-3}$ 
 \part 64$^{2-5x}$ 
 \part $8^{3x-1}$        
 \part 32$^{\frac{1}{x}}$ 
 \part 4$^{\sqrt{x}}$ 
 \part $\left(\frac{1}{4}\right)^{2x-6}$
 \end{parts}
 \end{multicols}

\end{questions}
\end{document}

what the code makes

  • 1
    I suggest to try the tasks package, which does exactly the numbering you are looking for, and see if it is compatible with the exam class for your needs. (Citation: "The reason for the tasks environment is an unwritten agreement in German maths textbooks (especially in (junior) high school textbooks) to organize exercises in columns counting horizontally rather than vertically.") – benjamin Jul 10 at 11:37
2

As benjamin suggested out, the tasks package is useful but I did not able to use it under the exam part environment.

   \documentclass[addpoints ,class=exam, crop=false]{exam}
\usepackage[colorlinks=true]{hyperref}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{import}
\usepackage{mathtools}
\usepackage{tasks}

\usepackage{multicol}
% Usage: \Problem{n}{operation}{m}
\newcommand\Problem[3]{$\begin{array}[t]{r}#1\\#2#3\\\hline\quad\end{array}$}


\begin{document}
\begin{questions}

\question[30] Write as a power of 2
\droppoints

 \begin{tasks}[counter-format=(tsk[a]),label-width=4ex](5)
\task  8
\task  32
\task  $8^2$
\task  $4^3$
\task  $16^{-4}$ 
\task  $\frac{1}{2}$
\task  32$^{\frac{2}{3}}$ 
\task  $64^{\frac{3}{2}}$
\task  4$^x$     
\task  8$^{2x}$  
\task  128$^{-4x}$   
\task  4$^{\frac{2x}{3}}$ 
\task  16$^{-\frac{4}{3}x}$ 
\task  16$^{x+1}$ 
\task  4$^{2x-3}$ 
\task  64$^{2-5x}$ 
\task  $8^{3x-1}$        
\task  32$^{\frac{1}{x}}$ 
\task  4$^{\sqrt{x}}$ 
\task  $\left(\frac{1}{4}\right)^{2x-6}$
\end{tasks}
\end{questions}
\end{document}

enter image description here

0

There is probably a better solution, however you could modify how you do your multicol allocation to the below to get the layout you want.

 \begin{parts}
 \begin{multicols}{5}
 \part 8
 \part 32
 \part $8^2$
 \part $4^3$
 \part $16^{-4}$ 
 \end{multicols}
 \begin{multicols}{5}
 \part $\frac{1}{2}$
 \part 32$^{\frac{2}{3}}$ 
 \part $64^{\frac{3}{2}}$
 \part 4$^x$     
 \part 8$^{2x}$  
 \end{multicols}
 \begin{multicols}{5}
 \part 128$^{-4x}$   
 \part 4$^{\frac{2x}{3}}$ 
 \part 16$^{-\frac{4}{3}x}$ 
 \part 16$^{x+1}$ 
 \part 4$^{2x-3}$ 
 \end{multicols}
 \begin{multicols}{5}
 \part 64$^{2-5x}$ 
 \part $8^{3x-1}$        
 \part 32$^{\frac{1}{x}}$ 
 \part 4$^{\sqrt{x}}$ 
 \part $\left(\frac{1}{4}\right)^{2x-6}$
 \end{multicols}
 \end{parts}
0

Here is a variant using paracol. Note that \part (\item) doesn't have an argument; it simply adds a label and starts a new paragraph. \mypart however does.

The \rule in \mypart increases the spacing in an attempt to align baselines. It works better than increasing \itemsep.

\documentclass[addpoints ,class=exam, crop=false]{exam}
\usepackage[colorlinks=true]{hyperref}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{import}
\usepackage{mathtools}

\usepackage{paracol}
\globalcounter{numparts}
\globalcounter{partno}
\newcommand\mypart[1]{\part \rule{0pt}{1.5\ht\strutbox}#1\switchcolumn
  \ifnum\thecolumn=0\relax \switchcolumn[0]*\fi}% aligns tops, but not baselines

% Usage: \Problem{n}{operation}{m}
\newcommand\Problem[3]{$\begin{array}[t]{r}#1\\#2#3\\\hline\quad\end{array}$}

\begin{document}
\begin{questions}

\question[30] Write as a power of 2
\droppoints

\begin{paracol}{5}
 \begin{parts}
 \mypart{8}
 \mypart{32}
 \mypart{$8^2$}
 \mypart{$4^3$}
 \mypart{$16^{-4}$}
 \mypart{$\frac{1}{2}$}
 \mypart{32$^{\frac{2}{3}}$}
 \mypart{$64^{\frac{3}{2}}$}
 \mypart{4$^x$}
 \mypart{8$^{2x}$}
 \mypart{128$^{-4x}$}
 \mypart{4$^{\frac{2x}{3}}$}
 \mypart{16$^{-\frac{4}{3}x}$}
 \mypart{16$^{x+1}$}
 \mypart{4$^{2x-3}$}
 \mypart{64$^{2-5x}$}
 \mypart{$8^{3x-1}$}   
 \mypart{32$^{\frac{1}{x}}$}
 \mypart{4$^{\sqrt{x}}$}
 \mypart{$\left(\frac{1}{4}\right)^{2x-6}$}
 \end{parts}
\end{paracol}

\end{questions}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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