I'm not sure how to title this question so feel free to change it.
Given the following:
This does look like what I think I want, however, notice that I "eyeballed" the leftmargin
passed to the itemize
list. In this case it seems like 45pt
is what gets it to line up (maybe I'm wrong).
What I'm wondering is if there's some way this can be computed (or if there's another way to do it altogether) so that I don't have to hardcode it, so that it would automatically work regardless of the document margins.
Note that \parindent
is 0pt
, which is indeed how I want it.
\documentclass[10pt]{article}
\usepackage{fontspec}
\usepackage[inline]{enumitem}
\usepackage[letterpaper,vmargin=0.3in,hmargin=0.7in]{geometry}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{TeX Gyre Pagella}
\setlength{\parindent}{0pt}
\pagestyle{empty}
\newlist{points}{itemize}{1}
\setlist[points]{label=»,leftmargin=0pt,itemsep=2pt,parsep=0pt,topsep=4pt}
\begin{document}
I want the left-most edge of the list contents below (the labels in particular) to be aligned with this text.
\begin{points}[leftmargin=45pt] % What should leftmargin be so that it's not hardcoded?
\item[{\textbf{ABC 1}} »] This is a line to illustrate the problem it is long enough to somewhat reach the end
\item[{\footnotesize Abc 1234} »] This is a second line to illustrate the problem it is long enough to somewhat reach the end
\par\addvspace{\baselineskip}
\item[{\textbf{ABC 2}} »] This is a third line to illustrate the problem it is long enough to somewhat reach the end
\item[{\footnotesize Abc 5678} »] This is a fourth line to illustrate the problem it is long enough to go past the end and wrap onto another line at this point. It should wrap like this, with an indent skipping the label's width.
\item Final point for good measure.
\end{points}\par
I want the left-most edge of the list contents above (the labels in particular) to be aligned with this text.
\end{document}