# How can I make two columns in two columns

How can I make two columns in two columns same as in the picture?

• Welcome to TeX.sx! What have you tried, what didn’t work? – doncherry Apr 6 '13 at 19:02
• I believe that it is better to learn how to produce enumerated list in two columns. Then you simply use it on your two column document. – Sigur Apr 6 '13 at 19:02
• Try the multenum package. – Yiannis Lazarides Apr 6 '13 at 19:03

Maybe you can give the tasks package (used to be part of the exsheets bundle) a try:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{multicol}

% renew the {tasks} environment to use bold labels
% and use two columns as default settings:

\begin{document}

\begin{multicols}{2}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr

Lorem ipsum dolor sit amet, consetetur sadipscing elitr

Lorem ipsum dolor sit amet, consetetur sadipscing elitr

Lorem ipsum dolor sit amet, consetetur sadipscing elitr
\end{multicols}

\end{document}


Here's an example of how the appearance could be further customized (thanks to g.kov for doing the typing!). Edit: the updated version needs v0.10 (2014/07/20) for the \task! syntax.

The items that should span a complete line (items 31. and 32. in the picture below) can be achieved by one of the following methods:

• \task! – this will force the specific item to start in a new line using the whole line.
• \task* – this will force the specific item to use the remaining space of the line. In this case this means it uses the whole line if it happens to be an item in the first column.
• \task*(<num>) – this means the item will span <num> columns provided there are enough columns left in the current line. Otherwise it will use as much columns as it can.

\documentclass{article}
\usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{multicol}
\usepackage{amsmath}

% declare custom tasks instance that has no stretchable space between
% rows of items:
counter-format  = tsk. ,
label-format    = \bfseries ,
label-width     = 1.5em ,
label-offset    = .3333em ,
after-item-skip = 0pt
}

% renew {tasks} environment to use the new instance and resume the
% item counting:

\begin{document}

\begin{multicols}{2}
Derivative calculations\par
In Exercises \ref{tsk:st1}--\ref{tsk:end1}, given $y=f(u)$ and $u=g(x)$, find
$dy/dx=f^\prime(g(x))g^\prime(x)$
\task $y=6u-9,\ u=1/2 x^4$ \label{tsk:st1}
\task $y=2u^3,\ u=8x-1$
\task $y=\sin u,\ u=3x+1$
\task $y=\cos u,\ u=-x/3$
\task $y=\cos u,\ u=\sin x$
\task $y=\sin u,\ u=x-\cos x$
\task $y = \tan u,\ u=10x-5$
\task $y=-\sec u,\ u=x^2+7x$ \label{tsk:end1}

In Exersises  \ref{tsk:st2}--\ref{tsk:end2}, write the function in the form
$y=f(u)$ and $u=g(x)$. Then find $dy/dx$ as a function of $x$.
\task $y=\left( 2x+1 \right)^5$ \label{tsk:st2}
\task $y=\left( 4-3x \right)^9$
\task $y=\left( 1-\dfrac{x}7 \right)^{-7}$
\task $y=\left( \dfrac{x}2 -1 \right)^{-10}$
\task $y=\left( \dfrac{x^2}8 +x -\dfrac1{x} \right)^{4}$
\task $y=\sqrt{2x^2-4x+6}$
\task $y=\sec(\tan x)$
\task $y=\cot\left( \pi -\dfrac1{x} \right)$
\task $y=\sin^3 x$
\task $y=5\cos^{-4} x$
\task $y=e^{-5x}$
\task $y=e^{2x/3}$
\task $y=e^{5-7x}$
\task $y=e^{4\sqrt{x}-x^2}$ \label{tsk:end2}

Find the derivatives of the functions in Exercises \ref{eq:st3}--\ref{eq:end3}:
\task $p=\sqrt{3-t}$ \label{eq:st3}
\task $q=\sqrt[3]{2r-r^2}$
\task $s=\dfrac{4}{3\pi}\sin{3t}+\dfrac{4}{5\pi}\cos{5t}$
\task $s=\sin\dfrac{3\pi t}{2}+\cos\dfrac{3\pi t}{2}$
\task $r=\left( \csc\theta +\cot\theta \right)^{-1}$
\task $r=6\left( \sec\theta -\tan\theta \right)^{3/2}$
\task $y=x^2\sin4x+x\cos^{-2}x$
\task $y=\dfrac1{x}\sin^{-5}x-\dfrac{x}{3}\cos^{3}x$
\task! $y=\dfrac1{21}(3x-2)^7+\left( 4-\dfrac1{2x^2} \right)^{-1}$
\task! $y=(5-2x)^{-3}+\dfrac1{8}\left( \dfrac2{x}+1 \right)^{4}$
\task $y=(4x+3)^4(x+1)^{-3}$
\task $y=(2x-5)^{-1}(x^2-5x)^{6}$
\task $y=x e^{-x}+e^{3x}$
\task $y=(1+2x)e^{-2x}$
\task $y=(x^2-2x+2)e^{5x/2}$
\task $y=(9x^2-6x+2)e^{x^3}$
\task $h(x)=x\tan\left( 2\sqrt{x} \right)+7$
\task $k(x)=x^2\sec\left( \dfrac1x \right)$ \label{eq:end3}
\end{multicols}

\end{document}

• Nice. But why the columns don't have the same horizontal alignment since they have the same content? – Sigur Apr 6 '13 at 19:35
• @Sigur I'm not exactly sure. I guess it's due to how multicol balances the columns. If you add \vfill before \end{multicols} they will be aligned. – clemens Apr 6 '13 at 19:38
• @Sigur also the items have some stretchable space after them (1ex plus 1ex minus 1ex) but that could be changed... – clemens Apr 6 '13 at 19:44
• i believe the uneven page bottom is caused by the first column being vertically justified, and the second ending with a little space left over. try inserting \raggedbottom -- that should even things up in this case. – barbara beeton Apr 6 '13 at 21:28
• Compare the output with the original 31. and 32.: the point is, when the expression is wider than the half of the column width, it fills the line (no splitting here). – g.kov Apr 7 '13 at 10:07

A somewhat naive solution.

\documentclass{report}
\usepackage{multicol}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{lmodern}
\usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm]{geometry}

\usepackage{newfile}
\newoutputstream{qstream}
\IfFileExists{\jobname.qst}{\input{\jobname.qst}}{}
%
\AtBeginDocument{\openoutputfile{\jobname.qst}{qstream}}
\AtEndDocument{\closeoutputstream{qstream}}
%
\newcount\n
\newdimen\eqboxwd
\eqboxwd=0.38\hsize
\n=0
\newbox\eqbox
\def\qtem$#1${%
\advance\n1\leavevmode\setbox\eqbox=\hbox{\hbox to2em{\hfill$\mathbf{\the\n.}$}\ $#1$\hss}%
\ifnum\wd\eqbox<\eqboxwd \setbox\eqbox=\hbox to\eqboxwd{\unhbox\eqbox\hss}\copy\eqbox%
\else\copy\eqbox\\ \fi%
}

\def\qlab#1{%
}
\def\qref#1{\ifcsname[#1]\endcsname\csname[#1]\endcsname\else?\fi}

\begin{document}

\begin{multicols}{2}
Derivative calculations\par
In Exercises
%1--8,
\qref{eq:st1}--\qref{eq:end1},
given $y=f(u)$ and $u=g(x)$,
find $dy/dx=f^\prime(g(x))g^\prime(x)$.

\noindent%
\qtem $y=6u-9,\ u=1/2 x^4$ \qlab{eq:st1}%
\qtem $y=2u^3,\ u=8x-1$
\qtem $y=\sin u,\ u=3x+1$
\qtem $y=\cos u,\ u=-x/3$
\qtem $y=\cos u,\ u=\sin x$
\qtem $y=\sin u,\ u=x-\cos x$
\qtem $y = \tan u,\ u=10x-5$
\qtem $y=-\sec u,\ u=x^2+7x$ \qlab{eq:end1}%

In Exersises
%9--22,
\qref{eq:st2}--\qref{eq:end2},
write the function in the form $y=f(u)$
and $u=g(x)$. Then find $dy/dx$ as a function of $x$.

\noindent%
\qtem $y=\left( 2x+1 \right)^5$ \qlab{eq:st2}%
\qtem $y=\left( 4-3x \right)^9$
\qtem $y=\left( 1-\dfrac{x}7 \right)^{-7}$
\qtem $y=\left( \dfrac{x}2 -1 \right)^{-10}$
\qtem $y=\left( \dfrac{x^2}8 +x -\dfrac1{x} \right)^{4}$
\qtem $y=\sqrt{2x^2-4x+6}$
\qtem $y=\sec(\tan x)$
\qtem $y=\cot\left( \pi -\dfrac1{x} \right)$
\qtem $y=\sin^3 x$
\qtem $y=5\cos^{-4} x$
\qtem $y=e^{-5x}$
\qtem $y=e^{2x/3}$
\qtem $y=e^{5-7x}$
\qtem $y=e^{4\sqrt{x}-x^2}$ \qlab{eq:end2}%

Find the derivatives of the functions in Exercises
%23--50
\qref{eq:st3}--\qref{eq:end3}.

\noindent%
\qtem $p=\sqrt{3-t}$ \qlab{eq:st3}%
\qtem $q=\sqrt[3]{2r-r^2}$
\qtem $s=\dfrac{4}{3\pi}\sin{3t}+\dfrac{4}{5\pi}\cos{5t}$
\qtem $s=\sin\dfrac{3\pi t}{2}+\cos\dfrac{3\pi t}{2}$
\qtem $r=\left( \csc\theta +\cot\theta \right)^{-1}$
\qtem $r=6\left( \sec\theta -\tan\theta \right)^{3/2}$
\qtem $y=x^2\sin4x+x\cos^{-2}x$
\qtem $y=\dfrac1{x}\sin^{-5}x-\dfrac{x}{3}\cos^{3}x$
\qtem $y=\dfrac1{21}(3x-2)^7+\left( 4-\dfrac1{2x^2} \right)^{-1}$
\qtem $y=(5-2x)^{-3}+\dfrac1{8}\left( \dfrac2{x}+1 \right)^{4}$
\qtem $y=(4x+3)^4(x+1)^{-3}$
\qtem $y=(2x-5)^{-1}(x^2-5x)^{6}$
\qtem $y=x e^{-x}+e^{3x}$
\qtem $y=(1+2x)e^{-2x}$
\qtem $y=(x^2-2x+2)e^{5x/2}$
\qtem $y=(9x^2-6x+2)e^{x^3}$
\qtem $h(x)=x\tan\left( 2\sqrt{x} \right)+7$
\qtem $k(x)=x^2\sec\left( \dfrac1x \right)$ \qlab{eq:end3}%
\end{multicols}

\end{document}


Here is a simple solution:

\documentclass[twocolumn]{report}
\usepackage{multicol}

\begin{document}
foo\hrulefill foo
\begin{multicols}{2}
\begin{enumerate}
\item foo\hrulefill foo

\item foo\hrulefill foo

\item foo\hrulefill foo

\item foo\hrulefill foo
\end{enumerate}
\end{multicols}
foo\hrulefill foo

\vfill

foo\hrulefill foo

\end{document}