# Where can I look up LaTeX commands? [duplicate]

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 StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Nov 4 '15 at 18:45

• Have a look on texdoc.net -- it is run by our important TeX blokes here ;-) – user31729 Nov 4 '15 at 11:30
• – Werner Nov 4 '15 at 18:40
• @Werner I don't think this is really a duplicate of the linked question. Maybe the one in your comment but not the current duplicate. – Alan Munn Nov 5 '15 at 20:09

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

\operatorname:
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
• 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.