# Where do I find \item definition to redefine it?

I want to modify the parameters used by \item in a {list} environment. Where can the original definition be found in my LaTeX distribution to copy and modify?

-

It is not recommend to modify the definition of \item (actually, the definition of your list environment) if you are not TeXpert. There are lot of length parameters that can be customized by non-experienced user. They are listed below.

Here is an example how to reset vertical space between paragraph in all items:

\begin{itemize}
\setlength{\parskip}{3pt plus 3pt minus 1pt}
\item
1st paragraph

2nd paragraph

...
\end{itemize}


Note that vertical lengths are stretchable; in this example \parskip is normally will be 3 points (pt) but can be as small as 2 pt and as large as 6 pt (or even bigger, I am not sure). If

\setlength{\parskip}{3pt plus 3pt minus 1pt}


is put inside the invironment, it acts only on that particular occurence of the environment. You may want to put it also outside:

\setlength{\parskip}{3pt plus 3pt minus 1pt}

...

\begin{itemize}
\item
1st paragraph

2nd paragraph

...
\end{itemize}

-
wow, nice explanation! where did you find the drawing? –  Brandon Kuczenski Mar 4 '11 at 8:35
It is taken from Lamport's book. –  Igor Kotelnikov Mar 4 '11 at 13:02

Well, source2e.pdf is probably the canonical reference in this context. texdoc source2e should provide it (or you can find it on CTAN). It's all in section 56, "List, and related environments". There a couple of things to consider, though:

1. A package or class you use may make some redefinitions, which you would have to take into account.

2. It is possible that some package already provides what you want to do. For example, the enumitem package provides many ways to customize lists and their parameters.

-

If you do not know where to look for the definitions you can use texdef. To use it with LaTeX definitions you have to either call it with the option -t latex or use the corresponding alias latexdef (if the alias is defined on your system).

To check the definition for \item you can issue texdef -t latex \item. To also check where the definition is to be found add the option -f,

texdef -t latex -f item


which on my system it returns:

\item is defined by (La)TeX.

\item:
macro:->\@inmatherr \item \@ifnextchar [\@item {\@noitemargtrue \@item [\@itemlabel ]}


That it is said to be defined by LaTeX indicates that is defined in the LaTeX sources and its documentation you can get to by issuing texdoc source2e.

If you want to see the available options for texdef or learn more about it you can access its documentation with texdoc texdef.

-
Wow, useful command I was not aware of before. –  Daniel Jan 30 '12 at 21:48