4

Trying to use display math \[ \] inside a starred enumerate* environment gives an error

Bad math environment delimiter

or

Missing $ inserted.

I can imagine this is by design, and that the idea is that enumerate* should only contain inline material. But I like \[ \] inside enumerate*; Is there any way to do this?

MWE

\documentclass{article}

\usepackage[inline]{enumitem}

\begin{document}

\begin{enumerate*}
  \item Text \[ 0 = 1 \]   % Bad math environment delimiter
  \item Text \[ 0_1 \]   % Missing $ inserted.
\end{enumerate*}

\end{document}
8
  • 4
    You might need \begin{enumerate*}[mode=unboxed].
    – campa
    May 25, 2018 at 14:18
  • 2
    enumerate* is designed for inline lists, hence` indeed inline maths formulæ, just like the inparenum environment from package paralist. Display maths equation are nonsense in this context. What would be the difference with a normal enumerate environment?
    – Bernard
    May 25, 2018 at 14:49
  • @campa That works, you can write an answer (even if perhaps you think it may not be an ideal solution). May 27, 2018 at 16:46
  • @campa: Please write up an answer to get this question of the list of unanswered posts!
    – user31729
    Jan 1, 2019 at 21:40
  • 1
    @ChristianHupfer Ups, sorry, I've been off the radar for a while... I'll do soon, thanks for the reminder.
    – campa
    Jan 30, 2019 at 14:38

1 Answer 1

1

As the comments and the enumitem documentation says, you need to pass the option mode=unboxed in such situations.

Sample output

\documentclass{article}

\usepackage[inline]{enumitem}

\begin{document}

Some outer text for context.
\begin{enumerate*}[mode=unboxed]
  \item Item without display math,
\item text \[ 0 = 1, \] which is rarely true,
\item text \[ 0_1, \] might be needed,
\item item without display math.
\end{enumerate*}
We then continue.

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .