2

I'm looking for a way, to run 2 lists together. Let me explain:

I. First item first list

  1. first item second list
  2. second item second list

II. second item first list

  1. third item second list
  2. fourth item second list
  3. fifth item second list

III. Third item first list

  1. sixst item second list
  2. seventh item second list
  3. eight item second list

...

Does anybody have an idea how to do that?

1
  • 2
    Welcome to TeX.SE. I would recommend you use the resume feature available with the enumitem package. Dec 26 '20 at 23:24
2

The enumitem package is your friend. Choose a better name than gigienum.

\documentclass{article}
\usepackage{enumitem}

\newlist{gigienum}{enumerate}{2}
\setlist[gigienum,1]{label=\Roman*.}
\setlist[gigienum,2]{label=\arabic*.,resume}

\begin{document}

\begin{gigienum}
\item First item first list
  \begin{gigienum}
  \item first item second list
  \item second item second list
  \end{gigienum}

\item Second item first list
  \begin{gigienum}
  \item third item second list
  \item fourth item second list
  \item fifth item second list
  \end{gigienum}

\item Third item first list
  \begin{gigienum}
  \item sixth item second list
  \item seventh item second list
  \item eighth item second list
  \end{gigienum}
\end{gigienum}

Let's check that the numbering in the lists are reset.

\begin{gigienum}
\item First item first list
  \begin{gigienum}
  \item first item second list
  \item second item second list
  \end{gigienum}

\item second item first list
  \begin{gigienum}
  \item third item second list
  \item fourth item second list
  \item fifth item second list
  \end{gigienum}

\item Third item first list
  \begin{gigienum}
  \item sixth item second list
  \item seventh item second list
  \item eighth item second list
  \end{gigienum}
\end{gigienum}

\end{document}

enter image description here

5
  • Thank you for your anwser. It apears, that the package is missing from my latex installation. How do I install packages for Texmaker?
    – Gigibu5
    Dec 27 '20 at 12:50
  • @Gigibu5 What operating system are you running? What TeX distribution?
    – egreg
    Dec 27 '20 at 13:03
  • I'm running Arch linux. For edditing I'm using Texmaker. I have tried installing a package from the Arch User Repository, it compiled once.
    – Gigibu5
    Dec 27 '20 at 13:40
  • @Gigibu5 You need to install texlive-latexextra with the Arch Linux package manager.
    – egreg
    Dec 27 '20 at 14:12
  • Thank you for your help. I have found latex-enumitem package in the AUR.
    – Gigibu5
    Dec 27 '20 at 14:30
0

You can do that with the series and resume* keys of enumitem:

 \documentclass{article}

 \usepackage{enumitem}

 \begin{document}

    \begin{enumerate}[label=\Roman*.]
    \item First item, first list.
    \begin{enumerate}[label=\arabic*., series=second]
    \item First item, second list.
    \item Second item, second list.
    \end{enumerate}
    \item Second item, first list.
    \begin{enumerate}[resume*=second]
    \item Third item, second list.
    \item Fourth item, second list.
    \item Fifth item, second list.
    \end{enumerate}
    \item Third item, first list.
    \begin{enumerate}[resume*=second]
    \item Sixth item, second list.
    \item Seventh item, second list.
    \item Eighth item, second list.
    \end{enumerate}
    \end{enumerate}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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