29

We are given a document with original bullet definitions overwritten:

\renewcommand{\labelitemi}{$\circ$}
\renewcommand{\labelitemii}{$\circ$}
\renewcommand{\labelitemiii}{$\circ$}
\renewcommand{\labelitemiv}{$\circ$}
...

(Example taken from Richard Durr's answer)

Assume, we want to make list (in such document) with original bullets (using \begin{itemize}[label=...]).

What are default definitions of \labelitemi, \labelitemii, \labelitemiii, \labelitemiv...?

How to retrieve this information?

3 Answers3

23

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 \labelitemi you can issue texdef -t latex \labelitemi. To also check where the definition is to be found add the option -f. So, to check the definitions for \labelitemi, \labelitemii, \labelitemiii and \labelitemiv you can issue

texdef -t latex -f \labelitemi \labelitemii \labelitemiii \labelitemiv

and on my system it returns:

\labelitemi first defined in "article.cls".

\labelitemi:
\long macro:->\textbullet 

\labelitemii first defined in "article.cls".

\labelitemii:
\long macro:->\normalfont \bfseries \textendash 

\labelitemiii first defined in "article.cls".

\labelitemiii:
\long macro:->\textasteriskcentered 

\labelitemiv first defined in "article.cls".

\labelitemiv:
\long macro:->\textperiodcentered

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

N.N.
  • 36,163
  • Now a SE answers directs me to a command line again. I.e. this tip is very helpful for later, but it does not answer the actual question. Only @Chel did so. – rugk Sep 01 '20 at 02:12
17

The original definition is in the class file, e.g. article.cls:

\newcommand\labelitemi{\textbullet}
\newcommand\labelitemii{\normalfont\bfseries \textendash}
\newcommand\labelitemiii{\textasteriskcentered}
\newcommand\labelitemiv{\textperiodcentered}

If a definition isn't there it's generally in source2e.

Chel
  • 6,110
13

Use \show to display the definition of a macro in the terminal, and in the log file:

\documentclass{article}
\show\labelitemi

Alternatively, to get the output in the pdf or dvi, use \meaning:

\documentclass{article}
\begin{document}
\texttt{\meaning\labelitemi}
\end{document}
Ian Thompson
  • 43,767