\iffalse meta-comment

File: cmdguide.tex

Copyright (C) 2026 The LaTeX Project

It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
license or (at your option) any later version.  The latest version
of this license is in the file

   https://www.latex-project.org/lppl.txt

This file is part of the "latex2e bundle" (The Work in LPPL)
and all files in that bundle must be distributed together.

The released version of this bundle is available from CTAN.

-----------------------------------------------------------------------

The development version of the bundle can be found at

   https://github.com/latex3/latex2e

for those people who are interested.

\fi

\documentclass{l3in2edoc}

\begin{document}

\title{\LaTeXe{} Interfaces}
\author{%
 The \LaTeX{} Project\thanks
   {%
     E-mail:
       \href{mailto:latex-team@latex-project.org}
         {latex-team@latex-project.org}%
   }%
}
\date{Released 2026-01-23}

\pagenumbering{roman}

\maketitle

\begin{abstract}
  This document contains user (and programmer) documentation for much of the
  \enquote{new} code added to the \LaTeX{} kernel in recent years. Over time,
  this coverage is expected to be expanded to include the majority of user
  commands defined in \texttt{latex.ltx}.
  
  The individual parts are written at different times and were originally meant
  to stand on their own. This means that explanations are not necessary in the
  most logical order, and there is some duplication. Headings are also somewhat
  inconsistent. We expect this to be sorted out over time, as material is
  revised to form a consistent whole.
\end{abstract}

\makeatletter
% l3doc is based on article, but for these very large documents we need
% chapters; the code is based on the standard classes but somewhat simplified.
% This code is identical to the version in source3body
\renewcommand\part{%
    \clearpage
  \thispagestyle{plain}%
  \@tempswafalse
  \null\vfil
  \secdef\@part\@spart}
\newcounter {chapter}
\numberwithin{section}{chapter}
\renewcommand \thechapter {\@arabic\c@chapter}
\renewcommand \thesection {\thechapter.\@arabic\c@section}
\newcommand*\chaptermark[1]{}
\setcounter{secnumdepth}{2}
\newcommand\@chapapp{\chaptername}
\newcommand\chaptername{Chapter}
  \def\ps@headings{%
    \let\@oddfoot\@empty
    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
    \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
            \@chapapp\ \thechapter. \ %
        \fi
        ##1}}}}
\newcommand\chapter{\clearpage
                    \thispagestyle{plain}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\refstepcounter{chapter}%
                    \typeout{\@chapapp\space\thechapter.}%
                    \addcontentsline{toc}{chapter}%
                      {\protect\numberline{\thechapter}#1}%
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \@makechapterhead{#2}%
                    \@afterheading}
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
   \huge\bfseries \@chapapp\space \thechapter
   \par\nobreak
   \vskip 20\p@
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\newcommand*\l@chapter[2]{%
  \ifnum \c@tocdepth >\m@ne
    \addpenalty{-\@highpenalty}%
    \vskip 1.0em \@plus\p@
    \setlength\@tempdima{1.5em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\hfil
      \nobreak\hb@xt@\@pnumwidth{\hss #2%
                                 \kern-\p@\kern\p@}\par
      \penalty\@highpenalty
    \endgroup
  \fi}
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.8em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
\def\partname{Part}
\def\toclevel@part{-1}
\def\maketitle{\chapter{\@title}}
\let\thanks\@gobble
\let\DelayPrintIndex\PrintIndex
\let\PrintIndex\@empty
\providecommand*{\hexnum}[1]{\text{\texttt{\char`\"}#1}}
\makeatother

\clearpage
\tableofcontents
% Disable TOC entirely past here
\clearpage
\protected\def\tableofcontents{}
\RenewDocumentEnvironment{abstract}{+b}{}{}
\pagenumbering{arabic}

\DisableImplementation

\part{Document commands}

\DocInput{ltcmd.dtx}

\part{Hooks}

\DocInput{lthooks.dtx}
\DocInput{ltfilehook.dtx}
\DocInput{ltcmdhooks.dtx}
\DocInput{ltpara.dtx}
\DocInput{ltshipout.dtx}

\part{Run data and page design}

\DocInput{ltmarks.dtx}
\DocInput{ltproperties.dtx}

\part{Design-level tools}

\DocInput{ltsockets.dtx}
\DocInput{lttemplates.dtx}

\clearpage

\begingroup
  \def\endash{--}
  \catcode`\-\active
  \def-{\futurelet\temp\indexdash}
  \def\indexdash{\ifx\temp-\endash\fi}
  \DelayPrintIndex
\endgroup

\end{document}
