Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the latest version of the enumitem package and I'm trying to use different labels for enumerate lists which are set as normal lists and enumerate lists which are set inline. However, it doesn't seem to work (one customization overwrites the other), and I've already asked a question about this where it turned out to be due to a bug.

However, I still can't get it to work. I have the following MWE:

\documentclass{article}
\usepackage[inline]{enumitem}

\setlist[enumerate,1]{%
  label=\arabic*.,
}
\setlist*[enumerate,1]{%
  label=(\roman*),
}

\begin{document}

\begin{enumerate}
  \item item 1
  \item item 2
  \item item 3
\end{enumerate}

\begin{enumerate*}
  \item item 1
  \item item 2
  \item item 3
\end{enumerate*}

\end{document}

and what I get is:

enter image description here

Either I don't understand how to use the \setlist to get this to work, or the bug still remains. I can't figure out which.

share|improve this question
1  
The documentation says explicitly that "that labels and settings [of the inline lists] are shared with the displayed lists". So if you want independant settings you should create a new list with \newlist. Beside this \setlist* is not for the starred list variant but "The starred form \setlist* adds the settings to previous ones." –  Ulrike Fischer Mar 18 '13 at 14:13
    
Aha, so that's how you were meant to do it! I mistakenly assumed that the starred version of \setlist dealt with the starred versions of itemize, enumerate, etc. Thanks for clearing this out. Could any of you please provide an answer that I can accept? –  gablin Mar 18 '13 at 14:22
add comment

2 Answers 2

up vote 5 down vote accepted

Nothing can say it better than the manual.

The three inline lists have types enumerate*, itemize*, and description*, which are available always, even without the package option inline (which just defines three environments with these names).

The starred form \setlist* adds the settings to previous ones.

You should create a \newlist instead and there is no more need to put the inline option unless you want to use the predefined lists.

\documentclass{article}
\usepackage{enumitem}

\setlist[enumerate,1]{%
  label=\arabic*.,
}

\newlist{inlinelist}{enumerate*}{1}
\setlist*[inlinelist,1]{%
  label=(\roman*),
}

\begin{document}

\begin{enumerate}
  \item item 1
  \item item 2
  \item item 3
\end{enumerate}

\begin{inlinelist}
  \item item 1
  \item item 2
  \item item 3
\end{inlinelist}

\end{document}

enter image description here

share|improve this answer
    
I managed to completely confuse myself by assuming that enumerate* and \setlist* was somehow related. Thanks for showing how it's meant to be used. =) –  gablin Mar 18 '13 at 14:25
    
@gablin You're welcome. –  hpesoj626 Mar 18 '13 at 14:27
add comment

Easy control using "shortlabels" option

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


\begin{document}

\begin{enumerate}[1.]
  \item item 1
  \item item 2
  \item item 3
\end{enumerate}

\begin{enumerate*}[(i)]
  \item item 1
  \item item 2
  \item item 3
\end{enumerate*}

\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.