TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a short question about indexing.

Is it possible that latex automatically creates an entry in the index, when I first use a notation fixed by \newcommand?

share|improve this question
Your question is not very clear. Could you give an example? In general, introducing notation into your publications by \newcommand is a good idea especially because it allows to bind index or glossary entries to it. – Stephan Lehmke Mar 23 '12 at 14:53
Dear S.Lehmke, that is exactly what i intended to do. – user12882 Mar 23 '12 at 16:35
up vote 1 down vote accepted

You can create your own command (called \notation here) to do this.

\usepackage{mathabx} %For the \rip symbol
After shooing them, I buried the bodies in a \tomb.

Note that this creates the index entry when the command is defined, rather than upon its first use.

share|improve this answer
Thank you, though I can not yet upvote;) – user12882 Mar 23 '12 at 16:24
I'd use \newcommand instead of \def. – egreg Mar 23 '12 at 16:51
Sadly, this does not work with amsbook. – user12882 Mar 23 '12 at 16:56
@user12882: for amsbook simply delete (or comment out) the line \usepackage{makeidx}. – Gonzalo Medina Mar 23 '12 at 17:22
No I tried this as well - no error message, but no index in pdf file as well;( – user12882 Mar 23 '12 at 17:26

Your Answer


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.