67

This question led to a new package:
macros2e

Is there a place where I can find a reference of LaTeX internal commands? For example, just a few months ago I saw an answer using \@for and today I found about \@star@or@long. Is there a place where these are documented? How did people using these commands learn about them?

Juan A. Navarro
  • 62,139
  • 32
  • 140
  • 169

2 Answers2

66

I now compiled such a document listing all internal macros of LaTeX2e which are also useful for package authors. The work title is "List of internal LaTeX2e Macros useful to Package Authors" and I'm planning to release it on CTAN 'soon' (e.g. as 'macros2e') when its out of the beta stage.

The beta release can be found on my website. There is also a feedback form and email address on the website. Please do not hesitate to suggest more macros I might have overlooked, better explanations of already listed macro, report errors of any kind or anything else.

Update 26th July 2011

It is now on CTAN. The source repository is public. Please feel free to provide comments, patches or open an issue ticket if you find anything which can be improved.

Martin Scharrer
  • 262,582
  • \protected@testopt is an auxiliary command used only for the definition of commands taking an optional argument with \newcommand. – egreg Jul 26 '11 at 10:39
  • Even though this is mildly spam, I would like to thank too. :) – percusse Oct 31 '11 at 21:10
  • 1
    Do you have any plans to write some kind of correspondence between LaTeX2e internals and their LaTeX3 equivalents? Maybe such a reference exists, but if there is none, it would greatly help people wanting to get into LaTeX3. – jub0bs Nov 28 '13 at 14:22
  • @Jubobs: Sorry, no, I don't use LaTeX3 myself, so I don't have much knowledge about their internals. – Martin Scharrer Nov 28 '13 at 21:49
  • @MartinScharrer Well, thanks for macros2e anyway :) – jub0bs Nov 28 '13 at 22:23
  • 1
    It can be displayed locally with texdoc macros2e, but for some reason in Ubuntu the texlive-lang-english package must be installed. -- Thanks for the great summary. – krlmlr Mar 30 '15 at 14:02
24

I guess texdoc source2e is the answer to many of your questions. Both the macro's you mentioned are discussed in the manual, which is basically a documented source of LaTeX2e.

As for learning these commands, it's reading existing packages, reading the documentation and reading tex.stackexchange.com. At least it is for me :).

Pieter
  • 5,411
  • 3
    That's about the best there is, hence the work on LaTeX3 includes quite a bit of 'write some documentation' steps. Not perfect yet, but we are working on it, honest! – Joseph Wright Nov 01 '10 at 16:21
  • Yeah, the current situation is not much better than using \show on these macros. – Juan A. Navarro Nov 01 '10 at 16:33
  • 4
    @Juan: at least, by reading source2e, you can read a few comments that \show won't give you, and the exposition is a bit structured. But right, it's not a proper developer manual. source3 is much better in this respect. – mpg Nov 01 '10 at 17:07