1

I'm having trouble controlling the indentation of individual lines while maintaining hanging indentation at each level. It's a bit hard for me to describe so I think it'll be clearest with a picture:
Example text with hanging indentation within lines and hierarchical indentation across lines

There are two things making it difficult:

  1. there are a lot of long lines, so hanging indentation is a must
  2. there are a lot of places where the hierarchical indentation goes 3 or 4 levels in, so it's not feasible for every hanging indent to land in the same place.

The closest I've gotten is by using patverse in the verse environment that comes with memoir, but that only lets me offset the first line of each new indented portion; all the wrapped text lines up in a way that makes it impossible to indent twice or more:
Text example where text wraps to the second level of indentation

I've considered using nested description environments, but I want the inter-line spacing to be the same as regular text. That could probably be fixed, but it seems like a a bit of a hassle to actually use, so I wanted to know if there was something better before I tried getting it to work.

One last thing: for now, I'm planning to use the memoir package. If that makes this indentation scheme overly complicated to mark up, I'm willing to let it go, but ideally I'd like a solution that works nicely with memoir.

3
  • 1
    Welcome to TeX.se. These look like nested lists but with no labels. Would that be an adequate way to enter them? This is fairly simple to to with enumitem.
    – Alan Munn
    Mar 8, 2023 at 18:52
  • @AlanMunn I think so. I didn't know about enumitem but that seems like it would make it easy to fix the vertical spacing with descriptions. Mar 8, 2023 at 19:02
  • Provide an MWE (from \documentclass... to \end{document}) that we can compile that shows your problem and how you tried to fix it. Why do you expect us to guess/invent what you might have done? --- GOM Mar 9, 2023 at 18:14

1 Answer 1

1

Here's a version just using an itemize environment with minimal settings created using the enumitem package. There's no need to use a description environment because you have no label at all, so itemize is the most appropriate. You can play with the settings as you like to get the spacing you want. I've used the nosep key to remove all vertical spacing from the list, and set the top level margin to be flush with the rest of the text.

\documentclass{memoir}
\usepackage{enumitem}
\newlist{nolabel}{itemize}{4}
\setlist[nolabel]{label={},nosep,labelwidth=0pt,labelsep=0pt}
\setlist*[nolabel,1]{leftmargin=*}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{nolabel}
\item This is a line at the first level of the list. Here’s how it wraps when the line is very long:
\begin{nolabel}
    \item This is a line at the second level of the list.
    \item This is another line at the second level.
    \begin{nolabel}
        \item This is a third level item.
        \item This a another third level item.
    \end{nolabel}
    \item This is a third second level item.
    \end{nolabel}
\item This is a final first level item.
\end{nolabel}
\lipsum[1]
\end{document}

output of code

You must log in to answer this question.

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