This question already has an answer here:

I am a beginner in LaTeX. There are some commands that I don't understand (for example \mathop and \operatorname). I want to find some material about them, but I don't know where to look.

What is a good general reference for looking up LaTeX commands? To which book or website should I refer?

marked as duplicate by Werner macros Nov 4 '15 at 18:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Knowing which commands do which operation depends on the way one searches.

  • With more experience you know commands by heart (believe me, you will do!)
  • Having an introductory textbook on LaTeX definitely helps

  • Some commands are hard to remember, it requires some clue which package defines them

    If the package or class is known, it's best to browse the information TeXDoc provides

  • Looking into package or class files might help

  • On linux/unix the console command texdef -t latex -p amsmath \operatorname will show the definition of \operatorname, for example, it will output

macro:->\protect \operatorname  

\operatorname :
\long macro:->\@ifstar {\qopname \newmcodes@ m}{\qopname \newmcodes@ o}

How much this helps depends a little bit on experience, however ;-)

For special topics:

Unfortunately non - free material: The TeXBook by Donald E. Knuth

  • ftp.cs.stanford.edu/tex/dist/tex/texbook.tex – Johannes_B Nov 4 '15 at 12:16
  • @Johannes_B: Yes, I know that, but you can't compile it :-P – user31729 Nov 4 '15 at 12:21
  • 1
    Looking at the code is enough for me ;-) – Johannes_B Nov 4 '15 at 12:22
  • Personally I prefer \meaning or \csmeaning (this last one from etoolbox package) using \meaning\macro or \meaning{macro}; which prints the definition into the document. For me, that don't usually open the terminal, it's cleaner to just compile a document and see the definition. – Manuel Nov 4 '15 at 17:49

There is no simple answer to this question, since the number of possible macros is arbitrarily large.

Furthermore, there are both LaTeX macros and TeX macros, which in packages are often intermixed.

The best free resource for TeX itself is Victor Eijkhout's TeX by Topic which should be part of your distribution's documentation (use texdoc texbytopic to display it).

For the core LaTeX macros (i.e., those defined in the LaTeX kernel) you can look at the source documentation for LaTeX. (this should also be on your system: texdoc source2e should display it).

For any other macros you should look at the package documentation that defines them. This is especially true for user level macros; for internal macros you may need to look at the source of the package or class itself.

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