# Where can I find a manual for learning the fundamental background of LaTeX source?

I would like to know if there is some manual from which I can learn the bases of LaTeX programming language. I need something universal, not related to some specific package or class, that at the end allow me to have a look at various source files, to understand the code in them and even to modified some file or to create my own source files of packages or classes.

I am not a beginner user of LaTeX. I have written a lot of documents using LaTeX with some standard classes and packages and with more exotic ones. What I want is not a manual that tells me how to write a document with LaTeX but how LaTeX works at its bases.

For example what are macros and how to use them, how to use command like \def, \if, \ifx, \fi, \global, \let, \relax, the key @, \DeclareOption, \begingroup, etc... (I have only open the file article.cls and check for command that I don't know..)

-
Have a look at this question What is the best book to start learning LaTeX? –  ach Jun 24 '13 at 14:41
@ach: I checked your link but there I find only manuals for "writing documents using LaTeX". Maybe my question is not so clear, I'll try to modify it –  Red Jun 24 '13 at 14:50
In which case, look at source2e.pdf, describing the LaTeX source in detail (found on most *TeX installation via texdoc source2e). –  ach Jun 24 '13 at 15:02
You're lucky: profs.sci.univr.it/~gregorio/introtex.pdf (in Italian) ;-) –  egreg Jun 24 '13 at 15:02
You can read the source code of TeXBook that is available from CTAN here. –  Oh my ghost Jun 24 '13 at 15:03

• Individual .dtx files for 'internal' commands (may have documentation, may just have code)
As such, there is no one document to read to understand programming LaTeX2e. One of the aims of the LaTeX3 Project is to provide a single programming layer for the future: expl3.