2

I'm trying to configure aligning of lists and sublists using enumitem. Here is the code:

\documentclass{article}
\usepackage{enumitem}

\begin{document}

\section{Introduction}
Lists:

\begin{itemize}[align=left, labelindent=0em, leftmargin=0em, itemindent=!, nosep, noitemsep]
  \item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  %
  \begin{itemize}[nosep, noitemsep]
    \item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  \end{itemize}
  %
  \item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}

\end{document}

Labels are placed correctly, but the 1st lvl text start (1 and 5 lines) should align according to the 2nd lvl label (3 line), and the 2nd lvl text continuation (4 line) should align according to the 2nd lvl label (3 line) too. How can I achieve that? I tried to read https://mirror.datacenter.by/pub/mirrors/CTAN/macros/latex/contrib/enumitem/enumitem.pdf, but it's all Greek to me.

enter image description here enter image description here

1
  • Only 3 arrows on the screen should be changed, 2nd, 3rd and 6th lines are fine.
    – cppbest
    Feb 19 at 10:03

1 Answer 1

1

Edit:
Hopefully now my suggestion gives what you after:

\documentclass{article}
\usepackage{enumitem}
\setlist[itemize,1]{nosep,
                  align=left, 
                  labelwidth=1em, labelsep=0.5em, leftmargin=0em,
                  itemindent=!
                  }
\setlist[itemize,2]{wide,
                    leftmargin=1.5em
                  }

\begin{document}

\section{Introduction}
Lists:

\begin{itemize} 
  \item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  %
  \begin{itemize} 
    \item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    \item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  \end{itemize}
  %
  \item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}

\end{document}

enter image description here

3
  • I need the 2nd and the 4th line in your screen to be aligned according to their labels, i.e. "por" right under the dot and "tempor" right under the dash. The same is for the 6th line.
    – cppbest
    Feb 19 at 10:01
  • @cppbest, see edited answer.
    – Zarko
    Feb 19 at 11:35
  • Thank you very much. Although these parameters didn't exactly fit my real use case, I managed to brute force them using your answer. And ofc it's correct as an answer to this particular question.
    – cppbest
    Feb 19 at 14:32

You must log in to answer this question.

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