Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
2  
Welcome to TeX.sx! What have you tried, what didn’t work? –  doncherry Apr 6 '13 at 19:02
1  
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

3 Answers 3

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

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{multicol}
\usepackage{tasks}[2013/04/07]

% renew the {tasks} environment to use bold labels
% and use two columns as default settings:
\RenewTasks[counter-format= tsk.,label-format=\bfseries]{tasks}(2)

\begin{document}

\begin{multicols}{2}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr
\begin{tasks}
 \task foo
 \task bar
 \task baz
 \task foobar
 \task foo
 \task bar
 \task baz
 \task foobar
\end{tasks}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr
\begin{tasks}
 \task foo
 \task bar
 \task baz
 \task foobar
 \task foo
 \task bar
 \task baz
 \task foobar
\end{tasks}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr
\begin{tasks}
 \task foo
 \task bar
 \task baz
 \task foobar
 \task foo
 \task bar
 \task baz
 \task foobar
\end{tasks}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr
\begin{tasks}
 \task foo
 \task bar
 \task baz
 \task foobar
 \task foo
 \task bar
 \task baz
 \task foobar
\end{tasks}
\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.

enter image description here

\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}

% use tasks v0.10 2014/07/20:
\usepackage{tasks}[2014/07/20]

% declare custom tasks instance that has no stretchable space between
% rows of items:
\DeclareInstance{tasks}{custom}{default}{
  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:
\RenewTasks[resume,style=custom,label-align=right]{tasks}(2)

\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)$
\begin{tasks}
 \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}
\end{tasks}

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$.
\begin{tasks}
 \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}
\end{tasks}

Find the derivatives of the functions in Exercises \ref{eq:st3}--\ref{eq:end3}:
\begin{tasks}
 \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{tasks}
\end{multicols}

\end{document}
share|improve this answer
    
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. –  cgnieder Apr 6 '13 at 19:38
1  
@Sigur also the items have some stretchable space after them (1ex plus 1ex minus 1ex) but that could be changed... –  cgnieder 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
1  
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{%
\addtostream{qstream}{\noexpand\expandafter\noexpand\def\noexpand\csname[#1]\noexpand\endcsname{\the\n}}
}
\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}

enter image description here

share|improve this answer

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}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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