I'm trying to read source2e.pdf
(texdoc source2e
on the command line), but I'm stumped. It seems a rather mysterious tome to me. As I understand from this answer about what arguments a command expects, a source file is somehow the de facto "complete reference" for LaTeX macros that a particular package provides. source2e.pdf
doesn't provide clues as to where to start reading. The beginning chapters ltdirchk.dtx
, ltplain.dtx
, etc. don't seem to help.
Are there guidelines on how to read source files? Or is there prerequisite knowledge that I might have missed? I'm familiar with the syntax, and I would like to know what options and arguments are available for a particular command.
In response to TH's answer:
I come from a programming background. I see that LaTeX has many elements of programming such as macros, commands, arguments, etc. So I'm approaching it the way I would learn a new programming language.
To put it simply:
If, in the course of tutorial, I read about italicizing text using \textit
. For some odd reason, the tutorial didn't mention how to make bold text. Instinctively as a programmer, I would want to look up a reference library, go to the Text Formatting section, then, "Aha! Here are all the macros for formatting text!". There, I'll find things like italicize, bold, underline, strikethrough, superscript, subscript, etc., as well as syntax guidelines and some live examples.
Another example:
When I learn that a particular package has an \author
macro, I'll say, "Aha! This package has capabilities to make writing front matter easier." So I would want to look up the reference library, then see all the other capabilities, like the date, or even specifying a separate title page.
About tutorials and reference libraries:
For me, tutorials are what I call a "linear" mode of learning, e.g. step-by-step or ouido. They make a good launch pad from which I learn what a particular tool is able to do. In my example above, I learned that LaTeX can italicize text. I think to myself "Oh, LaTeX can do some fancy text formatting, therefore it must be able to do other related things."
At this point, I switch to "hierarchical" mode of learning. I begin to classify the capabilities as Text Formatting, or Front Matter, then I'll know how to look for it in the reference library.
What I'm trying to get from reading commented sources:
I want to see how LaTeX macros are related to each other, then I'll be able to effectively use my "hierarchical" learning approach. Also have a look here (same link as at the beginning of the question). I want to be able to read through all the @
's and {#1}%
's and {#2}%
's. So I'm also looking for guidelines on what all those symbols mean.
\par
token; in state M, it produces a space token; in state S, it is ignored.%
at the end of the line inhibits the end of line character from taking effect.\par
token. Not state S.