[latex3-commits] [latex3/latex2e] latex-lab/uf-review-05: continue with sockets (2e7ebbd7)
github at latex-project.org
github at latex-project.org
Sun Nov 19 10:54:44 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : latex-lab/uf-review-05
Link : https://github.com/latex3/latex2e/commit/2e7ebbd75fd016bc3a95c9adaa4538eb601b008c
>---------------------------------------------------------------
commit 2e7ebbd75fd016bc3a95c9adaa4538eb601b008c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Nov 19 10:54:44 2023 +0100
continue with sockets
>---------------------------------------------------------------
2e7ebbd75fd016bc3a95c9adaa4538eb601b008c
required/latex-lab/latex-lab-math.dtx | 44 +++++++++++++++++++++++++++--------
1 file changed, 34 insertions(+), 10 deletions(-)
diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index ea784b62..a21c7670 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -251,9 +251,14 @@
%
% \subsection{Processor}
%
-% The grabbed math is at first passed to the processor.
-% It is not quite clear about what should happen there. Currently
-% it is mostly used for debugging and messages.
+% The grabbed math is at first passed to the processor. The processor is not called
+% in a measuring phase (from the amsmath \cs{ifmeasuring@}) and if the \cs{m at th}
+% token is detected.
+% It is not quite clear what purpose the processor has. As it is a public interface
+% it can't be used for internal code. And typesetting happens later and the processor
+% can't really change this. Currently it is mostly used for debugging and messages.
+% If the \cs{m at th} is found the \cs{l_@@_fakemath_bool} is set, so if the code
+% is changed this must be preserved.
%
% \subsection{Other problems}
%
@@ -382,8 +387,8 @@
%
% \begin{socketdecl}{tagsupport/math/inline/begin,
% tagsupport/math/inline/end,
-% tagsupport/math/formula/begin,
-% tagsupport/math/formula/end,
+% tagsupport/math/inline/formula/begin,
+% tagsupport/math/inline/formula/end,
% }
% The first two sockets are meant to embed inline
% math into the surrounding (so to close/reopen e.g. MC-chunks).
@@ -391,8 +396,8 @@
% \begin{macrocode}
\socket_new:nn {tagsupport/math/inline/begin}{0}
\socket_new:nn {tagsupport/math/inline/end}{0}
-\socket_new:nn {tagsupport/math/formula/begin}{0} %or 1?
-\socket_new:nn {tagsupport/math/formula/end}{0}
+\socket_new:nn {tagsupport/math/inline/formula/begin}{1} %
+\socket_new:nn {tagsupport/math/inline/formula/end}{0}
% \end{macrocode}
%\end{socketdecl}
%
@@ -409,6 +414,21 @@
% \end{macrocode}
% \end{plugdecl}
%
+% We probably will want to test different tagging receipes.
+% \begin{plugdecl}{tag/dflt}
+% \begin{macrocode}
+\socket_new_plug:nnn
+ {tagsupport/math/inline/formula/begin}
+ {tag/dflt}
+ {\@kernel at math@begin #1}
+\socket_new_plug:nnn
+ {tagsupport/math/inline/formula/end}
+ {tag/dflt}
+ {\@kernel at math@end}
+% \end{macrocode}
+% \end{plugdecl}
+%
+%
% \begin{macro}{\__tag_math_disable:}
% Similar to the table code we collect the plugs that should be
% assigned to do nothing if we don't want tagging
@@ -417,6 +437,8 @@
{
\socket_assign_plug:nn {tagsupport/math/inline/begin}{noop}
\socket_assign_plug:nn {tagsupport/math/inline/end}{noop}
+ \socket_assign_plug:nn {tagsupport/math/inline/formula/begin}{identity}
+ \socket_assign_plug:nn {tagsupport/math/inline/formula/end}{noop}
}
% \end{macrocode}
% \end{macro}
@@ -429,6 +451,8 @@
{
\socket_assign_plug:nn {tagsupport/math/inline/begin}{MC}
\socket_assign_plug:nn {tagsupport/math/inline/end}{MC}
+ \socket_assign_plug:nn {tagsupport/math/inline/formula/begin}{tag/dflt}
+ \socket_assign_plug:nn {tagsupport/math/inline/formula/end}{tag/dflt}
}
% \end{macrocode}
% \end{macro}
@@ -511,9 +535,9 @@
{ #1 $ }
{
\socket_use:n {tagsupport/math/inline/begin} %end P-MC
- \@kernel at math@begin
- #1 $
- \@kernel at math@end
+ \socket_use:nn{tagsupport/math/inline/formula/begin}{#1}
+ $
+ \socket_use:n {tagsupport/math/inline/formula/end}
\socket_use:n {tagsupport/math/inline/end} % restart P-MC
}
}
More information about the latex3-commits
mailing list.