8

How can I get lists arranged in two columns throughout the document. I would like to make changes only in preamble and not in the list.

I am thinking of this structure

. First item . second item

. third item

Here is MWE.

\documentclass{article}
\usepackage{multicol}
\begin{document}
    \begin{multicols}{2}
        \begin{itemize}
\item 1
\item 2
\item 3
\item 4
\item 5
\item 6
\item 7
\item 8
\item 9
\item 10
\item 11
\item 12
\item 13
\end{itemize}
    \end{multicols}
\end{document}
  • 1
    Kindly note the horizontal sequence 1-2 Next line-3 and 4. Also changes should be in the preamble so that I can simply use \begin{itemize} \item \end{itemize} in main text. Can this be done using wikienvironment ? – Vaibhav Jan 23 '14 at 10:55
  • Just to be sure, would you accept a \newcommand approach? Like \newcommand{\bmyitemize}{\begin{multicols}{2}\begin{itemize}} and \newcommand{\emyitemize}{\end{itemize}\end{multicols}} ? Or do you want to use \begin{itemize} and end throughout? – pkofod Jan 23 '14 at 11:16
  • would prefer \begin{itemize} \end{itemize} – Vaibhav Jan 24 '14 at 8:52
10

Put these lines in your preamble:

\usepackage{etoolbox}
\AtBeginEnvironment{itemize}{\begin{multicols}{2}}    
\AtEndEnvironment{itemize}{\end{multicols}}            

This will change all itemize environments in to two columns (assuming that is what you want).

\documentclass{article}
\usepackage{etoolbox}
\AtBeginEnvironment{itemize}{\begin{multicols}{2}}    %%% this line
\AtEndEnvironment{itemize}{\end{multicols}}            %%% and this one
\usepackage{multicol}
\begin{document}        
\begin{itemize}
\item 1
\item 2
\item 3
\item 4
\item 5
\item 6
\item 7
\item 8
\item 9
\item 10
\item 11
\item 12
\item 13
\end{itemize}
\end{document}

enter image description here

As egreg notes, you can use a newenvironment so that normal itemize is still available:

\documentclass{article}
\usepackage{multicol}
\newenvironment{myitemize}{%
\begin{itemize}
\begin{multicols}{2}
}{%
\end{multicols}
\end{itemize}
}
\begin{document}
\begin{myitemize}
\item 1
\item 2
\item 3
\item 4
\item 5
\item 6
\item 7
\item 8
\item 9
\item 10
\item 11
\item 12
\item 13
\end{myitemize}
Some other text.
\begin{itemize}
\item 1
\item 2
\item 3
\item 4
\item 5
\item 6
\item 7
\item 8
\item 9
\item 10
\item 11
\item 12
\item 13
\end{itemize}
\end{document}

enter image description here

With enumitem too, you can define a new environment:

\documentclass{article}
\usepackage{enumitem}
\usepackage{multicol}
\newlist{myitemize}{itemize}{1}
\setlist[myitemize]{label=\textbullet,before=\raggedcolumns\begin{multicols}{2},
after=\end{multicols}
}
\begin{document}
\begin{myitemize}
\item 1
\item 2
\item 3
\item 4
\item 5
\item 6
\item 7
\item 8
\item 9
\item 10
\item 11
\item 12
\item 13
\end{myitemize}
\end{document}
  • I'd create a new environment, rather than changing the default itemize that would be lost. – egreg Jan 23 '14 at 13:30
6

Just in case you want to try the multienum package.

MWE

\documentclass{article}
\usepackage{multienum}

\newenvironment{multiitem}{%
  \multienumerate\renewcommand{\labelname}{\textbullet}%
}{%
  \endmultienumerate%
}

\begin{document}

\begin{multiitem}
\mitemxx{1}{2}
\mitemxx{3}{4}
\mitemxx{5}{6}
\mitemxx{7}{8}
\mitemxx{9}{10}
\end{multiitem}

\end{document} 

Output

enter image description here

3

I am thinking of this structure

. First item . second item

. third item

You might like the tasks package (part of the exsheets bundle). It provides a list-like structure similar to the one you outlined. (They're not really lists in the LaTeX sense of {list} or {trivlist}, see the manual for details.)

\documentclass{article}
\usepackage[more]{tasks}

% new list-like environment
% \NewTasks[options]{name}[separator](default number of columns)
\NewTasks[style=itemize]{myitemize}[\item](2)

\usepackage{kantlipsum}% insert text fragments
\begin{document}

\kant[1]

\begin{myitemize}
  \item one
  \item two
  \item three
  \item four
  \item five
  \item six
  \item seven
  \item eight
  \item nine
\end{myitemize}

\kant[2]

\end{document}

enter image description here

  • Nice, didn't try this package of yours before, +1. – karlkoeller Jan 24 '14 at 9:03
  • @karlkoeller I always a bit reluctant of recommending this package as it has some drawbacks. – clemens Jan 24 '14 at 9:34

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.