[latex3-commits] [latex3/latex2e] latex-lab/uf-review-05: keys for AF, WIP (d856dfe7)
github at latex-project.org
github at latex-project.org
Mon Jan 8 20:00:28 CET 2024
Repository : https://github.com/latex3/latex2e
On branch : latex-lab/uf-review-05
Link : https://github.com/latex3/latex2e/commit/d856dfe7f75c0348815ae3146403ff7c1cfba4c2
>---------------------------------------------------------------
commit d856dfe7f75c0348815ae3146403ff7c1cfba4c2
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Jan 8 20:00:28 2024 +0100
keys for AF, WIP
>---------------------------------------------------------------
d856dfe7f75c0348815ae3146403ff7c1cfba4c2
required/latex-lab/latex-lab-math.dtx | 46 ++++++++++++++++++++++++++++++++---
1 file changed, 42 insertions(+), 4 deletions(-)
diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index 7e26c544..401e3583 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -257,7 +257,7 @@
% it must be adapted. \meta{mathml} is the MathML representation.
%
% By default the code tries at the begin of the document to read a file |\jobname-mathml.xml|.
-% The file name can be changed with |mathml/filelist={filename1,filename2}| (without extension,
+% The file name can be changed with |mathml/setfiles={filename1,filename2}| (without extension,
% |xml| is added automatically). If there is a list, all files are loaded.
% If a file doesn't exist it is ignored, only an info is written to the log.
%
@@ -536,8 +536,30 @@
% \end{macro}
%
% \subsection{Code related to AF}
+% Booleans to handle the options.
+% \begin{variable}{
+% \l__tag_math_texsource_AF_bool,
+% \l__tag_math_texsource_panel_bool,
+% \l__tag_math_mathml_AF_bool,
+% \l__tag_math_mathml_panel_bool
+% }
+% \begin{macrocode}
+\bool_new:N\l__tag_math_texsource_AF_bool
+\bool_new:N\l__tag_math_texsource_panel_bool
+\bool_new:N\l__tag_math_mathml_AF_bool
+\bool_new:N\l__tag_math_mathml_panel_bool
+% \end{macrocode}
+% \end{variable}
%
-% This internal variant of the \cs{mml} command
+% \begin{variable}{\l__tag_math_mathml_filelist_clist}
+% A sequence to store the file list for the mathml.
+% \begin{macrocode}
+\clist_new:N\l__tag_math_mathml_filelist_clist
+\clist_put_right:N\l__tag_math_mathml_filelist_clist{\c_sys_jobname_str-mathml}
+% \end{macrocode}
+% \end{variable}
+
+% This is the internal variant of the \cs{mml} command
% \begin{macrocode}
\cs_new_protected:Npn \@@_AF_mml:nnnn #1 #2 #3 #4
%#1 number, #2 tex source for debugging, #3 hash, #4 mathml
@@ -554,15 +576,31 @@
\pdffile_embed_stream:nnN {#4}{mathml-#1.xml}\l_tmpa_tl
% \end{macrocode}
% not strictly necessary but makes the files visible in the file attachment
-% page TODO add test for option
+% page
% \begin{macrocode}
- \pdfmanagement_add:nne {Catalog/Names}{EmbeddedFiles}{\l_tmpa_tl}
+ \bool_if:NT \__tag_math_mathml_panel_bool
+ {\pdfmanagement_add:nne {Catalog/Names}{EmbeddedFiles}{\l_tmpa_tl}}
\tl_new:c{g_@@_mathml_#3_tl}
\tl_gset_eq:cN{g_@@_mathml_#3_tl}\l_tmpa_tl
}
}
% \end{macrocode}
%
+% \subsection{Tagging options}
+% \begin{macrocode}
+\keys_define { __tag / setup }
+ {
+ math-tagging .code:n = { \keys_set:nn { math / tagging } { #1 }
+ }
+\keys_define { math / tagging }
+ {
+ mathml/setfiles .clist_set:N = \l__tag_math_mathml_filelist_clist,
+ mathml/panel .bool_set:N = \l__tag_math_mathml_panel_bool,
+ mathml/panel .initial:n = true,
+ texsource/panel .bool_set:N = \l__tag_math_texsource_panel_bool,
+ }
+% \end{macrocode}
+%
% \subsection{Sockets}
% \subsubsection{Main inline math sockets}
%
More information about the latex3-commits
mailing list.