diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex index a1ef1a42851..18ee23a814c 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex @@ -182,4 +182,25 @@ argument is a single token, thus for example \end{verbatim} remains clear and can be used where appropriate. +\section{Private and internal functions} + +Private functions (those starting \cs{__}) should not be used between modules. +The only exception is where a \enquote{family} of modules share some +\enquote{internal} methods: this happens most obviously in the kernel itself. +Any internal functions or variables \emph{must} be documented in the same way +as public ones. + +The \pkg{l3docstrip} method should be used for internal functions in a module. +This requires a line +\begin{quote} + \ttfamily + \%<@@=\meta{module}> +\end{quote} +at the start of the source (\texttt{.dtx}) file, with internal functions +then written in the form +\begin{verbatim} + \cs_new_protected:Npn \@@_function:nn #1#2 + ... +\end{verbatim} + \end{document} |