[latex3-commits] [latex3/latex2e] latex-lab/uf-review-05: update key names, WIP (410eb5ed)

github at latex-project.org github at latex-project.org
Fri Feb 9 17:14:47 CET 2024


Repository : https://github.com/latex3/latex2e
On branch  : latex-lab/uf-review-05
Link       : https://github.com/latex3/latex2e/commit/410eb5ed2da1fde07d1a7151fb306d1956eb4c41

>---------------------------------------------------------------

commit 410eb5ed2da1fde07d1a7151fb306d1956eb4c41
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri Feb 9 17:14:47 2024 +0100

    update key names, WIP


>---------------------------------------------------------------

410eb5ed2da1fde07d1a7151fb306d1956eb4c41
 required/latex-lab/latex-lab-math.dtx | 66 +++++++++++++++++------------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index 7ae547af..6eb3de06 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -237,15 +237,15 @@
 %  Formula structure:
 %  the \LaTeX\ source and a MathML representation. 
 %  Technically both can be attached---AF is an array
-%  if file references---practically there can be problems with PDF consumers as: 
-%  from the two consumer which handles currently AF-files, ngpdf used both and 
-%  so showed the equation twice (this has been corrected in the development version). 
-%  Foxit seemed to see only the first AF in the array (which means that 
-%  the source code should be attached as second file.)
+%  of file references---practically there can be problems with PDF consumers: 
+%  e.g. ngpdf used both and so showed the equation twice 
+%  (this has been corrected in the newest version) and 
+%  Foxit seems to see only the first AF in the array (so we attach the
+%  mathml as first file).
 %  
 %  The \LaTeX\ source can be (and is) attached automatically. 
-%  It can be suppressed by an option,
-%  \texttt{texsource/AF=false}, see below. 
+%  It can be suppressed by an option with
+%  \texttt{math/tex/AF=false}, see below. 
 %  
 %  For a MathML representation a file with such representations must be provided. 
 %  If the equation is numbered the numbering should be part of the MathML as 
@@ -297,15 +297,16 @@
 %  is a bit easier than keeping everything in memory and also means that 
 %  the snippets are one after the other in the PDF). 
 %  
-%  The MathML-AF can be suppressed for the equations in a group with |mathml/AF=false|, or
-%  completly by setting |mathml/setfiles=| in the preamble. 
+%  The MathML-AF can be suppressed for the equations in a group with 
+%  |math/mathml/AF=false|, or
+%  completly by setting |math/mathml/sources=| in the preamble. 
 %  
 %  Files embedded in a PDF can be listed in the attachments panel of a PDF viewer.
 %  This is probably not so useful for lots of small files (but one could create
 %  collections), but as long as PDF editors or viewers don't offer 
 %  proper support to access the AF it can help so have them there. The MathML are
 %  added by default, but the \LaTeX{} source not. This can be changed with
-%  |texsource/panel=true| (anywhere in the document) and |mathml/panel=false| (in the
+%  |viewer/pane/mathsource=true| (anywhere in the document) and |viewer/pane/mathml=false| (in the
 %  preamble, before the external file is read).  
 %  
 %  \subsection{Options}
@@ -542,6 +543,7 @@
 \tl_new:N \l_@@_content_alt_tl
 \tl_new:N \l_@@_content_actual_tl
 \tl_new:N \l_@@_content_AF_source_tl
+\tl_new:N \l_@@_content_AF_source_tmpa_tl
 \tl_new:N \l_@@_content_AF_mathml_tl
 %    \end{macrocode}
 % \end{variable}
@@ -579,18 +581,18 @@
 % Booleans to handle the options.
 % \begin{variable}{
 %   \l__tag_math_texsource_AF_bool,
-%   \l__tag_math_texsource_panel_bool,
+%   \l__tag_math_texsource_pane_bool,
 %   \l__tag_math_mathml_AF_bool,
 %   \g__tag_math_mathml_AF_bool,
-%   \l__tag_math_mathml_panel_bool,
+%   \l__tag_math_mathml_pane_bool,
 %   \l__tag_math_alt_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_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_panel_bool
+\bool_new:N\l__tag_math_mathml_pane_bool
 \bool_new:N\l__tag_math_alt_bool
 %    \end{macrocode}
 % \end{variable}
@@ -639,7 +641,7 @@
 %  not strictly necessary but makes the files visible in the file attachment 
 %  page 
 %    \begin{macrocode}
-       \bool_if:NT \l__tag_math_mathml_panel_bool
+       \bool_if:NT \l__tag_math_mathml_pane_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       
@@ -830,21 +832,13 @@
   {
    math/mathml/sources .clist_set:N = \l__tag_math_mathml_files_clist,
    math/alt/use       .bool_set:N = \l__tag_math_alt_bool,
-   viewer/pane/mathml      .bool_set:N = \l__tag_math_mathml_panel_bool,
+   viewer/pane/mathml      .bool_set:N = \l__tag_math_mathml_pane_bool,
    viewer/pane/mathml      .initial:n = true,
-   viewer/pane/mathsource  .bool_set:N = \l__tag_math_texsource_panel_bool, 
-   % math/mathml/AF % for lokal (!) deactivation
-   % math/tex/AF    % for lokal (!) deactivation 
-  } 
-%    \end{macrocode}
-% deprecated key names:
-%    \begin{macrocode}
-\keys_define:nn { __tag / setup }
-  {
-   math/mathml/setfiles .meta:n= {math/mathml/sources={#1}},
-   math/mathml/panel    .meta:n= {viewer/pane/mathml={#1}},   
-   math/texsource/panel .meta:n= {viewer/pane/mathsource={#1}},  
-   math/mathml/alt      .meta:n= {math/alt/use={#1}}, 
+   viewer/pane/mathsource  .bool_set:N = \l__tag_math_texsource_pane_bool, 
+   math/mathml/AF .bool_set:N = \l__tag_math_mathml_AF_bool,
+   math/mathm/AF  .initial:n = true,
+   math/tex/AF    .bool_set:N = \l__tag_math_texsource_AF_bool,
+   math/tex/AF    .initial:n = true
   } 
 %    \end{macrocode}
 %
@@ -1087,10 +1081,13 @@
   {tagsupport/math/struct/begin}
   {default}
   {
-   \tag_struct_begin:n
+    \bool_if:NTF\l__tag_math_texsource_AF_bool  
+     { \tl_set_eq:NN \l_@@_content_AF_source_tmpa_tl \l_@@_content_AF_source_tl }
+     { \tl_clear:N \l_@@_content_AF_source_tmpa_tl }
+    \tag_struct_begin:n
      {
        tag=Formula,
-       AFinline-o  = \l_@@_content_AF_source_tl,
+       texsource   = \l_@@_content_AF_source_tmpa_tl,
        title-o     = \g_@@_grabbed_env_tl,
        actualtext  = \l_@@_content_actual_tl,
        alt         = \l_@@_content_alt_tl
@@ -1108,7 +1105,7 @@
 % 
 % \begin{plugdecl}{test-mathml}
 % This (test-)socket tries to add a mathml-AF to formula. 
-% It is activated if a mathml.xml has been found and loaded. 
+% It is activated if a mathml.html has been found and loaded. 
 % Additionally it also sets an attribute 
 % (this can perhaps be done by default anyway.)
 % As it disturbs the reading of the AF it currently deactivates the /Alt key,
@@ -1152,13 +1149,16 @@
       \typeout{WARNING:~mathml~missing~for~hash~\l_@@_content_hash_tl}
     }    
    \socket_use:n {tagsupport/math/mathml/write} % write hash if request  
+    \bool_if:NTF\l__tag_math_texsource_AF_bool  
+     { \tl_set_eq:NN \l_@@_content_AF_source_tmpa_tl \l_@@_content_AF_source_tl }
+     { \tl_clear:N \l_@@_content_AF_source_tmpa_tl }   
    \tag_struct_begin:n
      {
        tag=Formula,
        attribute-class=\l_@@_attribute_class_tl, %
        AFref       = 
         \cs_if_exist_use:c {g__math_mathml_ \l_@@_content_hash_tl _tl},
-       texsource   = \l_@@_content_AF_source_tl, % should be after mathml AF!
+       texsource   = \l_@@_content_AF_source_tmpa_tl, % should be after mathml AF!
        title-o     = \g_@@_grabbed_env_tl,    %
        alt         = \l_@@_content_alt_tl
      }





More information about the latex3-commits mailing list.