diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/expl3/l3token.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3token.dtx | 89 |
1 files changed, 70 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/l3token.dtx b/Master/texmf-dist/source/latex/expl3/l3token.dtx index 43e8a4b5e81..1df1e08240d 100644 --- a/Master/texmf-dist/source/latex/expl3/l3token.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3token.dtx @@ -31,26 +31,21 @@ %% prior consultation with the LaTeX Project Team. %% %% ----------------------------------------------------------------------- -%<package>\RequirePackage{l3names} -%<*dtx> +%<*driver|package> +\RequirePackage{l3names} +%</driver|package> %\fi -\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{% - \def\fileversion{#2}% - \def\filedate{#3/#4/#5}% - \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]% -} -%\iffalse -%</dtx> -%\fi -\GetIdInfo$Id: l3token.dtx 578 2006-11-21 18:13:24Z morten $ +\GetIdInfo$Id: l3token.dtx 701 2007-11-27 14:21:05Z morten $ {L3 Experimental token investigation and manipulation} -% -% \iffalse +%\iffalse %<*driver> +%\fi +\ProvidesFile{\filename.\filenameext} + [\filedate\space v\fileversion\space\filedescription] +%\iffalse \documentclass{l3doc} - \begin{document} -\DocInput{l3token.dtx} +\DocInput{\filename.\filenameext} \end{document} %</driver> % \fi @@ -185,6 +180,28 @@ % \end{texnote} % \end{function} % +% \begin{function}{ +% \char_set_mathcode:nn | +% \char_set_mathcode:w | +% \char_gset_mathcode:nn | +% \char_gset_mathcode:w | +% \char_value_mathcode:n | +% \char_value_mathcode:w | +% \char_show_value_mathcode:n | +% \char_show_value_mathcode:w +% } +% \begin{syntax} +% "\char_set_mathcode:nn" "{"<char>"}" "{"<number>"}"\\ +% "\char_set_mathcode:w" <char> = <number> \\ +% "\char_value_mathcode:n" "{"<char>"}"\\ +% "\char_show_value_mathcode:n" "{"<char>"}" +% \end{syntax} +% Set the math code for <char>. +% \begin{texnote} +% "\char_set_mathcode:w" is the \TeX\ primitive \tn{mathcode} renamed. +% \end{texnote} +% \end{function} +% % % \subsection{Generic tokens} % @@ -739,6 +756,8 @@ % \subsection{Implementation} % First a few required packages to get this going. % \begin{macrocode} +%<package>\ProvidesExplPackage +%<package> {\filename}{\filedate}{\fileversion}{\filedescription} %<package>\RequirePackage{l3prg} %<package>\RequirePackage{l3int} %<*initex|package> @@ -770,6 +789,39 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\char_set_mathcode:w} +% \begin{macro}{\char_set_mathcode:nn} +% \begin{macro}{\char_gset_mathcode:w} +% \begin{macro}{\char_gset_mathcode:nn} +% \begin{macro}{\char_value_mathcode:w} +% \begin{macro}{\char_value_mathcode:n} +% \begin{macro}{\char_show_value_mathcode:w} +% \begin{macro}{\char_show_value_mathcode:n} +% Math codes. +% \begin{macrocode} +\let_new:NN \char_set_mathcode:w \tex_mathcode:D +\def_new:Npn \char_set_mathcode:nn #1#2{ + \char_set_mathcode:w #1 = \int_eval:n{#2} +} +\def_protected_new:Npn \char_gset_mathcode:w {\pref_global:D\tex_mathcode:D} +\def_new:Npn \char_gset_mathcode:nn #1#2{ + \char_gset_mathcode:w #1 = \int_eval:n{#2} +} +\def_new:Npn \char_value_mathcode:w {\int_use:N\tex_mathcode:D} +\def_new:Npn \char_value_mathcode:n #1{\char_value_mathcode:w \int_eval:n{#1}} +\def_new:Npn \char_show_value_mathcode:w {\tex_showthe:D\tex_mathcode:D} +\def_new:Npn \char_show_value_mathcode:n #1{ + \char_show_value_mathcode:w \int_eval:n{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \begin{macro}{\char_set_lccode:w} % \begin{macro}{\char_set_lccode:nn} % \begin{macro}{\char_value_lccode:w} @@ -1829,10 +1881,9 @@ % |\c_space_token|. % \begin{macrocode} \def_new:Npn \peek_execute_branches_charcode: { - \prg_if_predicate:nTF { - \prg_if_predicate_or_p:nn - {\token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token} - {\token_if_eq_meaning_p:NN \l_peek_token \c_space_token} + \predicate:nTF { + \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token || + \token_if_eq_meaning_p:NN \l_peek_token \c_space_token } { \l_peek_false_tlp } % \end{macrocode} |