\documentclass[a4paper]{article}
\usepackage[inline]{enumitem}
\begin{document}
\begin{itemize*}
\item First point
\item Second point
\item Third point
\end{itemize*}
\end{document}
The above code gives
I need two items per row when i give
\begin{itemize*}(2)
\item First point
\item Second point
\item Third point
\end{itemize*}
I need three items per row when i give
\begin{itemize*}(3)
\item First point
\item Second point
\item Third point
\end{itemize*}
Something similar to "tasks" using "enumitem"
The output similar to
Best Answer
enumitem
is not really needed for this (without more context, of course).xparse
provides an easy way to create optional arguments with delimiters other than[]
:The above MWE provides
itemize*
that takes a single optional argument(<num>)
, setting a "list" inline (likeenumitem
's[inline]
option). After<num>
entries, a paragraph break\par
is inserted.<num>
is set by default to1234
(just a large enough number)...A complete revamp to accommodate the new request: Itemized list spread across the page the are horizontally aligned.
The first step is to mimic a list, but actually capture each
\item
in a macro. This is done using some help from Order items inenumerate
environment automatically. Once each item is captured, it is sequentially printed in a\parbox
(with some default formatting that can be adjusted) that spans exactly a portion of\linewidth
so that exactly the number of items specified fits within it. A minor check is performed to make sure the default is not adhered to when there are fewer items in the list.