[latex3-commits] [latex3/latex2e] latex-lab/uf-review-05: switch to Alt instead of Actualtext as the default (cba85a2b)
github at latex-project.org
github at latex-project.org
Wed Nov 29 16:11:07 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : latex-lab/uf-review-05
Link : https://github.com/latex3/latex2e/commit/cba85a2b385ddaedcf7f38487e22bd8fe954251a
>---------------------------------------------------------------
commit cba85a2b385ddaedcf7f38487e22bd8fe954251a
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Wed Nov 29 16:11:07 2023 +0100
switch to Alt instead of Actualtext as the default
>---------------------------------------------------------------
cba85a2b385ddaedcf7f38487e22bd8fe954251a
required/latex-lab/latex-lab-math.dtx | 83 ++++++++++++++------
.../testfiles-math/mathcapture-tag-001.tpf | 88 +++++++++++-----------
2 files changed, 103 insertions(+), 68 deletions(-)
diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index 6ea6ebcc..633d1dba 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -451,16 +451,16 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_@@_mathcontent_alt_tl,
-% \l_@@_mathcontent_actual_tl,
-% \l_@@_mathcontent_AF_tl}
+% \begin{variable}{\l_@@_content_alt_tl,
+% \l_@@_content_actual_tl,
+% \l_@@_content_AF_tl}
% Temporary variables to hold math content that should
% be used in actual or alt text and stored as AF.
% \begin{macrocode}
-\tl_new:N \l_@@_mathcontent_alt_tl
-\tl_new:N \l_@@_mathcontent_actual_tl
-\tl_new:N \l_@@_mathcontent_AF_source_tl
-\tl_new:N \l_@@_mathcontent_AF_mathml_tl
+\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_mathml_tl
% \end{macrocode}
% \end{variable}
%
@@ -575,6 +575,24 @@
% \end{plugdecl}
%
% \subsubsection{Internal sockets}
+%
+% \begin{variable}{\l_@@_content_template_tl}
+% The default text used as alt or actual text.
+% \begin{macrocode}
+\tl_new:N\l_@@_content_template_tl
+\tl_set:Nn \l_@@_content_template_tl
+ {
+ LaTeX~ formula~ starts~
+ \exp_not:N\begin{\g_@@_grabbed_env_tl}
+ \c_space_tl
+ \exp_not:V\g_@@_grabbed_math_tl
+ \c_space_tl
+ \exp_not:N\end{\g_@@_grabbed_env_tl}
+ \c_space_tl LaTeX~ formula~ ends~
+ }
+% \end{macrocode}
+% \end{variable}
+%
% \begin{socketdecl}{tagsupport/math/content}
% The math content is stored in associated files and used for
% actual and alternative text. As the exact text is still
@@ -587,30 +605,47 @@
% \end{macrocode}
% \end{socketdecl}
%
+% Some default sockets to set the contents.
+% TODO: think about naming convention.
+% TODO: think how this should organized so that one
+% has options to change from the outside and so that
+% there are less repetitions.
% \begin{plugdecl}{actual+source}
-% TODO: think about some naming convention ...
% \begin{macrocode}
\socket_new_plug:nnn
{tagsupport/math/content}
{actual+source}
{
- \tl_set:Ne\l_@@_mathcontent_actual_tl
+ \tl_set:Ne\l_@@_content_actual_tl
{
- LaTeX~ formula~ starts~
- \exp_not:N\begin{\g_@@_grabbed_env_tl}
- \c_space_tl
- \exp_not:V\g_@@_grabbed_math_tl
- \c_space_tl
- \exp_not:N\end{\g_@@_grabbed_env_tl}
- \c_space_tl LaTeX~ formula~ ends~
- }
- \tl_set_eq:NN \l_@@_mathcontent_AF_source_tl \l_@@_mathcontent_actual_tl
- \tl_set:Nn \l_@@_mathcontent_AF_mathml_tl {}
- \tl_set:Nn \l_@@_mathcontent_alt_tl {}
+ \l_@@_content_template_tl
+ }
+ \tl_set_eq:NN \l_@@_content_AF_source_tl \l_@@_content_actual_tl
+ \tl_set:Nn \l_@@_content_AF_mathml_tl {}
+ \tl_set:Nn \l_@@_content_alt_tl {}
+ }
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{alt+source}
+% \begin{macrocode}
+\socket_new_plug:nnn
+ {tagsupport/math/content}
+ {alt+source}
+ {
+ \tl_set:Ne\l_@@_content_alt_tl
+ {
+ \l_@@_content_template_tl
+ }
+ \tl_set_eq:NN \l_@@_content_AF_source_tl \l_@@_content_alt_tl
+ \tl_set:Nn \l_@@_content_AF_mathml_tl {}
+ \tl_set:Nn \l_@@_content_actual_tl {}
}
-\socket_assign_plug:nn {tagsupport/math/content}{actual+source}
% \end{macrocode}
% \end{plugdecl}
+% \begin{macrocode}
+\socket_assign_plug:nn {tagsupport/math/content}{alt+source}
+% \end{macrocode}
%
% \begin{socketdecl}{tagsupport/math/struct/begin,
% tagsupport/math/struct/end}
@@ -635,10 +670,10 @@
\tag_struct_begin:n
{
tag=Formula,
- AFinline-o = \l_@@_mathcontent_AF_source_tl,
+ AFinline-o = \l_@@_content_AF_source_tl,
title-o = \g_@@_grabbed_env_tl,
- actualtext = \l_@@_mathcontent_actual_tl,
- alt = \l_@@_mathcontent_alt_tl
+ actualtext = \l_@@_content_actual_tl,
+ alt = \l_@@_content_alt_tl
}
}
\socket_new_plug:nnn
diff --git a/required/latex-lab/testfiles-math/mathcapture-tag-001.tpf b/required/latex-lab/testfiles-math/mathcapture-tag-001.tpf
index d3ef8ef6..8fa226ae 100644
--- a/required/latex-lab/testfiles-math/mathcapture-tag-001.tpf
+++ b/required/latex-lab/testfiles-math/mathcapture-tag-001.tpf
@@ -368,7 +368,7 @@ endobj
<< /Type /StructElem /S /Formula /P 13 0 R /K <</Type /MCR /Pg 14 0 R/MCID 1>> /Alt <FEFF0041005F003100200026003D0020004E005F003000200028005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020002D0020005C007000680069002000280020005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020005C005C00200041005F003200200026003D0020005C00700068006900200028005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020005C00700068006900200028005C006C0061006D0062006400610020003B0020005C004F006D006500670061002000290020005C005C0020005C0069006E00740065007200740065007800740020007B0061006E0064002000660069006E0061006C006C0079007D00200041005F003300200026003D0020005C006D00610074006800630061006C0020007B004E007D00200028005C006C0061006D0062006400610020003B0020005C006F006D00650067006100200029> /ID (ID.006) >>
endobj
16 0 obj
-<< /Type /StructElem /S /Formula /P 13 0 R /K [19 0 R 21 0 R 23 0 R <</Type /MCR /Pg 14 0 R/MCID 11>> 26 0 R <</Type /MCR /Pg 14 0 R/MCID 13>>] /T <FEFF0061006C00690067006E> /ActualText <FEFF004C006100540065005800200066006F0072006D0075006C006100200073007400610072007400730020005C0062006500670069006E0020007B0061006C00690067006E007D00200041005F003100200026003D0020004E005F003000200028005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020002D0020005C007000680069002000280020005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020005C005C00200041005F003200200026003D0020005C00700068006900200028005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020005C00700068006900200028005C006C0061006D0062006400610020003B0020005C004F006D006500670061002000290020005C005C0020005C0069006E00740065007200740065007800740020007B0061006E0064002000660069006E0061006C006C0079007D00200041005F003300200026003D0020005C006D00610074006800630061006C0020007B004E007D00200028005C006C0061006D0062006400610020003B0020005C006F006D006500670061002000290020005C0065006E00640020007B0061006C00690067006E007D0020004C006100540065005800200066006F0072006D0075006C006100200065006E006400730020> /AF [18 0 R] /ID (ID.007) >>
+<< /Type /StructElem /S /Formula /P 13 0 R /K [19 0 R 21 0 R 23 0 R <</Type /MCR /Pg 14 0 R/MCID 11>> 26 0 R <</Type /MCR /Pg 14 0 R/MCID 13>>] /T <FEFF0061006C00690067006E> /Alt <FEFF004C006100540065005800200066006F0072006D0075006C006100200073007400610072007400730020005C0062006500670069006E0020007B0061006C00690067006E007D00200041005F003100200026003D0020004E005F003000200028005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020002D0020005C007000680069002000280020005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020005C005C00200041005F003200200026003D0020005C00700068006900200028005C006C0061006D0062006400610020003B0020005C004F006D0065006700610020002700290020005C00700068006900200028005C006C0061006D0062006400610020003B0020005C004F006D006500670061002000290020005C005C0020005C0069006E00740065007200740065007800740020007B0061006E0064002000660069006E0061006C006C0079007D00200041005F003300200026003D0020005C006D00610074006800630061006C0020007B004E007D00200028005C006C0061006D0062006400610020003B0020005C006F006D006500670061002000290020005C0065006E00640020007B0061006C00690067006E007D0020004C006100540065005800200066006F0072006D0075006C006100200065006E006400730020> /AF [18 0 R] /ID (ID.007) >>
endobj
19 0 obj
<< /Type /StructElem /S /Formula /P 16 0 R /K [<</Type /MCR /Pg 14 0 R/MCID 2>> 20 0 R <</Type /MCR /Pg 14 0 R/MCID 4>>] /T <FEFF0061006C00690067006E0020002800700061007200740029> /ID (ID.008) >>
@@ -1347,7 +1347,7 @@ xref
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000020314 00000 n
+0000020307 00000 n
0000014903 00000 n
0000015372 00000 n
0000000000 00000 f
@@ -1361,59 +1361,59 @@ xref
0000017355 00000 n
0000000015 00000 n
0000000408 00000 n
-0000018626 00000 n
-0000018838 00000 n
-0000018946 00000 n
-0000019406 00000 n
-0000019514 00000 n
-0000019999 00000 n
-0000020087 00000 n
-0000020205 00000 n
+0000018619 00000 n
+0000018831 00000 n
+0000018939 00000 n
+0000019399 00000 n
+0000019507 00000 n
+0000019992 00000 n
+0000020080 00000 n
+0000020198 00000 n
0000000643 00000 n
0000014672 00000 n
0000012103 00000 n
-0000074463 00000 n
-0000081819 00000 n
-0000072522 00000 n
-0000076399 00000 n
-0000080949 00000 n
-0000078676 00000 n
-0000081983 00000 n
+0000074456 00000 n
+0000081812 00000 n
+0000072515 00000 n
+0000076392 00000 n
+0000080942 00000 n
+0000078669 00000 n
+0000081976 00000 n
0000014867 00000 n
0000015037 00000 n
0000015335 00000 n
0000015951 00000 n
-0000020432 00000 n
-0000020885 00000 n
-0000020909 00000 n
-0000020951 00000 n
-0000021275 00000 n
-0000021299 00000 n
-0000021921 00000 n
-0000030366 00000 n
-0000030605 00000 n
-0000044076 00000 n
-0000044373 00000 n
-0000052306 00000 n
-0000052539 00000 n
-0000060153 00000 n
-0000060379 00000 n
-0000067775 00000 n
-0000067998 00000 n
-0000070662 00000 n
-0000070880 00000 n
-0000072680 00000 n
-0000074621 00000 n
-0000076555 00000 n
-0000078833 00000 n
-0000081106 00000 n
-0000082042 00000 n
-0000082160 00000 n
+0000020425 00000 n
+0000020878 00000 n
+0000020902 00000 n
+0000020944 00000 n
+0000021268 00000 n
+0000021292 00000 n
+0000021914 00000 n
+0000030359 00000 n
+0000030598 00000 n
+0000044069 00000 n
+0000044366 00000 n
+0000052299 00000 n
+0000052532 00000 n
+0000060146 00000 n
+0000060372 00000 n
+0000067768 00000 n
+0000067991 00000 n
+0000070655 00000 n
+0000070873 00000 n
+0000072673 00000 n
+0000074614 00000 n
+0000076548 00000 n
+0000078826 00000 n
+0000081099 00000 n
+0000082035 00000 n
+0000082153 00000 n
trailer
<< /Size 67
/Root 65 0 R
/Info 66 0 R
/ID [<9BD18DF3359C1216B83ADB4AA401CC9A> <9BD18DF3359C1216B83ADB4AA401CC9A>] >>
startxref
-82292
+82285
%%EOF
More information about the latex3-commits
mailing list.