1

I'm using a class file with the following:

  \begin{list}{$\cdot$}{\leftmargin=0em}
  \itemsep -0.5em \vspace{-0.5em}
}{
  \end{list}

This allows me to create bulleted lists. @Werner showed me how to use \indentlist{0.25in} to create nested lists (see Moving entire item rather than just indenting item).

Another part of my document uses the following format:

    Text \hfill Date \\ 
    Text \\
    $\cdot$ Text \\

I want to make the spacing before and after the $\cdot$ bullet directly above match the spacing in the lists elsewhere in the document. This seems to work:

 \hspace*{length}$\cdot$\hspace{length} Text \\

However, I'm not sure what lengths the other lists are using. Since I used \indentlist{0.25in}, perhaps \hspace*{0.25in} is correct for the space before the bullet. The list instructions posted above are given inside a subsection environment and the section environment has \setlength{\leftmargin}{1.5em}. Moving on to the space after the bullet, I'm not sure what length the lists are using. Perhaps it's a default length, but I'm not sure what the default would be. So, I'm wondering what lengths I should use for the two spaces to match the rest of the document. Perhaps there is a better approach I should use?

0

It is important to note that item labels in a list is typically set right-aligned; here's a visual of a typical list:

enter image description here

\documentclass{article}

\usepackage{lipsum}

\begin{document}

\lipsum[1]

\begin{itemize}
  \item Zeroth
  \item[1] First
  \item[11] Second
  \item[111] Third
  \item[1111] Fourth
  \item[11111] Fifth
  \item[111111] Sixth
  \item[1111111] Seventh
\end{itemize}

\end{document}

Your list is similar; you only set the leftmargin to be 0pt. That sets the list flush with the left margin and the label inside the margin. So you can do the following to replicate it for a non-list item:

enter image description here

\documentclass{article}

\usepackage{lipsum}

\makeatletter
\newcommand{\indentlist}[1]{%
  \par% Force new paragraph
  \addtolength{\@totalleftmargin}{#1}% Indent entire list
  \addtolength{\linewidth}{-#1}% Reduce line width by indent
  \parshape \@ne \@totalleftmargin \linewidth
}
\makeatother

\newcommand{\fakeitem}[1][0pt]{%
  \par\noindent
  \hspace*{#1}%
  \makebox[0pt][r]{%
    \makebox[\labelwidth][r]{$\cdot$}%
    \hspace{\labelsep}%
  }\ignorespaces
}

\begin{document}

\lipsum[1]

\begin{list}{$\cdot$}{
  \leftmargin=0em
  \itemsep=-0.5em
}
  \item First
  \indentlist{1em}
    \item Second
\end{list}

\fakeitem First

\fakeitem[1em] Second

\end{document}
2
  • Thanks! There is too much space between the lines. I take it \itemsep -0.5em \vspace{-0.5em} or just \itemsep -0.5em is controlling this in the list but how do I apply that here?
    – Pond892
    Jan 26 at 5:18
  • @Pond892: Your \vspace{-0.5em} would be similar to reducing the usual topsep measurement of enumitem as it is executed at the top of the list, while \itemsep is applied as between \items to seperate them vertically. If you want the items closer together, you can probably add a \vspace{-0.5em} immediately after \par in the \newcommand definition of \fakeitem.
    – Werner
    Jan 26 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.