diff options
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3cctab.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3cctab.dtx | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index 2cbe46be18..f4e8088e3d 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -52,7 +52,9 @@ % A category code table enables rapid switching of all category codes in % one operation. For \LuaTeX{}, this is possible over the entire Unicode % range. For other engines, only the $8$-bit range ($0$--$255$) is covered by -% such tables. +% such tables. The implementation of category code tables in \pkg{expl3} +% also saves and restores the \TeX{} \tn{endlinechar} primitive value, meaning +% they could be used for example to implement \cs{ExplSyntaxOn}. % % \section{Creating and initialising category code tables} % @@ -87,6 +89,15 @@ % can include a call to \cs{cctab_select:N}. % \end{function} % +% \begin{function}[added = 2023-05-26] +% {\cctab_gsave_current:N,\cctab_gsave_current:c} +% \begin{syntax} +% \cs{cctab_gsave_current:N} \meta{category code table} +% \end{syntax} +% Saves the current prevailing category codes in the +% \meta{category code table}. +% \end{function} +% % \section{Using category code tables} % % \begin{function}[updated = 2020-07-02]{\cctab_begin:N,\cctab_begin:c} @@ -141,19 +152,20 @@ % category code table. % \end{function} % -% \section{Constant category code tables} +% \section{Constant and scratch category code tables} % % \begin{variable}[updated = 2020-07-10]{\c_code_cctab} % Category code table for the \pkg{expl3} code environment; this does % \emph{not} include \texttt{@}, which is retained as an \enquote{other} -% character. +% character. Sets the \tn{endlinechar} value to $32$ (a space). % \end{variable} % % \begin{variable}[updated = 2020-07-08]{\c_document_cctab} % Category code table for a standard \LaTeX{} document, as set by the \LaTeX{} % kernel. In particular, the upper-half of the $8$-bit range will be set to % \enquote{active} with \pdfTeX{} \emph{only}. No \pkg{babel} shorthands -% will be activated. +% will be activated. Sets the \tn{endlinechar} value to $13$ (normal +% line ending). % \end{variable} % % \begin{variable}[updated = 2020-07-02]{\c_initex_cctab} @@ -162,13 +174,17 @@ % % \begin{variable}[updated = 2020-07-02]{\c_other_cctab} % Category code table where all characters have category code $12$ -% (other). +% (other). Sets the \tn{endlinechar} value to $-1$. % \end{variable} % % \begin{variable}[updated = 2020-07-02]{\c_str_cctab} % Category code table where all characters have category code $12$ % (other) with the exception of spaces, which have category code -% $10$ (space). +% $10$ (space). Sets the \tn{endlinechar} value to $-1$. +% \end{variable} +% +% \begin{variable}[added = 2023-05-26]{\g_tmpa_cctab, \g_tmpb_cctab} +% Scratch category code tables. % \end{variable} % % \end{documentation} @@ -363,6 +379,18 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\cctab_gsave_current:N, \cctab_gsave_current:c} +% Very simple. +% \begin{macrocode} +\cs_new_protected:Npn \cctab_gsave_current:N #1 + { + \@@_chk_if_valid:NT #1 + { \@@_gset:n {#1} } + } +\cs_generate_variant:Nn \cctab_gsave_current:N { c } +% \end{macrocode} +% \end{macro} +% % \subsection{Using category code tables} % % \begin{variable}{\g_@@_internal_cctab} @@ -864,6 +892,13 @@ % \end{macrocode} % \end{variable} % +% \begin{variable}{\g_tmpa_cctab, \g_tmpb_cctab} +% \begin{macrocode} +\cctab_new:N \g_tmpa_cctab +\cctab_new:N \g_tmpb_cctab +% \end{macrocode} +% \end{variable} +% % \subsection{Messages} % % \begin{macrocode} |