I'm writing a document (bridge system notes, if that helps anybody visualize what I'm looking for) and need to make extensive use of nested lists. Here's a minimal example of what I'm using now:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}
\def\labelitemi{} %%%% these definitions remove bullets and adjust the spacing between nestings
\def\labelitemii{\qquad\thinspace}
\def\labelitemiii{\qquad\thinspace}
\def\labelitemiv{\qquad\thinspace}
\def\labelitemv{\qquad\thinspace}
\newcommand{\bid}[2]{\item \texttt{#1\ \ \ \ \ }#2} %%%% this is used to create each item of the lists
%%%% the monotype font is used to ensure consistent horizontal spacing
\newenvironment{bidding} %%%% this adjusts spacing as I desire
{\begin{itemize}[leftmargin=*] \itemsep2pt \parskip0pt \parsep0pt}
{\end{itemize}}
\begin{document}
\begin{bidding}
\bid{2D}{11-15, 3-suited, short D}
\begin{bidding}
\bid{2D}{to play}
\begin{bidding}
\bid{2D}{4=3=1=5 shape}
\bid{P\ }{else}
\end{bidding}
\bid{2S}{to play}
\bid{2N}{strong ask, mostly GF}
\begin{bidding}
\bid{3C}{any minimum}
\begin{bidding}
\bid{3D}{asks, opener shows a 4-card major or 3NT with both}
\end{bidding}
\bid{3D}{4=4=1=4, maximum}
\end{bidding}
\bid{3C}{to play}
\end{bidding}
\end{bidding}
\end{document}
This mostly looks and works great, but I'm having three problems.
First, the built-in LaTeX nesting limit still applies, and I want to be able to nest at least two levels beyond that. I've looked at a couple of solutions on this website, but couldn't see how to adapt those answers to also fit my additional needs.
Second, if the second part of the \bid
item is too long, it will wrap around, but since \bid
just takes both inputs and puts them in one line with some space in the middle, the new line will start below the first input, and I would like it to start below the start of the second input on the original line.
In other words, I would like these items to look like
2H lots of text lots of text lots of text lots of text lots of text
lots of text lots of text lots of text
but instead they look like
2H lots of text lots of text lots of text lots of text lots of text
lots of text lots of text lots of text.
A third and less pressing problem is that in order to achieve the horizontal spacing when the first input of \bid
varies, I often have to either pad the first input or insert negative horizontal space. I rarely have to adjust by more than one character width, but it would be nice if there's an easier solution, and this document is several dozen pages long so the padding adds up.
Either further modifications to the environment and commands I've made or an entirely new solution would be great.
enumitem
. Can do everything you want. Decent documentation. Not too complex, but flexible & powerful.enumitem
in another document several months ago to achieve my desired spacing, so I just copied that code over into this new document. I hadn't realized the package could help resolve my further demands for this project!