Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 9 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

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}
share|improve this answer
1  
Won't you please add \meaning as it is sometimes easier to read, just for completeness? –  Yiannis Lazarides Jan 30 '12 at 16:19
    
@YiannisLazarides --- What is the best way to use \meaning? –  Ian Thompson Jan 30 '12 at 16:31
    
I normally use \meaning\labelitemi with tt font. –  Yiannis Lazarides Jan 30 '12 at 18:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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