For external packages CTAN provides the needed documentation, however, for built-in Latex commands I am not aware of any proper documentation except for The (not so) short introduction to Latex which doesn't really list all the options

I would like to know how I could check all the available environments, commands and relative optional fields of all the built-in commands of Latex more or less like I would use the man command under linux.

I'm looking for something exhaustive like the KOMA-script documentation that breaks down every single piece available.

marked as duplicate by Werner, Stefan Pinnow, Mico, Troy, Kurt Dec 4 '17 at 18:09

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.

  • 1
    source2e.pdf gives the insight to internals of LaTeX kernel macros, however, most [] argument macros come from the standard classes rather than the Kernel, such as \section[]{} etc. (This is a rough guess, however, I did not count the actual number ;-)) Please note that the LaTeX kernel sometimes uses \def\foo#1#2[#3] etc. with moving arguments as well – user31729 Dec 4 '17 at 16:17
  • 2
  • 1
    @Werner I would argue that this is a duplicate since it is not explained how ones should browse the files of the Latex bundle to find such informations. – Maxiride Dec 4 '17 at 16:31
  • 1
    There is official documentation of the LaTeX macros at user level: “LaTeX: A Document Preparation System (2nd Edition)”, by L. Lamport (ISBN 978-0201529838). – egreg Dec 4 '17 at 16:40
  • 1
    @Werner digging at such level is an almost hopeless task. That isn't a documentation. – Maxiride Dec 4 '17 at 17:01

There is official documentation of all LaTeX macros at user level:

Leslie Lamport, “LaTeX: A Document Preparation System (2nd Edition)” ISBN 978-0201529838

(also known as the “LaTeX Manual”)

Frank Mittelbach and Michel Goossens (with Johannes Braams, David Carlisle and Chris Rowley), “The LaTeX Companion (Tools and Techniques for Computer Typesetting) 2nd Edition” ISBN 978-0201362992

(also known as the “Companion”)

Guessing from latex.ltx the arguments is an almost hopeless task. For instance, \section is a macro with no argument, which calls \@startsection which has six arguments and in turn calls either \@ssect (one argument) or \@sect (one optional and one mandatory argument), depending on whether a * follows \section.

With some LaTeX programming experience, one can get through, but one of those manuals is necessary if the whole story is needed.

I own the first and second edition of both the Manual and the Companion; actually two copies of the second edition of the Companion, plus the electronic edition. One of the two paper copies is a gift of the publisher. And, believe it or not, I go and check them when I have to be sure about some command's syntax.

  • 1994 is the year of publication of the Leslie book, would you still recommend it even after such a long time? – Maxiride Dec 4 '17 at 16:59
  • @Maxiride There have been changes in the internals, but no change in the syntax and workings of the user level commands. Some additions have been made, though, particularly in the field of input encoding. – egreg Dec 4 '17 at 17:05

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