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'm using an inline enumerate list in my document, and I want to make that label slightly different (prepend with a () compared to the normal enumerate environment.

However, since enumerate* share settings with the enumerate environment, how do I go about changing the label for the enumerate* environment?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

EDIT: Today the new version with a bug fix is available on CTAN. enumitem -- Version 3.5.2 -- 2011-09-28

You use the optional argument of the environment:

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


\begin{document}
\lipsum[1]
\begin{enumerate*}[label=(\arabic*.)]
\item foo
\item bar
\end{enumerate*}
\lipsum[2]
\end{document}

To set this behavior global you can use \setlist.

EDIT

I am using enumitem.sty 2011/09/05 v3.5.1 Customized lists. It seems that this version has a bug with \setlist*. You can use

\setlist[]*{}

That works well. But in the documentation is listed:

\setlist*[]{}

That doesn't work.

Here a small workaround:

\listfiles
\documentclass{article}
\usepackage[inline]{enumitem}
\usepackage{lipsum}
\makeatletter
\def\setlist{%
   \@ifstar%
     {\temp@setlist}
     {\temp@@setlist}
}
\newcommand\temp@setlist[1][]{%
  \enit@setlist{#1}\@ne}

\newcommand\temp@@setlist[1][]{%
  \enit@setlist{#1}\z@}

\makeatletter       
%\setlist[enumerate]*{label=(\arabic*.)}
\setlist*[enumerate]{label=(\arabic*.)}
\makeatother
\begin{document}
\lipsum[1]
\begin{enumerate*}
\item foo
\item bar
\end{enumerate*}
\lipsum[2]
\end{document}

The problem is the definition of setlist

\newcommand\setlist[1][]{%
  \@ifstar{\enit@setlist{#1}\@ne}{\enit@setlist{#1}\z@}}

setlist first check the optional argument before the test \@ifstar works.

EDIT

Send Bug-report.

EDIT:

The author of enumitem will fixed the bug and will upload the new version in one or two weeks.

share|improve this answer
    
Did you, or should the OP (send a bug-report)? –  Werner Sep 11 '11 at 14:40
    
@Werner: See my EDIT ;-) –  Marco Daniel Sep 11 '11 at 14:50
    
I used the first approach since I couldn't get any variant of setlist, star or no star, to work. –  gablin Sep 11 '11 at 15:12
    
@gablin: Do you have the same version of enumitem You can check it by using the command \listfiles. –  Marco Daniel Sep 11 '11 at 15:25
    
@Marco: Yep, got the same version. –  gablin Sep 12 '11 at 14:48
show 3 more comments

Instead of using inline, just create a new list named enumerate* of type enumerate*. (BTW, I'll fix the bug in \setlist*, and a few others in a week or two).

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.