add plug for mbox in math
This commit is contained in:
parent
872900b076
commit
af3b7108cc
@ -7,6 +7,8 @@ this project uses date-based 'snapshot' version identifiers.
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- Ulrike Fischer, 2024-03-03
|
||||
luamml.dtx: add plug for mbox socket to correctly annotate them in math.
|
||||
|
||||
- Ulrike Fischer, 2024-11-29
|
||||
luamml-structelemwriter.lua: use structnum instead of label when stashing.
|
||||
|
40
luamml.dtx
40
luamml.dtx
@ -523,7 +523,47 @@
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \subsection{Sockets}
|
||||
% In various places luamml has to add code to kernel commands. This is done through
|
||||
% sockets which are predeclared in lttagging.
|
||||
%
|
||||
% \subsubsection{mbox}
|
||||
% This socket annotates an \cs{mbox} inside math.
|
||||
% We test for the socket until the release 2025-06-01.
|
||||
% \begin{macrocode}
|
||||
\str_if_exist:cF { l__socket_tagsupport/math/luamml/mbox_plug_str }
|
||||
{
|
||||
\NewSocket{tagsupport/math/luamml/mbox}{2}
|
||||
\NewSocketPlug{tagsupport/math/luamml/mbox}{default}{#2}
|
||||
\AssignSocketPlug{tagsupport/math/luamml/mbox}{default}
|
||||
}
|
||||
%<*luatex>
|
||||
\NewSocketPlug{tagsupport/math/luamml/mbox}{luamml}
|
||||
{
|
||||
\bool_lazy_and:nnTF
|
||||
{ \mode_if_math_p: }
|
||||
{ \int_if_odd_p:n { \int_div_truncate:nn { \l__luamml_flag_int } { 8 } } }
|
||||
{
|
||||
\tag_struct_begin:n
|
||||
{
|
||||
tag=mtext,
|
||||
stash,
|
||||
}
|
||||
\tag_mc_begin:n {}
|
||||
\luamml_annotate:en
|
||||
{
|
||||
nucleus = true,
|
||||
structnum=\tag_get:n{struct_num}
|
||||
}
|
||||
{ #2 }
|
||||
\tag_mc_end:
|
||||
\tag_struct_end:
|
||||
}
|
||||
{ #2 }
|
||||
}
|
||||
\AssignSocketPlug{tagsupport/math/luamml/mbox}{luamml}
|
||||
%</luatex>
|
||||
% \end{macrocode}
|
||||
% \subsection{Patching}
|
||||
% For some packages, we ship with patches to make them more compatible and to
|
||||
% demonstrate how other code can be patched to work with \texttt{luamml}.
|
||||
|
Loading…
x
Reference in New Issue
Block a user