summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/base/math-macros.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/base/math-macros.opm')
-rw-r--r--macros/luatex/optex/base/math-macros.opm14
1 files changed, 8 insertions, 6 deletions
diff --git a/macros/luatex/optex/base/math-macros.opm b/macros/luatex/optex/base/math-macros.opm
index 6189dec1c7..70983fbda5 100644
--- a/macros/luatex/optex/base/math-macros.opm
+++ b/macros/luatex/optex/base/math-macros.opm
@@ -21,7 +21,7 @@
`\<word>``_<letter><nonletter>` to `\<word> _<letter><nonletter>` at input
processor level. The \`\mathsboff` deactivates it.
You can ask by \`\_ifmathsb` if this feature is activated or deactivated.
- By default, is is activated in the `\everyjob`.
+ By default, is is activated in the `\everyjob`, see section~\ref[init].
\_cod -----------------------------
\catcode`\_ = 8 \let\sb = _
@@ -32,14 +32,14 @@
\_newifi\_ifmathsb \_mathsbfalse
\_def \_mathsbon {%
\_directlua{
- callback.register("process_input_buffer",
+ callback.register_x("process_input_buffer",
function (str)
return string.gsub(str.." ", "(\_nbb[a-zA-Z]+)_([a-zA-Z]?[^_a-zA-Z])", "\_pcent 1 _\_pcent 2")
end) }%
\_global\_mathsbtrue
}
\_def \_mathsboff {%
- \_directlua{ callback.register("process_input_buffer", nil) }%
+ \_directlua{ callback.register_x("process_input_buffer", nil) }%
\_global \_mathsbfalse
}
\_public \mathsboff \mathsbon ;
@@ -467,10 +467,14 @@
\_protected\_def\widehat{\_mathaccent"0362 }
\_doc -----------------------------
- \`\overrightarrow`, \`\overleftarrow`, \`\overbrace`, \`\underbrace`, \`\skew` macros.
+ \`\_math`, \`\skew`,
+ \`\overrightarrow`, \`\overleftarrow`, \`\overbrace`, \`\underbrace` macros.
+ The last four are redefined when Unicode math is loaded.
\_cod -----------------------------
\_def\_math{\_mathsurround0pt }
+\_protected\_def\_skew #1#2#3{{\_muskip0=#1mu\_divide\_muskip0=by2 \_mkern\_muskip0
+ #2{\_mkern-\_muskip0{#3}\_mkern\_muskip0}\_mkern-\_muskip0}{}}
\_protected\_def\_overrightarrow #1{\_vbox{\_math\_ialign{##\_crcr
\_rightarrowfill\_crcr\_noalign{\_kern-.1em \_nointerlineskip}
$\_hfil\_displaystyle{#1}\_hfil$\_crcr}}}
@@ -484,8 +488,6 @@
\_protected\_def\_underbrace #1{\_mathop{\_vtop{\_math\_ialign{##\_crcr
$\_hfil\_displaystyle{#1}\_hfil$\_crcr\_noalign{\_kern.3em \_nointerlineskip}
\_upbracefill\_crcr\_noalign{\_kern.3em}}}}\_limits}
-\_protected\_def\_skew #1#2#3{{\_muskip0=#1mu\_divide\_muskip0=by2 \_mkern\_muskip0
- #2{\_mkern-\_muskip0{#3}\_mkern\_muskip0}\_mkern-\_muskip0}{}}
\_public \overrightarrow \overleftarrow \overbrace \underbrace \skew ;