jbezos / enumitem

Customize enumerate, itemize and description
MIT License
48 stars 5 forks source link

New label with parameter #9

Open umrenato opened 5 years ago

umrenato commented 5 years ago

Would it be possible to modify the command \SetEnumitemKey so it could define a new label with one parameter (maybe more)? In the readme pdf, consider the example that defines a twocol label. I'd like to modify it, being able to define a ncol label, so that we could add ncol = 3 to the list options and have the desired number of columns. Something like this:

\SetEnumitemKey{ncols}[1]{ %specifies that it has 1 parameter itemsep=1\itemsep, parsep=1\parsep, before=\raggedcolumns\begin{multicols}{#1}, after=\end{multicols}}

So we would use that new key like this

\begin{enumerate}[ncols = 3]

or maybe using some other notation, like

\begin{enumerate}[ncols{3}]

This last one could possibly be extended to allow something like this with more parameters...

\begin{enumerate}[mykey{3}{4}]

jbezos commented 5 years ago

While admittedly it could be useful in some contexts, I'm sorry to say I have no plans to add it. Actually, long ago I even began to write it, but it turned out to be more complicated as it seems at first sight.

umrenato commented 5 years ago

Thanks for the answer! Anyway your package is great. It has been a default for me since I have found it.