8

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!

ChrisS
  • 13,529
dariober
  • 285

3 Answers3

3

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

Guido
  • 30,740
  • 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 ". As I said, like in R invoking "help(mean)" – dariober Jul 17 '14 at 07:59
  • And exactly how should texdoc make your PDF reader jump to a certain page? – daleif Jul 17 '14 at 08: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 08:49
  • @JosephWright, I know. BUt as others have mentioned, for LaTeX this would be an impossible dream. – daleif Jul 17 '14 at 09:02
3

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

Bernard
  • 271,350
1

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.

Romain Picot
  • 6,730
  • 4
  • 28
  • 58