I've read the LaTeX Companion and the TeXbook, but I am still struggling to understand how LaTeX works.
- How
\DeclareOption
works? - Why should I end some lines with
%
? - How penalty works?
- Where
\if@twoside
is declared? - What does mean
\c@tocdepth >\z@
? - What is the philosophy behind the
@
letter? - ...
Is there any source of information (books, tutorials, advanced courses) that can help me not to use LaTeX but understand how LaTeX is built and how it works?
texdoc source2e
for most of those questions. Some lines should be ended with%
to avoid spurious spaces (see this post).@
was chosen as "internal" letter probably becauseplain.tex
uses it too, but before that the internal letter was~
– Phelype Oleinik Feb 7 at 17:15%
). If you want to program your own package or documentclass then some things you mention here may be useful but others are still unnecessary. Only if you are doing research into programming languages or if you want to reimplement the kernel or something similar then knowing things like this can help you further, but most people can safely stay away from the internals I guess. – Marijn Feb 7 at 17:57