This question led to a new package:

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?

  • 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? – Martin Scharrer Jan 27 '11 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. – Martin Scharrer Feb 4 '11 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? – Juan A. Navarro Feb 7 '11 at 10:54
  • 1
    Done and done. – Martin Scharrer Feb 7 '11 at 11:31

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.

| improve this answer | |
  • \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
  • 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

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 :).

| improve this answer | |
  • 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 1 '10 at 16:21
  • Yeah, the current situation is not much better than using \show on these macros. – Juan A. Navarro Nov 1 '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 1 '10 at 17:07

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.