[Tex/LaTex] Indentation within an Itemized List

indentationitemizelists

I am using res.cls to write my resume. I have changed the indentation of my itemized list using:

\setlength{\itemindent}{-.5in}

This works great for the first line, but if the item goes onto the next line, the following line is not indented in this manner.

Is there anyway to fix this?

Best Answer

Firstly, the correct variable for this is \leftmargin; as you observe \itemindent applies only to the first line of the item. Now in standard LaTeX \leftmargin is meant to be positive. Indeed source2e says:

\leftmargin: space between left margin of enclosing environment (or of page if top level list) and left margin of this list. Must be nonnegative.

and

\itemindent: extra indentation added right BEFORE an item label.

Loading the enumitem package removes the sign restriction on \leftmargin and gives a simple interface to adjusting these values. The following sample document shows the requested type of effect:

\documentclass{res}

\usepackage{enumitem}

\begin{document}

Adjusting \verb+\leftmargin+ via \verb+enumitem+ options:
\begin{itemize}[leftmargin=-.5in]
\item Test
\item Test
\item Long text, long text, long text, long text, long text, long
  text, long text, long text, long text, long text, long text, long
  text, long text. 
\end{itemize}

\end{document}

Sample output

The following longer document compares the different outputs. As you will see, setting \leftmargin to -.5in has a bigger effect than setting \itemindent to same value. This is because \leftmargin is initially 26pt, whereas \itemindent is 0pt.

\documentclass{res}

\usepackage{enumitem}

\begin{document}

Standard itemize:
\begin{itemize}
\item Test
\item Test
\item Long text, long text, long text, long text, long text, long
  text, long text, long text, long text, long text, long text, long
  text, long text. 
\end{itemize}

Using \verb+\itemindent+ directly:
\begin{itemize}
\setlength{\itemindent}{-.5in}
\item Test
\item Test
\item Long text, long text, long text, long text, long text, long
  text, long text, long text, long text, long text, long text, long
  text, long text. 
\end{itemize}

Adjusting \verb+\leftmargin+ via \verb+enumitem+ options:
\begin{itemize}[leftmargin=-.5in]
\item Test
\item Test
\item Long text, long text, long text, long text, long text, long
  text, long text, long text, long text, long text, long text, long
  text, long text. 
\end{itemize}

\end{document}

Comparison output

To get the same the amount of adjustment corresponding to \itemindent being -.5in, use \begin{itemize}[leftmargin=\dimexpr 26pt-.5in] instead. To do this globally, put

\setlist[itemize,1]{leftmargin=\dimexpr 26pt-.5in}

in your preamble.