Document Classesmaking enumitem levels indent to level then continue on page left margin

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
radiodurans
Posts: 3
Joined: Sun May 28, 2023 5:18 am

making enumitem levels indent to level then continue on page left margin

Post by radiodurans »

Basically, I'm just tring to get a numbered section in memoir class to return to the page's leftmargin after the first line of indentation like below:
Screenshot_2023-05-27_17-29-52 (1).png
Screenshot_2023-05-27_17-29-52 (1).png (109.14 KiB) Viewed 10369 times
I hadn't gotten any responses in a couple weeks so I thought I'd try again. I thought listpaindent would do it but no. Here is some sample code that doesn't seem to work:

Code: Select all

\documentclass[12pt,oneside,letterpaper]{memoir}
\usepackage{newtxtext}
\usepackage{newtxmath}
\usepackage[USenglish]{babel}
\usepackage{enumitem}

\setlist[enumerate,1]{label=\arabic*., after=\vspace{\baselineskip}, itemindent=0in, listparindent=\leftmargin}leftmargin=\dimexpr0.25in+\labelwidth+\labelsep\relax, listparindent=\dimexpr0.25in\relax]
\setlist[enumerate,2]{label=\alph*., after=\vspace{0pt}, itemindent=.25in, listparindent=\leftmargin}
\setlist[enumerate,3]{label=(\arabic*), after=\vspace{0pt}, itemindent=0.5in, listparindent=\leftmargin}

\setlrmarginsandblock{0.5in}{1in}{*} % Left and right margins
\setulmarginsandblock{0.88in}{1in}{*} % Top and bottom margins
\raggedright

\checkandfixthelayout

\begin{document}

\begin{enumerate}
    \item First level item that is indented on the first line. This is a long description that spills over into multiple lines. Here is the second line of the description. And here is the third line of the description.
    \begin{enumerate}
        \item Second level item that is indented on the first line. This is a long description that spills over into multiple lines. Here is the second line of the description. And here is the third line of the description.
        \begin{enumerate}
            \item Third level item that is indented on the first line. This is a long description that spills over into multiple lines. Here is the second line of the description. And here is the third line of the description.
        \end{enumerate}
    \end{enumerate}
\end{enumerate}

\end{document}
Last edited by Stefan Kottwitz on Tue Jun 06, 2023 9:53 am, edited 1 time in total.
Reason: Codebox marked ("Code" button)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
Post Reply