jbezos / enumitem

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

error: Invalid series name `left'. #5

Closed u-fischer closed 5 years ago

u-fischer commented 5 years ago

According to the documentation the values of the series key shouldn't be the name of other keys. I do find this rather unfortunate and difficult to explain. Also it means that extensions of enumitem with new keys can break existing documents. Concretely a document I'm just handling uses series=right and series=left and now broke due to the new left key.

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[series=left]
\item bbb
\end{enumerate}
\end{document}  
jbezos commented 5 years ago

I was expecting something like that. There was a note wrt to \SetEnumitemKey (recommending names with a non-letter character), but I forgot a similar comment wrt to series, which effectively defines new keys. An option would be to allow overriding existing keys (with a warning). I have to think a little about it.

jbezos commented 5 years ago

After experimenting with several possibilities, I've just added a package option series=override. With it series names take precedence over keys. Admittedly dangerous, but other solutions were even more dangerous. The explanation in \SetEnumitemKey now is also in the section on series, and the examples have been modified accordingly. No new keys will be added in the next release (there was a project for a new key verbose, but I'll follow another approach instead).