Where are the separate .dtx files of the source2e.tex

I'm analyzing the source2e.tex file in an effort to better understand (La)TeX, and I see a load of separate `.dtx` files:

``````\DocInclude{ltdirchk} % System dependent initialisation
\DocInclude{ltplain}  % LaTeX version of Knuth's plain.tex
\DocInclude{ltvers}   % Current version date
\DocInclude{ltdefns}  % Initial definitions.
\DocInclude{ltalloc}  % Allocation of counters and others.
\DocInclude{ltcntrl}  % Program control macros.
\DocInclude{lterror}  % Error handling.
\DocInclude{ltpar}    % Paragraphs.
\DocInclude{ltspace}  % Spacing, line and page breaking.
\DocInclude{ltlogos}  % Logos.
\DocInclude{ltfiles}  % \input files and related commands
\DocInclude{ltoutenc} % Output encoding interface
\DocInclude{ltcounts} % Counters
\DocInclude{ltlength} % Lengths
\DocInclude{ltfssbas} % NFSS Base macros
\DocInclude{ltfsstrc} % NFSS Tracing (and tracefnt.sty)
\DocInclude{ltfsscmp} % NFSS1 Compatibility
\DocInclude{ltfssdcl} % NFSS Declarative interface
\DocInclude{ltfssini} % NFSS Initialisation
\DocInclude{fontdef}  % fonttext.ltx/fontmath.ltx
\DocInclude{ltfntcmd} % \textrm etc
\DocInclude{ltpageno} % Page numbering
\DocInclude{ltxref}   % Cross referencing
\DocInclude{ltmiscen} % Miscellaneous environment definitions.
\DocInclude{ltmath}   % Mathematics set up.
\DocInclude{ltlists}  % List and related environments
\DocInclude{ltboxes}  % Parbox and friends
\DocInclude{lttab}    % Tabbing tabular and array
\DocInclude{ltpictur} % Picture mode
\DocInclude{ltthm}    % Theorem environments
\DocInclude{ltsect}   % Sectioning
\DocInclude{ltfloat}  % Floats
\DocInclude{ltidxglo} % Index and Glossary
\DocInclude{ltbibl}   % Bibliography
\DocInclude{ltpage}   % \pagestyle \raggedbottom \sloppy
\DocInclude{ltoutput} % Output routine
\DocInclude{ltclass}  % Package & Class interface
\DocInclude{lthyphen} % Hyphenation (hyphen.ltx).
\DocInclude{ltluatex} % Luatex support
\DocInclude{ltfinal}  % Last minute initialisations and dump
``````

Where can I find them in my system? I already checked the MiKTeX 2.9 folder where I found most files I wanted so far (for instance, article.cls, geometry.sty).

• All are combined in `latex.ltx`, for example, if you prefer one single file – user31729 Apr 15 '18 at 8:48
• @ChristianHupfer I usually use latex.ltx but that is rather different, all the documentation is stripped out, it isn't "just" the dtx source files combined. – David Carlisle Apr 15 '18 at 8:59
• @DavidCarlisle i found the `source2e.tex` in `MiKTeX 2.9\tex\latex\base` - however there isn't a single `.dtx` file in there!? – Zac Apr 15 '18 at 9:04
• @DavidCarlisle: Yes, I know that the documentation is stripped. – user31729 Apr 15 '18 at 9:06
• @DavidCarlisle That's probably my fault: I'll adjust our build script to sort it! – Joseph Wright Apr 15 '18 at 9:09

The LaTeX2e kernel sources live inside `sources/latex/base`: you should be able to find them by doing for example
``````kpsewhich ltvers.dtx
at the Command Line (for me it gives `c:/texlive/2018/texmf-dist/source/latex/base/ltvers.dtx`).
There are multiple source files since the LaTeX kernel is big (current release is 8820 lines). There needs to be some logical structure to the sources, so they are split up into different areas. One sees the same in for example `expl3` or TikZ, and I'm also working on a similar split for `siunitx` for similar reasons.