mathml/luamml-patches-kernel.sty

77 lines
1.9 KiB
Plaintext
Raw Normal View History

2024-08-14 20:10:21 +02:00
\ProvidesExplPackage {luamml-patches-kernel} {2024-08-14} {0.1.0}
2021-05-31 00:26:35 +02:00
{Feel free to add a description here}
2024-10-24 23:45:07 +02:00
\cs_set:Npn \mathsm@sh #1 #2 {
\setbox \z@ \hbox {
$
\m@th #1 {
#2
}
2024-10-26 00:45:57 +02:00
\luamml_save:nNn {mathsmash} #1 {mpadded}
2024-10-24 23:45:07 +02:00
\luamml_pdf_write:
$
}
\luamml_annotate:nen {2} {
nucleus = true,
core = consume_label('mathsmash', function(padded)
padded.height, padded.depth = 0, 0~
end),
} {
{}
\finsm@sh
}
}
\cs_set:Npn \mathph@nt #1 #2 {
\setbox \z@ = \hbox {
2021-05-31 00:26:35 +02:00
$
\m@th
2024-10-24 23:45:07 +02:00
#1
{#2}
2024-10-26 00:45:57 +02:00
\luamml_save:nNn {mathphant} #1 {mphantom}
2021-05-31 00:26:35 +02:00
$
}
2021-06-28 06:33:49 +02:00
\luamml_annotate:nen {1} {
nucleus = true,
core = {[0] = 'mpadded',
\ifh@\else
width = 0,
\fi
\ifv@\else
height = 0, depth = 0,
\fi
2024-10-24 23:45:07 +02:00
consume_label'mathphant',
2021-06-28 06:33:49 +02:00
}
} {
\finph@nt
}
}
2021-07-03 06:19:53 +02:00
\@ifpackageloaded {unicode-math} {} {
\cs_new:Npn \__luamml_kernel_define_character:Nnn #1#2#3 {
\cs_set:cpx { \cs_to_str:N #1 ~ } {
\luamml_annotate:nen {#2} {
nucleus = true, core = {[0] = 'mi', '\string\u{#3}'},
} {
\exp_not:v { \cs_to_str:N #1 ~ }
}
}
}
\__luamml_kernel_define_character:Nnn \models {3} {22a7}
\__luamml_kernel_define_character:Nnn \hookrightarrow {3} {21aa}
\__luamml_kernel_define_character:Nnn \hookleftarrow {3} {21a9}
\__luamml_kernel_define_character:Nnn \bowtie {3} {22c8}
\__luamml_kernel_define_character:Nnn \Longrightarrow {3} {27f9}
\__luamml_kernel_define_character:Nnn \longrightarrow {3} {27f6}
\__luamml_kernel_define_character:Nnn \Longleftarrow {3} {27f8}
\__luamml_kernel_define_character:Nnn \longleftarrow {3} {27f5}
\__luamml_kernel_define_character:Nnn \Longleftrightarrow {3} {27fa}
\__luamml_kernel_define_character:Nnn \longleftrightarrow {3} {27f7}
\__luamml_kernel_define_character:Nnn \longmapsto {4} {27fc}
}
\IfFileLoadedT {latex-lab-math.ltx} {
\RequirePackage{luamml-patches-lab-math}
}