diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/optex/base/math-macros.opm')
-rw-r--r-- | Master/texmf-dist/tex/luatex/optex/base/math-macros.opm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm index 70983fbda58..c6b22f247b7 100644 --- a/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm +++ b/Master/texmf-dist/tex/luatex/optex/base/math-macros.opm @@ -21,7 +21,9 @@ `\<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`, see section~\ref[init]. + By default, it is activated in the `\everyjob`, see section~\ref[init]. + Note, that the `\everyjob` is processed after the first line of the document is + read, so the \^`\matsbon` is activated from second line of the document. \_cod ----------------------------- \catcode`\_ = 8 \let\sb = _ @@ -32,14 +34,14 @@ \_newifi\_ifmathsb \_mathsbfalse \_def \_mathsbon {% \_directlua{ - callback.register_x("process_input_buffer", + callback.add_to_callback("process_input_buffer", function (str) return string.gsub(str.." ", "(\_nbb[a-zA-Z]+)_([a-zA-Z]?[^_a-zA-Z])", "\_pcent 1 _\_pcent 2") - end) }% + end, "_mathsb") }% \_global\_mathsbtrue } \_def \_mathsboff {% - \_directlua{ callback.register_x("process_input_buffer", nil) }% + \_directlua{ callback.remove_from_callback("process_input_buffer", "_mathsb") }% \_global \_mathsbfalse } \_public \mathsboff \mathsbon ; |