1

Hopefully this is simple: I have a relatively long list where each list item contains very little text. For example:

* a
* b
* c
* d
* e
* f

I wish to format it like so:

* a     * b     * c
* d     * e     * f

What is the best way to do this in latex?

I have seen many questions regarding doing this the other way: Split itemize into multiple columns or https://stackoverflow.com/questions/1398127/breaking-a-list-into-multiple-columns-in-latex. But I can not figure out how to expand my list first left to right then down, instead of first down then left to right.

1
1

Here are two possibilities;: with tasks, as mentioned in @Jhor's comment, and the shortlst package, which is not in TeX Live nor MiKTeX, due to licensing reasons, which you have to download from CTAN and install by yoursel (in a local TeXMF root). I patched the latter package so the environments can take optional arguments via a system of keys, to choose the number of columns (3 by default) and the interlining (1.5 by default).

One difference is that for items with a longer contents, tasks wraps this contents within the column (and you have to ask to let it spread over several columns, via the \task*command), whereas shortlst does that automatically, and I had to define a \paritem command o wrap it within its column (or several, but a fixed number of columns with an optional argument.

If you want to do the same with enumerated lists, ther e are two other packages: tablists and multenum (the latter with a different syntax – it is defined with a tabular environment). There would also be possibilities with the listliketab package.

Example:

\documentclass[12pt]{article}%
\usepackage[utf8]{inputenc}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness}{0.3pt}

\usepackage{tasks}

\usepackage{shortlst,setspace,xkeyval, tasks}%

\makeatletter
\newcounter{ncol}
\define@key{lex}{nc}[3]{\setcounter{ncol}{#1}}%% 3 columns by default
\define@key{lex}{il}[1.5]{\def\@intln{#1}}% interlining![1]
\newenvironment{tabitemise}[1][]{%
\setkeys{lex}{nc,il,#1}
\settowidth{\labelwidth}{\mbox{\textbullet}}
\setlength{\leftmargini}{\dimexpr\labelwidth+\labelsep\relax}%[1][3]
\setlength{\shortitemwidth}{\dimexpr\linewidth/\value{ncol}-\labelwidth-2\labelsep\relax}%
\renewcommand{\labelenumi}{(\alph{enumi})}
\setstretch{\@intln}
\begin{shortitemize}}%
{\end{shortitemize}
 }%
\newcommand\paritem[2][1]{\item \parbox[t]{#1\shortitemwidth}{\setstretch{1}#2\medskip}}%%for a longer item content, 
\makeatother

\begin{document}

\begin{tabitemise}[nc = 3]
\item a
\item b
\item c
\paritem{A somewhat longer contents here}
\item This one has to spread over two columns 
\item d
\item e
\item f
\end{tabitemise}
\bigskip

\begin{tasks}[style=itemize, label-offset=0.em](3)%
\task a
\task b
\task c
\task A somewhat longer contents here
\task* This one has to spread over two columns
\task d 
\task e
\task f
\end{tasks}

\end{document} 

enter image description here

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.