I would recommend if you serious about learning about LaTeX and TeX to consider the learning stages of La(TeX), which I will describe in detail below, rather than just a selection of books. It is rather long and please excuse me if you find it boring, but by the end you will know why LaTeX3 will take a long time, before it becomes a standard!
The rookie@ stage
At this stage, you still haven't peeked under the hood and you are only interested in producing a beautiful document (you still haven't got a thesis, article or book published, so you only have a document)! You are up and running within an hour by reading the `Not so Short Introduction to Latex' and the use of some common packages. A few good classes are the memoir, tufte-latex, classic-thesis, koma script and of course your own Department's style, which you just hate but have to use.
The rookie@i stage
Your report does not look so good in certain places you want to start using hyperlinks and color and you discover packages like the xcolor Oh! my gosh I can typeset color by just typing the wavelength of light?
(If you are a physics student this is particularly good, especially if you insert a footnote or endnote that the book is typeset in minion pro using a main font color with a wavelength of 800 nm or 300 nm and hyperlinks with a wavelength of 450 nm). You are also excited that TeX typesets using the sp which is smaller than the visible wavelength of light.
Hyperref and everyone is talking about the soul and microtype package, let us try this out. I want more of these, how is it done after all I can program in Python, C++, Fortran etc.., this must be easy. You now forgot going out for a month to save some money and you buy the TeXBook and the LaTeX Companion but find both of them dated. You also discovered all the corners of the web that have anything to do with TeX and then there is CTAN which is like the Temple of TeX. It has anything from relics to new offerings! Read the package documentation, read the package and read the code listing as well. Even if it does not make much sense.
The rookie@ii stage
Now you read The Book. Catcodes? futurelet? afterassignment? afterexpand, noexpand Eh! where are the \section
, \bibliography
and citation stuff? You persevere, after reading thrice through a few chapters you run out of memory, that is your own memory!
TeX is like learning to speak a foreign language and although written in Pascal originally which was a beautiful language with only about 40 beautiful constructs TeX needs you to know about 150-300 hundred or so reserved words. Did I just say reserved? Not really, TeX can be re-written in TeX and folded over into any other language as it is Turing complete and if you are into functional programming you can read lamda
and see how you can have unbounded lists. At this stage you think the TeXbook was the wrong choice and go back to LaTeX. Typeset a few more items an article or too for your papers using your publishers template. You get a bit more adventurous and typeset your colleagues accented name using a \def
. Oh! my! this will take a bit longer. You also spent about two weeks trying to get a sombrero SimpleExamples plotted using TikZ
, only to think that there must be a quicker path to enlightment and you decide to go another route using Octave, but the output does not look so good, so you download psfrag and now know what an eps
file is and how to include it properly with the graphicx package, but it looks a bit odd where you placed it and you download the wrapfig package to wrap it between the text. Having finished it you decide you would rather have two sombrero's but the caption does not look right so you download the caption package and the subfig
package so that you can have the perfect layout, figures and captions! By now you can dish out a report.
The rookie@iii stage
It normally starts at the beginning of a break. Determined that since you have managed to solve all the sudoku puzzles on your phone and you have a good understanding of maths, TeX can be mastered - it is after all a typesetting engine (please don't say program or software or DTP). To understand catcode
you read the shortvrb
package documentation. Now it makes a bit more sense! You have a peek at the listings package to typeset your code (in Python and now you start clicking why in Python indentation is important), but you still cannot really say you understand it. After winning with catcode
, you want to move further, it always puzzled you why do you have csname
. How does it work? You stumble on the lipsum package after all you needed something that can produce sample text for all your experiments with TeX and LaTeX. Reading through the package documentation you can get a good understanding of csname as well as recursion and delimited macros
. So now you have variables that can have any letters in their definition, but outside csname
they can't? Hm.. you wonder why? And expandafter
still gives you problems.
The rookie@iv stage
Thankful that Knuth decided not to put a new version of TeX for the last 30 years or so - how could you else catch up with all the changes - the code has simmered internally and now you want more, as you are probably keeping a blog on the sideline you discover encoding schemes utf-08 and oh! my gosh I can have javascript in my pdfs! You read the code in animate
and movie15
. You also read DP story's AcroTeX. You also dubbing wih LuaTeX and have tried every flavour of TeX. This stage can take up to 49\% of your graduate years. At the end of this stage you will know what an ogonek
is, but probably have no use for it.
The rookie@v stage
People start phoning you up at 3h00 am to ask for your help to finish their paper. You are now a bit more serious, you have already passed the little beyond. You have a large collection of .sty
, .dtx
files and a directory listing of your hardisk shows something like a few thousand .tex
files, many called untitled-3.tex
etc. When your untitled
files number around 500 you can be sure that some light is at the end of the tunnel. You now determined to write a few packages yourself, but this will have to wait until your thesis is finished. Some lucky guys do this before their thesis finishes at the risk of seeing their supervisor retire before they officially submit their thesis.
You have now really mastered the one True fact of TeX that it only has one datatype and that is token lists
. AS you are now more into Computer Science - this will be true by now even if you study archaeology - you start reading through packages like TikZ
to see how they coerced a foreach
loop arrayjobx
for arrays and datatools
and you try once the LaTeX3 macros. This stage sometimes called the rapid learning stage can be quite fast and can take anything between a a year or two.
And since we are talking about time, if you are wondering how you can get the OS time with TeX there is always \time
which is not unix time but defined as the time that elapsed since midnight in hours. But as you probably want to also get the seconds that elapsed you will need to use pdfcreationtime
, which makes you go all the other way to read about the postcript
language and the pdf
standards which makes you wonder how did Adobe manage to convince the ISO committee to make a standard out of pdf
. So you decide just to use the packges datetime
or the datenumber
and you wonder into leap years and things like the Gregorian calendar.
But since maybe you are not a Computer Science student you just for fun typeset an article in phoenician
or plutoniko greek
or two pages from your family bible in blackletter or a chess board for a chess tournament using the skak fonts
.
The rookie@vi stage
You are now feeling again like a teenager, you are on top of the world and you know, you know everything and what you don't know you know you can master. You take another peek at LaTeX3, oh! my gosh! here we go again, what an alien syntax, you might as well been programmming in brainfuck all these years. You don't like the underscore and after taking a few years pondering if you need to leave a thinspace after a colon or not and discovering that the French not only have a 'space' named after them but also use it before and after a colon, you decide you want a bit more knowledge on typography and now you buy Bringhurst's Elements of Typography and you probably read some of Tufte's books.
Meanwhile, you are about to be kicked out of University not only because you haven't submitted your thesis but also because you picked arguments about your Department's Thesis style. You haven't worked so hard all these years to see your Magnus Opus be printed in double space. Just the thought of it makes you sick and stay in bed for a couple of days. Bored you read the TeXbook chapters randomly now starting from the last. Oh! well you always meant to read how the output routine and how floats worked, so you download the float
package and have a special float for my@Holiday@fotos
. Contemplating that their must be an easier way to do all these you decide its time to play around with Lua, so you have a break from TeX and you learn Lua. Compared to TeX this is a piece of cake and since you are not so worried about co-routines you learn Lua in two days. After that sense prevails you \obey@thelines
and submit your thesis having now doubled spaced it using the setspace
package. As it doubled with the double spacing it is now 1300 pages long and it gets returned for editing! At your girlfriends suggestion you remove four chapters by simply commenting the input
commands and scale all the figures using \scalebox
. As no-one wants to read your Thesis again you pass.
The rookie@vii stage
You now go out to have a drink, having successfully submitted your Thesis and while talking to your buddy about LaTeX you get strange looks from the girls sitting at the next table, who are probably thinking you are some foreigners with strange habits. With the 'high' gone you now feel like the author who just finished his diatribe on `How Many Angels can sit on a Pin-head' and decide to get a job. This is now an alien environment, everyone is talking deadlines and money and worst of all there is word everywhere and people are using Windows. You keep quite - remembering the girls in the pub and their strange looks.
Like someone persecuted for their religion you sneak out a report done in a jiffy with a hack of the LaTeX report class - sprinkled with about fifty packages and your own styles, only to have it returned by your boss telling you that it must be done in the Company style. You manage to talk your boss out of this and you occassionally use LaTex for a few years. You keep doing odds and ends using LaTeX and convert some people at work to use it. This can last for a few years and between different careers and jobs.
The master@i stage
You can now call yourself a master@i since just by finishing your PhD and working for a year gives you this right. You got married and have kids and while dating you have sent your wife poems written in LaTeX using the verse
package. TeX is just a hobby now - you just write most of your notes with it and you do what you do for a living.
This stage is never reached by academics as they perpetually iterate recursively between stage rookie@i and rookie@v, digging further and further into the details fractally. You have some good stuff - all unpublished and all waiting for the last polish to be published. You decide to gather all your notes into a book, which naturally would be written in a combination of LaTeX macros and TeX plus a couple of scripts on the side to help you manage all the information you have gathered. Now having spent about 10,000 hours on learning the ins-and-outs of TeX you are ready to face everything and you can call yourself an expert! Your eyes see variables like \@carcube
without being bothered by the @a
and more importantly know what they mean, you can do reals with high precision using the fp
package and you have written your own Euler problem TeX solutions with the answers formatted nicely with the numprint
package just for the fun of it.
The master@ii stage
Very few people reach this stage, as they need to be blessed by nature to do so. It is like being borne with an IQ high enough to enter Mensa at the age of ten. Longevity is not common; although people like Ray Kurzweil believe the Omega point is near and this gives you hope, because not only you know what the Omega point is, but you also have tried the alpha and the omega and you can also typeset the greek omega in any font possible. You can even design your own and just the thought of it, makes your day and you are now determined that since you are on retirement you can now pretty do whatever you like and you decide that after walking the dog to-morrow you will sit down and try and do that in a combination of METAFONT and Lua or METAPOST and Lua, you also have some ideas about some packages which you want to talk to your wife about it, but your daughter just phoned you to ask you how to typeset a phonetic symbol in LaTeX and you cannot answer it, how can you have missed this all these years and memory is again becoming a problem. You take a walk to the pub for a drink and you talk to your buddy about LaTeX and this time the girls at the next table don't bud an eye-lid. But by now having mastered the masterable parts of TeX and this has given you patience and wisdom and this does not bother you. You know TeXing is a journey. You decide to now try and understand the output routines better and you read the everyshi and everypage packages.
For the fun of it also you grab an old copy of a printout of the background
package and peek at the code as you can still remember they are all similar and somewhere in the garage you have three volumes of Salomon TeX Magnus Opum. At the backgound there is music and just for the fun of it you download the musixtex
package to see how it works! maybe you can change the fonts to True Type or Type 1 or Type 10! Life is good!
\number 42.
The master@iii stage
To be continued after one year \ldots\
or \elide
.
1 Note there are many different paths to learning TeX and different nodes. This post only describes one such path, other paths are for example `rookie_nnn:i etc., but that is not for me!