9

I've been using LaTeX for a few years for typesetting maths documents but I kind of feel there are two "kinds" of latex: the one I write my documents in and the one packages are written.

My goal is not to write a package, but trying to solve problems by my own. I often find myself searching for solutions to every problem I face and the answers always involve this syntax I'm talking about, full of @s, and things like \expandafter, \makeatletter, \makeatother, \catcode. Since I can't understant it, I simply copy it blindly.

What's the recommended resources for learning this not-so-basic latex stuff?

Ludovic C.
  • 8,888

2 Answers2

2

Read the TeXbook. You have to pay for it, but it's worth it: not only is it totally complete (even more so than TeX By Topic, recommended by mafp in the comments) but it is an instruction manual rather than a reference manual. It has one drawback: it documents the plain TeX format in addition to the actual base TeX language, and completely disregards LaTeX and other formats (as it rightfully should). Unfortunately, it makes no clear distinction between what is a built-in feature of TeX and what is defined by the format, whereas TBT does (by not addressing the format at all). In practice, this means that you should skim the main text once and then focus on the dangerous bend stuff, which is the reference material.

I have heard complaints that the TeXbook is too chatty or written with a poor style. The fact that it has a style at all does open it up to such criticisms, but also makes it possible for it to interface with the reader on an intuitive level. If your intuition differs from Knuth's, there is no shame, but TeX is an outrageously difficult language to understand so it may help to appreciate the slightly eccentric mind of its creator.

Ryan Reich
  • 37,958
  • Then, for LaTeX, one has to read the documented source source2e.pdf – egreg Jul 15 '13 at 13:42
  • @egreg: As a reference, yes. But it's not very well-written. I think the exam document class is very nicely constructed and may (as just one example) provide a better introduction. – Ryan Reich Jul 15 '13 at 15:13
0

LaTeX2e is very difficult to program in; I suggest you use the experimental versions of the LaTeX3 format. To load it, all you need is

\usepackage{expl3}

and documentation is available with texdoc expl3 and texdoc source3.

ChrisS
  • 13,529