# enumerate in itemize environment, no new line [closed]

I want to have something looking like this:

\item
\item 1.
2


My intention is to have the first enumerated item in the same line as the itemize item. I read something about \leavemode, but it doesn't work for me. (The enumeration should be aligend)

Minimal example:

\begin{itemize}
\item1
\item2 blabla \leavemode \begin{enumerate} \itema
\itemb   \end{enumerate}
\item3
\end{itemize}

• It is not clear what you are asking. Are you looking for an inline list? Can you provide a minimal example where you can show what you would like to achieve and what goes wrong in your current solution? – Bordaigorl May 13 '14 at 8:56
• In a standard article document \begin{itemize} \item \begin{enumerate} \item Text \end{enumerate} \end{itemize} produces what you ask. – Andrew Swann May 13 '14 at 9:01
• Does this question help? Removing a half blank line and precisely calculating a space – egreg May 13 '14 at 10:19

A solution comes from the enumitem package: the first item is introduced through the enumerate* environment (inline enumerate); it is declared to be the first element of a to be continued series — a notion introduced by enumitem in version 3.0. The other items come from an enumerate environment, belonging to the tobecont series, with suitable values of \topsep and \partopsep.

Here is an example, in which I afford the luxury of two inline items first:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier}

\usepackage[inline, shortlabels]{enumitem}

\begin{document}

\begin{itemize}
\item Blahblah

\item Blahblah
\begin{enumerate*}[series = tobecont, itemjoin = \quad]
\item a \item b
\end{enumerate*}

\begin{enumerate}[resume = tobecont, ,topsep = 0pt, partopsep = 0pt]
\item c
\item d
\end{enumerate}

\item Blahblah
\end{itemize}

\end{document}


If you are prepared to forego page breaks in the sublist and don't mind specifying the width, then you can use a minipage:

\documentclass{article}

\begin{document}

\begin{itemize}
\item 1
\item 2 blabla
\begin{minipage}[t]{0.4\linewidth}
\begin{enumerate} \item a
\item b \end{enumerate}
\end{minipage}

\item 3
\end{itemize}

\end{document}

• Unfortunately there is still a line break after item 2, item a is not in line with item 2 – user51606 May 13 '14 at 9:52
• In the example above they are on the same line and the output matches what you indicated in the question. – Andrew Swann May 13 '14 at 9:57