texlive[72093] Master/texmf-dist: latex-lab-dev (23aug24)

commits+karl at tug.org commits+karl at tug.org
Fri Aug 23 22:59:29 CEST 2024


Revision: 72093
          https://tug.org/svn/texlive?view=revision&revision=72093
Author:   karl
Date:     2024-08-23 22:59:29 +0200 (Fri, 23 Aug 2024)
Log Message:
-----------
latex-lab-dev (23aug24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-amsmath.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-bib.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-block.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-firstaid.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-float.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-footnotes.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-graphic.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-marginpar.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-math.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathpkg.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathtools.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-minipage.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-namespace.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-1.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-2.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-sec.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-table.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-testphase.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-text.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-title.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-kernel-changes.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc.pdf
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md	2024-08-23 20:59:06 UTC (rev 72092)
+++ trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md	2024-08-23 20:59:29 UTC (rev 72093)
@@ -1,6 +1,6 @@
 # LaTeX laboratory
 
-Release 2024-11-01 pre-release 2
+Release 2024-11-01 pre-release 3
 
 ## Overview
 

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt	2024-08-23 20:59:06 UTC (rev 72092)
+++ trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt	2024-08-23 20:59:29 UTC (rev 72093)
@@ -1,3 +1,10 @@
+2024-08-22 Joseph Wright <Joseph.Wright at latex-project.org>
+	* latex-lab-math.dtx: correct handling of empty math processing
+
+2024-08-21 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-math.dtx: correct luamml patches for array,
+	  allow to use luamml without unicode-math
+
 2024-08-14 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
 	* latex-lab-math.dtx: add luamml support for automatic mathml generation
 

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-amsmath.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-bib.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-block.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-firstaid.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-float.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-footnotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-graphic.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-marginpar.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-math.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathpkg.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathtools.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-minipage.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-namespace.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-2.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-sec.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-table.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-testphase.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-text.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-title.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-kernel-changes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx	2024-08-23 20:59:06 UTC (rev 72092)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx	2024-08-23 20:59:29 UTC (rev 72093)
@@ -19,8 +19,8 @@
 % for those people who are interested or want to report an issue.
 %
 %
-\def\ltlabmathdate{2024-08-14}
-\def\ltlabmathversion{0.6b}
+\def\ltlabmathdate{2024-08-22}
+\def\ltlabmathversion{0.6c}
 %
 %<*driver>
 \documentclass{l3doc}
@@ -327,11 +327,15 @@
 %  \subsection{Automatic mathml creation with luamml}\label{sec:luamml}
 %  
 %  If lualatex is used, if the package \texttt{unicode-math} is used
-%  and if the package \texttt{luamml} is found\footnote{Until it is 
-%  on CTAN and it must be installed from \url{https://github.com/zauguin/luamml}.}
-%  then it will automatically generate the file |\jobname-luamml-mathml.html| with mathml representations
-%  of all math formulas.
+%  and if the package \texttt{luamml} is found
+%  then it will automatically generate the file |\jobname-luamml-mathml.html| 
+%  with mathml representations of all math formulas.
 %  The generation of the file can be suppressed with |math/mathml/luamml=false|.
+%  If \texttt{unicode-math} is not used, 
+%  the generation of the file can be forced 
+%  with |math/mathml/luamml=true| or |math/mathml/luamml| but be aware that
+%  it is then probable that various symbols are mapped to the wrong unicode code
+%  points.
 %  The package is still quite experimental and the output should be checked. 
 %  The |\jobname-luamml-mathml.html| file may be previewed in a browser although 
 %  you may need to add additional css or javascript declarations 
@@ -618,8 +622,11 @@
 %   \g__tag_math_mathml_AF_bool,
 %   \l__tag_math_mathml_pane_bool,
 %   \l__tag_math_alt_bool,
-%   \g__tag_math_luamml_bool,
+%   \g__tag_math_luamml_tl,
 % }
+% The variable \cs{g__tag_math_luamml_tl} is initially 0 and
+% the user key can set it to -1 or 1. This allows to distinguish
+% the unset case from a value set by the user.
 %    \begin{macrocode}
 \bool_new:N\l__tag_math_texsource_AF_bool
 \bool_new:N\l__tag_math_texsource_pane_bool
@@ -627,8 +634,8 @@
 \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
-\bool_new:N\g__tag_math_luamml_bool
-\bool_gset_true:N \g__tag_math_luamml_bool
+\tl_new:N\g__tag_math_luamml_tl
+\tl_gset:Nn\g__tag_math_luamml_tl {0}
 %    \end{macrocode}
 % \end{variable}
 % 
@@ -784,23 +791,140 @@
    \file_if_exist:nT { luamml.sty }
      {
        \RequirePackage  { luamml }
+%    \end{macrocode}
+% Temporary (!) fixes for endarray 
+%    \begin{macrocode}
+       \AddToHook{package/array/after}
+        {
+          \cs_set:Npn \endarray 
+           {
+             \tbl_crcr:n{endarray}
+             \__luamml_array_save_array:
+             \egroup
+             \UseTaggingSocket{tbl/finalize}
+             \tbl_restore_outer_cell_data: 
+             \egroup
+             \mode_if_math:T { \__luamml_array_finalize_array: }
+             \@arrayright
+             \gdef \@preamble {}
+           }
+         \cs_set:Npn \@classz 
+           {
+            \@classx
+            \@tempcnta \count@
+            \prepnext at tok
+            \@addtopreamble {
+              \ifcase \@chnum
+                \hfil
+                \hskip 1sp
+                \d at llarbegin
+                \cs_if_eq:NNTF \d at llarbegin \begingroup {
+                  \insert at column
+                  \d at llarend
+                } {
+                  \__luamml_array_init_col:
+                  \insert at column
+                  \luamml_flag_save:nn {} {mtd}
+                  \d at llarend
+                  \__luamml_array_finalize_col:w 0~
+                }
+                \do at row@strut
+                \hfil
+              \or
+                \hskip 1sp
+                \d at llarbegin
+                \cs_if_eq:NNTF \d at llarbegin \begingroup {
+                  \insert at column
+                  \d at llarend
+                } {
+                  \__luamml_array_init_col:
+                  \insert at column
+                  \luamml_flag_save:nn {} {mtd}
+                  \d at llarend
+                  \__luamml_array_finalize_col:w 1~
+                }
+                \do at row@strut
+                \hfil
+              \or
+                \hfil
+                \hskip 1sp
+                \d at llarbegin
+                \cs_if_eq:NNTF \d at llarbegin \begingroup {
+                  \insert at column
+                  \d at llarend
+                } {
+                  \__luamml_array_init_col:
+                  \insert at column
+                  \luamml_flag_save:nn {} {mtd}
+                  \d at llarend
+                  \__luamml_array_finalize_col:w 2~
+                }
+                \do at row@strut
+              \or
+                \setbox \ar at mcellbox \vbox \@startpbox { \@nextchar }
+                  \insert at pcolumn
+                \@endpbox
+                \ar at align@mcell
+                \do at row@strut
+              \or
+                \vtop \@startpbox { \@nextchar }
+                  \insert at pcolumn
+                \@endpbox
+                \do at row@strut
+              \or
+                \vbox \@startpbox { \@nextchar }
+                  \insert at pcolumn
+                \@endpbox
+                \do at row@strut
+              \fi
+            }
+            \prepnext at tok
+          }          
+        }  
+%    \end{macrocode}
+%
+%    \begin{macrocode}
        \AddToHook{begindocument/end}
          { 
-           \bool_if:NT \g__tag_math_luamml_bool 
+           \str_case:on \g__tag_math_luamml_tl 
              { 
-               \@ifpackageloaded { unicode-math }
-                 { \@@_luamml_activate_write: }
-                 { \msg_warning:nn { tag }{ unicode-math-missing } }               
+               { 1 } { 
+                       \@@_luamml_activate_write:
+                       \msg_note:nnnn { tag } 
+                         { luamml-status }{ enabled }{ create }
+                     }
+               {-1 } { 
+                       \msg_note:nnnn { tag } 
+                         { luamml-status }{ disabled }{ not~create } 
+                     }
+               { 0 } 
+               {  
+                 \@ifpackageloaded { unicode-math }
+                  { 
+                    \@@_luamml_activate_write: 
+                    \msg_note:nnnn { tag } 
+                      { luamml-status }{ enabled }{ create }
+                  }
+                  { \msg_warning:nn { tag }{ unicode-math-missing } } 
+               }                
              } 
          }
      }
  }
+\msg_new:nnn { tag }{ luamml-status } 
+  {
+    luamml~has~been~#1~and~will~#2~an~MathML~file.
+  } 
+ 
 \msg_new:nnn { tag }{ unicode-math-missing } 
   {
     The~package~unicode-math~is~missing\\
     luamml~will~not~create~an~MathML~file.\\
-    To~avoid~this~warning~load~unicode-math~or~disable~luamml\\
-    with~\tl_to_str:n{\tagpdfsetup{math/mathml/luamml=false}}
+    To~avoid~this~warning~load~unicode-math~\\
+    or~disable~luamml~with~\\
+    \tl_to_str:n{\tagpdfsetup{math/mathml/luamml=false}}\\
+    or~force~luamml~with~\\
+    \tl_to_str:n{\tagpdfsetup{math/mathml/luamml=true}}
   } 
 \cs_new_protected:Npn \@@_luamml_activate_write:
  {
@@ -853,7 +977,10 @@
 
 \keys_define:nn { __tag / setup }
    {
-     math/mathml/luamml .bool_gset:N = \g__tag_math_luamml_bool,
+     math/mathml/luamml .choice: ,
+     math/mathml/luamml/true  .code:n = {\tl_gset:Nn \g__tag_math_luamml_tl{1}},
+     math/mathml/luamml/false .code:n = {\tl_gset:Nn \g__tag_math_luamml_tl{-1}},
+     math/mathml/luamml .default:n = true,
      math/mathml/luamml .usage:n=preamble 
    }
 %    \end{macrocode}
@@ -1508,6 +1635,7 @@
 %
 % \begin{macro}{\@@_grab_dollar:w}
 % \begin{macro}{\@@_grab_dollar:n}
+% \changes{v0.6c}{2024-08-22}{Correct handling of empty math segments}
 %   Top-level function to handle grabbing of inline math mode delimited by
 %   |$| tokens. We provide two different ways to do that: a token-by-token
 %   one that can be used everywhere, and a fast delimited one that does not
@@ -1523,28 +1651,30 @@
 \cs_new_protected:Npn \@@_grab_dollar:n #1
   {
 %    \end{macrocode}
-%   To avoid further work with entirely empty math segments, we test before
-%   doing anything more.
+%  We need to do processing first as this picks up \enquote{fake} math mode:
+%  that information is needed below.
 %    \begin{macrocode}
-    \tl_if_blank:nF {#1}
-      {
-        \@@_process:nn { math } {#1} % $
+    \@@_process:nn { math } {#1}
 %    \end{macrocode}
 %  We do not want math tagging in fakemath or when measuring,
 %  We also do not want math tagging if tagging has been suspended.
 %    \begin{macrocode}
-      \bool_lazy_or:nnTF 
-        {\legacy_if_p:n { measuring@ }}
-        { \l_@@_fakemath_bool }
-        { #1 $ }
+      \bool_lazy_any:nTF 
         {
+          {\legacy_if_p:n { measuring@ }}
+          { \l_@@_fakemath_bool }
+          { \tl_if_blank_p:n {#1} }
+        }
+        {
+          #1 $ % $
+        }
+        {
             \tag_socket_use:n  {math/inline/begin} %end P-MC  
             \tag_socket_use:nn {math/inline/formula/begin}{#1}
-             $
+            $ % $
             \tag_socket_use:n  {math/inline/formula/end}
             \tag_socket_use:n  {math/inline/end} % restart P-MC
-        }         
-      }
+        }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -1570,8 +1700,8 @@
         \@@_process:nn { equation* } {#1}
         \socket_use:n {tagsupport/math/display/begin}
         \socket_use:nn{tagsupport/math/display/formula/begin}{#1}
-        $$
       }
+    $$
   }
 %    \end{macrocode}
 % 

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx	2024-08-23 20:59:06 UTC (rev 72092)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx	2024-08-23 20:59:29 UTC (rev 72093)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-math.dtx
-\def\ltlabmathdate{2024-08-14}
-\def\ltlabmathversion{0.6b}
+\def\ltlabmathdate{2024-08-22}
+\def\ltlabmathversion{0.6c}
 \ProvidesFile{latex-lab-math.ltx}
              [\ltlabmathdate\space
               v\ltlabmathversion\space
@@ -75,8 +75,8 @@
 \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
-\bool_new:N\g__tag_math_luamml_bool
-\bool_gset_true:N \g__tag_math_luamml_bool
+\tl_new:N\g__tag_math_luamml_tl
+\tl_gset:Nn\g__tag_math_luamml_tl {0}
 \int_new:N\g__math_mathml_total_int
 \int_new:N\g__math_mathml_int
 \int_new:N\g__math_math_total_int
@@ -154,23 +154,134 @@
    \file_if_exist:nT { luamml.sty }
      {
        \RequirePackage  { luamml }
+       \AddToHook{package/array/after}
+        {
+          \cs_set:Npn \endarray
+           {
+             \tbl_crcr:n{endarray}
+             \__luamml_array_save_array:
+             \egroup
+             \UseTaggingSocket{tbl/finalize}
+             \tbl_restore_outer_cell_data:
+             \egroup
+             \mode_if_math:T { \__luamml_array_finalize_array: }
+             \@arrayright
+             \gdef \@preamble {}
+           }
+         \cs_set:Npn \@classz
+           {
+            \@classx
+            \@tempcnta \count@
+            \prepnext at tok
+            \@addtopreamble {
+              \ifcase \@chnum
+                \hfil
+                \hskip 1sp
+                \d at llarbegin
+                \cs_if_eq:NNTF \d at llarbegin \begingroup {
+                  \insert at column
+                  \d at llarend
+                } {
+                  \__luamml_array_init_col:
+                  \insert at column
+                  \luamml_flag_save:nn {} {mtd}
+                  \d at llarend
+                  \__luamml_array_finalize_col:w 0~
+                }
+                \do at row@strut
+                \hfil
+              \or
+                \hskip 1sp
+                \d at llarbegin
+                \cs_if_eq:NNTF \d at llarbegin \begingroup {
+                  \insert at column
+                  \d at llarend
+                } {
+                  \__luamml_array_init_col:
+                  \insert at column
+                  \luamml_flag_save:nn {} {mtd}
+                  \d at llarend
+                  \__luamml_array_finalize_col:w 1~
+                }
+                \do at row@strut
+                \hfil
+              \or
+                \hfil
+                \hskip 1sp
+                \d at llarbegin
+                \cs_if_eq:NNTF \d at llarbegin \begingroup {
+                  \insert at column
+                  \d at llarend
+                } {
+                  \__luamml_array_init_col:
+                  \insert at column
+                  \luamml_flag_save:nn {} {mtd}
+                  \d at llarend
+                  \__luamml_array_finalize_col:w 2~
+                }
+                \do at row@strut
+              \or
+                \setbox \ar at mcellbox \vbox \@startpbox { \@nextchar }
+                  \insert at pcolumn
+                \@endpbox
+                \ar at align@mcell
+                \do at row@strut
+              \or
+                \vtop \@startpbox { \@nextchar }
+                  \insert at pcolumn
+                \@endpbox
+                \do at row@strut
+              \or
+                \vbox \@startpbox { \@nextchar }
+                  \insert at pcolumn
+                \@endpbox
+                \do at row@strut
+              \fi
+            }
+            \prepnext at tok
+          }
+        }
        \AddToHook{begindocument/end}
          {
-           \bool_if:NT \g__tag_math_luamml_bool
+           \str_case:on \g__tag_math_luamml_tl
              {
-               \@ifpackageloaded { unicode-math }
-                 { \__math_luamml_activate_write: }
-                 { \msg_warning:nn { tag }{ unicode-math-missing } }
+               { 1 } {
+                       \__math_luamml_activate_write:
+                       \msg_note:nnnn { tag }
+                         { luamml-status }{ enabled }{ create }
+                     }
+               {-1 } {
+                       \msg_note:nnnn { tag }
+                         { luamml-status }{ disabled }{ not~create }
+                     }
+               { 0 }
+               {
+                 \@ifpackageloaded { unicode-math }
+                  {
+                    \__math_luamml_activate_write:
+                    \msg_note:nnnn { tag }
+                      { luamml-status }{ enabled }{ create }
+                  }
+                  { \msg_warning:nn { tag }{ unicode-math-missing } }
+               }
              }
          }
      }
  }
+\msg_new:nnn { tag }{ luamml-status }
+  {
+    luamml~has~been~#1~and~will~#2~an~MathML~file.
+  }
+
 \msg_new:nnn { tag }{ unicode-math-missing }
   {
     The~package~unicode-math~is~missing\\
     luamml~will~not~create~an~MathML~file.\\
-    To~avoid~this~warning~load~unicode-math~or~disable~luamml\\
-    with~\tl_to_str:n{\tagpdfsetup{math/mathml/luamml=false}}
+    To~avoid~this~warning~load~unicode-math~\\
+    or~disable~luamml~with~\\
+    \tl_to_str:n{\tagpdfsetup{math/mathml/luamml=false}}\\
+    or~force~luamml~with~\\
+    \tl_to_str:n{\tagpdfsetup{math/mathml/luamml=true}}
   }
 \cs_new_protected:Npn \__math_luamml_activate_write:
  {
@@ -210,7 +321,10 @@
 
 \keys_define:nn { __tag / setup }
    {
-     math/mathml/luamml .bool_gset:N = \g__tag_math_luamml_bool,
+     math/mathml/luamml .choice: ,
+     math/mathml/luamml/true  .code:n = {\tl_gset:Nn \g__tag_math_luamml_tl{1}},
+     math/mathml/luamml/false .code:n = {\tl_gset:Nn \g__tag_math_luamml_tl{-1}},
+     math/mathml/luamml .default:n = true,
      math/mathml/luamml .usage:n=preamble
    }
 \socket_new:nn {tagsupport/math/mathml/write}{0}
@@ -611,21 +725,23 @@
 \cs_new_protected:Npn \__math_grab_dollar:w { \__math_grab_dollar_delim:w }
 \cs_new_protected:Npn \__math_grab_dollar:n #1
   {
-    \tl_if_blank:nF {#1}
-      {
-        \__math_process:nn { math } {#1} % $
-      \bool_lazy_or:nnTF
-        {\legacy_if_p:n { measuring@ }}
-        { \l__math_fakemath_bool }
-        { #1 $ }
+    \__math_process:nn { math } {#1}
+      \bool_lazy_any:nTF
         {
+          {\legacy_if_p:n { measuring@ }}
+          { \l__math_fakemath_bool }
+          { \tl_if_blank_p:n {#1} }
+        }
+        {
+          #1 $ % $
+        }
+        {
             \tag_socket_use:n  {math/inline/begin} %end P-MC
             \tag_socket_use:nn {math/inline/formula/begin}{#1}
-             $
+            $ % $
             \tag_socket_use:n  {math/inline/formula/end}
             \tag_socket_use:n  {math/inline/end} % restart P-MC
         }
-      }
   }
 \cs_new_protected:Npn \__math_grab_dollar_delim:w #1 $ % $
   { \__math_grab_dollar:n {#1} }
@@ -637,8 +753,8 @@
         \__math_process:nn { equation* } {#1}
         \socket_use:n {tagsupport/math/display/begin}
         \socket_use:nn{tagsupport/math/display/formula/begin}{#1}
-        $$
       }
+    $$
   }
 \cs_new_protected:Npn \__math_tag_dollardollar_display_end:
   {



More information about the tex-live-commits mailing list.