%% %% This is file `luamml.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% luamml.dtx (with options: `package,luatex') %% %% IMPORTANT NOTICE: %% %% For the copyright see the source file. %% %% Any modified versions of this file must be renamed %% with new filenames distinct from luamml.sty. %% %% For distribution of the original source see the terms %% for copying and modification in the file luamml.dtx. %% %% This generated file may be distributed as long as the %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% Copyright (C) 2020-2024 by Marcel Krueger %% %% This file 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.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. \ProvidesExplPackage {luamml} {2024-08-14} {0.1.0} {Automatically generate presentational MathML from LuaTeX math expressions} \int_new:N \l__luamml_flag_int \int_new:N \l__luamml_pretty_int \tl_new:N \l__luamml_filename_tl \tl_new:N \l__luamml_root_tl \tl_set:Nn \l__luamml_root_tl { mrow } \tl_new:N \l__luamml_label_tl \int_new:N \tracingmathml \int_set:Nn \l__luamml_pretty_int { 1 } \lua_now:n { require'luamml-tex' } \hook_new_with_args:nn { luamml / converted } { 1 } \cs_new_protected:Npn \__luamml_output_hook:n { \hook_use:nnw { luamml / converted } { 1 } } \__luamml_register_output_hook:N \__luamml_output_hook:n \cs_new_protected:Npn \luamml_flag_process: { \tl_set:Nn \l__luamml_label_tl {} \int_set:Nn \l__luamml_flag_int { 3 } } \cs_new:Npn \__luamml_maybe_structelem: { ( 8 * \int_mod:nn { \int_div_truncate:nn { \l__luamml_flag_int } {8} } {2} ) + } \cs_new:Npn \__luamml_style_to_num:N #1 { 32 * #1 } \cs_new_protected:Npn \luamml_flag_save:n #1 { \tl_set:Nn \l__luamml_label_tl {#1} \int_set:Nn \l__luamml_flag_int { \__luamml_maybe_structelem: 1 } } \cs_new_protected:Npn \luamml_flag_save:nN #1#2 { \tl_set:Nn \l__luamml_label_tl {#1} \int_set:Nn \l__luamml_flag_int { \__luamml_maybe_structelem: 17 + \__luamml_style_to_num:N #2 } } \cs_new_protected:Npn \luamml_flag_save:nn #1 { \tl_set:Nn \l__luamml_label_tl {#1} \int_set:Nn \l__luamml_flag_int { \__luamml_maybe_structelem: 5 } \tl_set:Nn \l__luamml_root_tl } \cs_new_protected:Npn \luamml_flag_save:nNn #1#2 { \tl_set:Nn \l__luamml_label_tl {#1} \int_set:Nn \l__luamml_flag_int { \__luamml_maybe_structelem: 21 + \__luamml_style_to_num:N #2 } \tl_set:Nn \l__luamml_root_tl } \cs_new_protected:Npn \luamml_flag_ignore: { \int_set:Nn \l__luamml_flag_int { 0 } } \cs_new_protected:Npn \luamml_flag_structelem: { \tl_set:Nn \l__luamml_label_tl {} \int_set:Nn \l__luamml_flag_int { 11 } } \cs_new_protected:Npn \luamml_set_filename:n { \tl_set:Nn \l__luamml_filename_tl } \luamml_flag_process: \cs_new_protected:Npn \luamml_annotate:nen #1#2#3 { \__luamml_annotate_begin: #3 \__luamml_annotate_end:we \tex_numexpr:D #1 \scan_stop: {#2} } \cs_new_protected:Npn \luamml_annotate:en #1#2 { \__luamml_annotate_begin: #2 \__luamml_annotate_end:e {#1} } \cs_new_eq:NN \luamml_pdf_write: \scan_stop: \cs_new_protected:Npn \__luamml_patch_package:nn #1 #2 { \@ifpackageloaded {#1} {#2} { \hook_gput_code:nnn {package/#1/after} {luamml} {#2} } } \cs_new_protected:Npn \__luamml_patch_package:n #1 { \__luamml_patch_package:nn {#1} { \RequirePackage { luamml-patches-#1 } } } \RequirePackage { luamml-patches-kernel } \__luamml_patch_package:n {amstext} \__luamml_patch_package:n {amsmath} \__luamml_patch_package:n {array} \endinput %% %% End of file `luamml.sty'.