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?

4
  • 2
    I was just going to ask the same thing. I might write such a reference by myself, at least for the more common macros. It could be written as LaTeX document (of course) or maybe as community wiki here? Commented Jan 27, 2011 at 16:23
  • 1
    I compiled now a ten page document which lists all LaTeX2a internal macros I found useful. Its not ready to be published on CTAN but I'm happy to provide a copy. Commented Feb 4, 2011 at 2:45
  • @Martin: Nice! If you can post it somewhere, maybe you could also provide a link to the document as a new answer? Commented Feb 7, 2011 at 10:54
  • 1
    Done and done. Commented Feb 7, 2011 at 11:31

2 Answers 2

67

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.

6
  • \protected@testopt is an auxiliary command used only for the definition of commands taking an optional argument with \newcommand.
    – egreg
    Commented Jul 26, 2011 at 10:39
  • Even though this is mildly spam, I would like to thank too. :)
    – percusse
    Commented Oct 31, 2011 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
    Commented Nov 28, 2013 at 14:22
  • @Jubobs: Sorry, no, I don't use LaTeX3 myself, so I don't have much knowledge about their internals. Commented Nov 28, 2013 at 21:49
  • 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
    Commented Mar 30, 2015 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 :).

3
  • 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
    Commented Nov 1, 2010 at 16:21
  • Yeah, the current situation is not much better than using \show on these macros. Commented Nov 1, 2010 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
    Commented Nov 1, 2010 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .