Where or how do I find the documentation for a given Latex command?

For example, in R I get the documentation for mean() with ?mean or at the manual pages http://stat.ethz.ch/R-manual/R-patched/library/base/html/mean.html. In Java there are the Javadocs to tell me what parameters a method takes an what it returns.

What about LaTeX? If I want to know how to use the \caption command, for example, where is its documentation?

Every time I face a problem, I Google it up and get some blog, StackExchange or else that solves my problems but I never get to the formal documentation of a command so I never actually know why something works the way it does!

  • 3
    LaTeX is not a monolithic system: it's a series of parts written by different people. As such, the documentation is also in parts. For the LaTeX kernel, any good introduction will cover things (we have a question on that). For add-on packages, texdoc <package> at the Command Line/Terminal should open the docs for that package. – Joseph Wright Jul 17 '14 at 7:36
  • 1
    It is also worth to have a look to How can I see the “implementation” of the \LaTeX command? – Claudio Fiandrino Jul 17 '14 at 7:37
  • 1
    I used R long before I started using LaTeX, so I sympathize very strongly with your question. I had the very same question myself. As other people point out, you need to look into the documentation for the package the command belongs to (a separate question is how you can find out what package that is!). But be prepared for much frustration, since many (most?) packages are quite poorly documented and quite cryptic. – Sverre Jul 28 '14 at 17:52

You have an easy and up-to-date access to the package documentations through the TeX Catalogue on Line, that you can find, e.g. here:

enter image description here

It's enough to have a bookmark in your favourite browser.

For a general help on LaTeX, you have the LaTeX Help e-book, which is in .chm format (compiled html), that you can find here. I don't know if it works on other platforms than Windows:

enter image description here


Most distributions came with texdoc programm. Open a command line/terminal window and type

texdoc <package name>

where <package name> is the name of the class, style for which you want some documentation.

For example for biblatex, use texdoc biblatex and you read the PDF with Biblatex manual

  • 1
    Thank you. I guess texdoc or CTAN (thanks Romain Picot) is the closest to what I asked. However, texdoc open the docs for the whole package which you have to search and you have to remember which package a command comes from. I was hoping for something more direct like "textdoc <package> <command>". As I said, like in R invoking "help(mean)" – dariober Jul 17 '14 at 7:59
  • And exactly how should texdoc make your PDF reader jump to a certain page? – daleif Jul 17 '14 at 8:38
  • @daleif I think the OP was imaging a more structured documentation approach where each command has some form of database entry, rather than the free-form nature of the current LaTeX documentation. – Joseph Wright Jul 17 '14 at 8:49
  • @JosephWright, I know. BUt as others have mentioned, for LaTeX this would be an impossible dream. – daleif Jul 17 '14 at 9:02

Most of the package can be found on CTAN. They have an up-to-date documentation. Command which are part of the package have their documentation with them too.

  • What if I don't know what package a command is because I am mercilessly copy-pasting things and have no idea what I'm doing? – William Entriken Apr 8 '20 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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