handle text command as in latex-lab
This commit is contained in:
parent
957c8ff803
commit
eb4dd9561c
@ -1,37 +1,25 @@
|
|||||||
\ProvidesExplPackage {luamml-patches-amstext} {2024-10-30} {0.2.0}
|
\ProvidesExplPackage {luamml-patches-amstext} {2024-10-30} {0.2.0}
|
||||||
{Feel free to add a description here}
|
{Feel free to add a description here}
|
||||||
|
|
||||||
\int_new:N \g__luamml_amsmath_text_struct_int
|
% This is the same definition as in latex-lab-amsmath. It can go with the
|
||||||
\cs_set:Npn \textdef@ #1 #2 #3 {
|
% 2025-06-01 release.
|
||||||
\int_if_odd:nTF { \int_div_truncate:nn { \l__luamml_flag_int } { 8 } } {
|
|
||||||
\int_gincr:N \g__luamml_amsmath_text_struct_int
|
\sys_if_engine_luatex:T
|
||||||
\tag_struct_begin:n {
|
|
||||||
tag = mtext/mathml,
|
|
||||||
stash,
|
|
||||||
label = __luamml_amsmath_text_ \int_use:N \g__luamml_amsmath_text_struct_int
|
|
||||||
}
|
|
||||||
\tag_mc_begin:n {
|
|
||||||
tag = mtext
|
|
||||||
}
|
|
||||||
\AnnotateFormula {
|
|
||||||
nucleus = true,
|
|
||||||
struct = "__luamml_amsmath_text_ \int_use:N \g__luamml_amsmath_text_struct_int"
|
|
||||||
}
|
|
||||||
} {
|
|
||||||
\use:n
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
\hbox {
|
\def\text@#1{
|
||||||
{
|
\tag_socket_use:nnn {math/luamml/hbox}{}
|
||||||
\everymath {#1}
|
{{%
|
||||||
\let \f@size #2
|
\ifcase\mathstyle
|
||||||
\selectfont
|
\hbox{{#1}}\or
|
||||||
#3
|
\hbox{{#1}}\or
|
||||||
|
\hbox{{#1}}\or
|
||||||
|
\hbox{{#1}}\or
|
||||||
|
\hbox{{\let\f@size\sf@size\selectfont#1}}\or
|
||||||
|
\hbox{{\let\f@size\sf@size\selectfont#1}}\or
|
||||||
|
\hbox{{\let\f@size\ssf@size\selectfont#1}}\or
|
||||||
|
\hbox{{\let\f@size\ssf@size\selectfont#1}}\or
|
||||||
|
\ERROR
|
||||||
|
\fi
|
||||||
|
\check@mathfonts
|
||||||
|
}}}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
\int_if_odd:nT { \int_div_truncate:nn { \l__luamml_flag_int } { 8 } } {
|
|
||||||
\tag_mc_end:
|
|
||||||
\tag_struct_end:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user