%%
%% This is file `latex-lab-math.ltx',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% latex-lab-math.dtx (with options: `kernel')
%%
%% This is a generated file.
%%
%% Copyright 2021-2023 LaTeX Project
%%
%% This file was generated from file(s) of the `LaTeX-lab Bundle'.
%% ------------------------------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008 or later.
%%
%% This file may only be distributed together with a copy of the LaTeX
%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle'
%% without such generated files.
%%
%% The newest sources can be found below
%%
%% https://github.com/latex3/latex2e/required/latex-lab
%%
%% where one can also log issues in case there are any.
%%
%%
%% File: latex-lab-math.dtx
\def\ltlabmathdate{2024-04-16}
\def\ltlabmathversion{0.5j}
\ProvidesFile{latex-lab-math.ltx}
[\ltlabmathdate\space
v\ltlabmathversion\space
Grab all the math(s) and tag it (experiments)]
\AddToHook{begindocument/before}{\RequirePackage{latex-lab-testphase-block}}
\ExplSyntaxOn
\AddToHook{begindocument/before}{ \RequirePackage { amsmath } }
\bool_new:N \l__math_collected_bool
\bool_new:N \l__math_fakemath_bool
\tl_new:N \g__math_grabbed_env_tl
\tl_new:N \g__math_grabbed_math_tl
\tl_new:N \l__math_tmpa_tl
\skip_new:N \l__math_tmpa_skip
\tl_new:N \l__math_content_alt_tl
\tl_new:N \l__math_content_actual_tl
\tl_new:N \l__math_content_AF_source_tl
\tl_new:N \l__math_content_AF_source_tmpa_tl
\tl_new:N \l__math_content_AF_mathml_tl
\cs_new_protected:Npn \__tag_tool_close_P:
{
\tag_if_active:T
{
\tag_mc_end: %end P-chunk, should perhaps be \tag_mc_end_push: ...
\__tag_gincr_para_end_int:
\__tag_check_para_end_show:nn{red}{} %debug: show para
\tag_struct_end:
}
}
\tl_new:N\l__math_attribute_class_tl
\tagpdfsetup
{role/new-attribute = {inline} {/O /Layout /Placement/Inline},
role/new-attribute = {display} {/O /Layout /Placement/Block},
}
\bool_new:N\l__tag_math_texsource_AF_bool
\bool_new:N\l__tag_math_texsource_pane_bool
\bool_new:N\l__tag_math_mathml_AF_bool
\bool_new:N\g__tag_math_mathml_AF_bool
\bool_new:N\l__tag_math_mathml_pane_bool
\bool_new:N\l__tag_math_alt_bool
\int_new:N\g__math_mathml_total_int
\int_new:N\g__math_mathml_int
\int_new:N\g__math_math_total_int
\int_new:N\g__math_mathml_AF_found_int
\int_new:N\g__math_mathml_AF_attached_int
\clist_new:N\l__tag_math_mathml_files_clist
\clist_put_right:Ne\l__tag_math_mathml_files_clist {\c_sys_jobname_str-mathml}
\cs_new_protected:Npn \__math_AF_mml:nnnn #1 #2 #3 #4
{
\int_gincr:N \g__math_mathml_total_int
\tl_if_exist:cF { g__math_mathml_#3_tl }
{
\int_gincr:N \g__math_mathml_int
\pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(mathml-#1)}
\pdffile_embed_stream:nnN {#4}{mathml-#1.xml}\l__math_tmpa_tl
\bool_if:NT \l__tag_math_mathml_pane_bool
{\pdfmanagement_add:nne {Catalog/Names}{EmbeddedFiles}{\l__math_tmpa_tl}}
\tl_new:c{g__math_mathml_#3_tl}
\tl_gset_eq:cN{g__math_mathml_#3_tl}\l__math_tmpa_tl
}
}
\cs_new_protected:Npn \__math_AF_html_reader:w#1#2
#3
#4#5
#6