Apply some protection

This commit is contained in:
Marcel Fabian Krüger 2021-06-22 17:40:09 +02:00
parent 09b8344549
commit 3decacd033

View File

@ -96,7 +96,7 @@
% is also saved in the \texttt{start\_math} node as with % is also saved in the \texttt{start\_math} node as with
% \cs{luamml_flag_save:}. % \cs{luamml_flag_save:}.
% \begin{macrocode} % \begin{macrocode}
\cs_new:Npn \luamml_flag_process: { \cs_new_protected:Npn \luamml_flag_process: {
\int_set:Nn \l__luamml_flag_int { 3 } \int_set:Nn \l__luamml_flag_int { 3 }
} }
% \end{macrocode} % \end{macrocode}
@ -117,17 +117,17 @@
% If the root element name is \texttt{mrow}, it will get suppressed in some % If the root element name is \texttt{mrow}, it will get suppressed in some
% cases. % cases.
% \begin{macrocode} % \begin{macrocode}
\cs_new:Npn \luamml_flag_save: { \cs_new_protected:Npn \luamml_flag_save: {
\int_set:Nn \l__luamml_flag_int { 1 } \int_set:Nn \l__luamml_flag_int { 1 }
} }
\cs_new:Npn \luamml_flag_save:N #1 { \cs_new_protected:Npn \luamml_flag_save:N #1 {
\int_set:Nn \l__luamml_flag_int { 17 + 32 * #1 } \int_set:Nn \l__luamml_flag_int { 17 + 32 * #1 }
} }
\cs_new:Npn \luamml_flag_save:n { \cs_new_protected:Npn \luamml_flag_save:n {
\int_set:Nn \l__luamml_flag_int { 5 } \int_set:Nn \l__luamml_flag_int { 5 }
\tl_set:Nn \l__luamml_root_tl \tl_set:Nn \l__luamml_root_tl
} }
\cs_new:Npn \luamml_flag_save:Nn #1 { \cs_new_protected:Npn \luamml_flag_save:Nn #1 {
\int_set:Nn \l__luamml_flag_int { 21 + 32 * #1 } \int_set:Nn \l__luamml_flag_int { 21 + 32 * #1 }
\tl_set:Nn \l__luamml_root_tl \tl_set:Nn \l__luamml_root_tl
} }
@ -137,7 +137,7 @@
% \begin{macro}{\luamml_flag_ignore:} % \begin{macro}{\luamml_flag_ignore:}
% Completely ignore the math mode material. % Completely ignore the math mode material.
% \begin{macrocode} % \begin{macrocode}
\cs_new:Npn \luamml_flag_ignore: { \cs_new_protected:Npn \luamml_flag_ignore: {
\int_set:Nn \l__luamml_flag_int { 0 } \int_set:Nn \l__luamml_flag_int { 0 }
} }
% \end{macrocode} % \end{macrocode}
@ -148,7 +148,7 @@
% elements. This only works if \pkg{tagpdf} has been loaded \emph{before} % elements. This only works if \pkg{tagpdf} has been loaded \emph{before}
% \texttt{luamml}. % \texttt{luamml}.
% \begin{macrocode} % \begin{macrocode}
\cs_new:Npn \luamml_flag_structelem: { \cs_new_protected:Npn \luamml_flag_structelem: {
\int_set:Nn \l__luamml_flag_int { 11 } \int_set:Nn \l__luamml_flag_int { 11 }
} }
% \end{macrocode} % \end{macrocode}
@ -164,7 +164,7 @@
% Only complete formulas get written into files (so formulas where % Only complete formulas get written into files (so formulas where
% \cs{luamml_flag_process:} or \cs{luamml_flag_structelem:} are in effect). % \cs{luamml_flag_process:} or \cs{luamml_flag_structelem:} are in effect).
% \begin{macrocode} % \begin{macrocode}
\cs_new:Npn \luamml_set_filename:n { \cs_new_protected:Npn \luamml_set_filename:n {
\tl_set:Nn \l__luamml_filename_tl \tl_set:Nn \l__luamml_filename_tl
} }
% \end{macrocode} % \end{macrocode}
@ -211,12 +211,12 @@
% an application of the first one to load packages following \texttt{luamml}'s % an application of the first one to load packages following \texttt{luamml}'s
% naming scheme for these patch packages. % naming scheme for these patch packages.
% \begin{macrocode} % \begin{macrocode}
\cs_new:Npn \__luamml_patch_package:nn #1 #2 { \cs_new_protected:Npn \__luamml_patch_package:nn #1 #2 {
\@ifpackageloaded {#1} {#2} { \@ifpackageloaded {#1} {#2} {
\hook_gput_code:nnn {package/after/#1} {luamml} {#2} \hook_gput_code:nnn {package/after/#1} {luamml} {#2}
} }
} }
\cs_new:Npn \__luamml_patch_package:n #1 { \cs_new_protected:Npn \__luamml_patch_package:n #1 {
\__luamml_patch_package:nn {#1} { \__luamml_patch_package:nn {#1} {
\RequirePackage { luamml-patches-#1 } \RequirePackage { luamml-patches-#1 }
} }