5

The MWE below indicates the problem. The final item, number 6, isn't aligned correctly (it is pushed some extra space to the right!). This is also the case when I change the number of tabs to 2.

\documentclass{article}
\usepackage[inline,shortlabels]{enumitem} 
\usepackage{tabto}

\begin{document}

\NumTabs{3}
\begin{description*}[before={\noindent},itemjoin={\tab}]
\item {1.} 
\item {2.} 
\item {3.} 
\item {4.} 
\item {5.} 
\item {6.} 
\end{description*}

\end{document}
1

2 Answers 2

6

Insert after={\hfill} in the description* options.

MWE

\documentclass{article}
\usepackage[inline,shortlabels]{enumitem}
\usepackage{tabto}

\begin{document}

\NumTabs{3}
\begin{description*}[before={\noindent},itemjoin={\tab},after={\hfill}]
\item {1.}
\item {2.}
\item {3.}
\item {4.}
\item {5.}
\item {6.}
\end{description*}

\end{document}

Output:

enter image description here


EDIT

To be able to do what you ask in the comment, we need to issue \hfill\par before the closing brace, otherwise the paragraph is not ended. For explanations see, for example, Incorrect line spacing when using \Large in a center environment.

This can be done with the help of the etoolbox package and the line

\AfterEndEnvironment{description*}{\hfill\par}

that adds \hfill\par after description* has ended.

MWE:

\documentclass{article}
\usepackage[inline,shortlabels]{enumitem}
\usepackage{tabto}
\usepackage{etoolbox}
\AfterEndEnvironment{description*}{\hfill\par}

\begin{document}

{\tiny\NumTabs{3}
\begin{description*}[before={\noindent},itemjoin={\tab},after={\hfill}]
\item {1.}
\item {2.}
\item {3.}
\item {4.}
\item {5.}
\item {6.}
\end{description*}}
\bigskip

\NumTabs{3}
\begin{description*}[before={\noindent},itemjoin={\tab},after={\hfill}]
\item {1.}
\item {2.}
\item {3.}
\item {4.}
\item {5.}
\item {6.}
\end{description*}
\bigskip

{\Huge\NumTabs{3}
\begin{description*}[before={\noindent},itemjoin={\tab},after={\hfill}]
\item {1.}
\item {2.}
\item {3.}
\item {4.}
\item {5.}
\item {6.}
\end{description*}}

\end{document} 

Output:

enter image description here

2
  • This works! When I then wrapped a {\tiny ...} around it all, that is: {\tiny\NumTabs{3}...\end{description*}}, again I get strange behaviour with the final \item.
    – Geoff
    Jan 12, 2014 at 21:18
  • @Geoff I've added a workaround. Jan 13, 2014 at 8:49
3

An alternative to an enumerated list in two or three columns is the multienum package:

\documentclass{article}
\usepackage{multienum}
\begin{document}

\begin{multienumerate}
\mitemxxx{One}{Two}{Three}
\mitemxxx{Four}{Five}{Six}
\end{multienumerate}

\end{document}

MWE

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .