diff options
Diffstat (limited to 'tex/context/base/mkxl/math-acc.mklx')
-rw-r--r-- | tex/context/base/mkxl/math-acc.mklx | 101 |
1 files changed, 45 insertions, 56 deletions
diff --git a/tex/context/base/mkxl/math-acc.mklx b/tex/context/base/mkxl/math-acc.mklx index baa24fcea..9d51ba697 100644 --- a/tex/context/base/mkxl/math-acc.mklx +++ b/tex/context/base/mkxl/math-acc.mklx @@ -18,29 +18,17 @@ \unprotect -% This module permits overloading of accents so that we can do fancy things. The -% implementation is similar to stackers. By default accenst are defined in a simple -% way. Contrary to extensibles accents cannot grow indefinitely. Alas the -% implementation of accents is different too, in the sense that they are -% prepositioned i.e. are already raised. (In my opinion for no real reason as they -% need to adapt anyway). -% -% $ \ruledhbox{$H$} \hat{H} \ruledhbox{$\widehat{H}$} \widehat{H} $ -% -% One alternative is: -% -% \definemathoverextensible [top] [hoed] ["FE302] -% \definemathoverextensible [top] [slang] ["FE303] -% -% $ \hoed{H} \ruledhbox{$\hoed{H}$} \ruledhbox{$\hoed{\tf H}$} \slang{H} $ -% -% But that nills the italic correction (and I'm in nood to mess with that again). -% -% \definemathaccents [myaccents] [color=darkred] -% \definemathtopaccent [myaccents] [mywidehat] ["0302] -% -% $ \hat{H} \widehat{H} \mywidehat{H} $ - +%D This module permits overloading of accents so that we can do fancy things. The +%D implementation is similar to stackers. By default accenst are defined in a simple +%D way. Contrary to extensibles accents cannot grow indefinitely. Alas the +%D implementation of accents is different too, in the sense that they are +%D prepositioned i.e. are already raised. (In my opinion for no real reason as they +%D need to adapt anyway). +%D +%D In \MKIV\ we used virtual characters in the "FE* range but in \LMTX\ we do it a bit +%D different as we have a more powerful virtual subsystem. For details on the older +%D but neat approach see the lua and mkiv files. +%D %D Older implementations are kept in the \MKII\ and \MKIV\ modules for educational %D purposes. @@ -120,32 +108,33 @@ \newconditional\c_math_accent_auto_dotless \settrue\c_math_accent_auto_dotless % cf opentype math -\aliased\let\normalgrave\grave -\aliased\let\normalddot \ddot -\aliased\let\normalbar \bar -\aliased\let\normalacute\acute -\aliased\let\normalhat \hat -\aliased\let\normalcheck\check -\aliased\let\normalbreve\breve -\aliased\let\normaldot \dot -\aliased\let\normalring \ring -\aliased\let\normaltilde\tilde -\aliased\let\normaldddot\dddot +% \aliased\let\normalgrave\grave +% \aliased\let\normalddot \ddot +% \aliased\let\normalbar \bar +% \aliased\let\normalacute\acute +% \aliased\let\normalhat \hat \aliased\let\normalwidehat \widehat +% \aliased\let\normalcheck\check +% \aliased\let\normalbreve\breve +% \aliased\let\normaldot \dot +% \aliased\let\normalring \ring +% \aliased\let\normaltilde\tilde +% \aliased\let\normaldddot\dddot \pushoverloadmode -% these are not stretched ... we should adapt char-def.lua to use these: - -\definemathtopaccent[\v!top][grave]["60] -\definemathtopaccent[\v!top][ddot] ["A8] -\definemathtopaccent[\v!top][bar] ["AF] -\definemathtopaccent[\v!top][acute]["B4] -\definemathtopaccent[\v!top][hat] ["2C6] % "302 -\definemathtopaccent[\v!top][check]["2C7] -\definemathtopaccent[\v!top][breve]["2D8] -\definemathtopaccent[\v!top][dot] ["2D9] -\definemathtopaccent[\v!top][ring] ["2DA] -\definemathtopaccent[\v!top][tilde]["2DC] +% These retain the given unicode values ... but can stretch when configured +% to do so: \setupmathaccent[\v!top][\c!stretch=\v!yes] + +\definemathtopaccent[\v!top][grave]["0060] % these are old school +\definemathtopaccent[\v!top][ddot] ["00A8] +\definemathtopaccent[\v!top][bar] ["00AF] +\definemathtopaccent[\v!top][acute]["00B4] +\definemathtopaccent[\v!top][hat] ["02C6] +\definemathtopaccent[\v!top][check]["02C7] +\definemathtopaccent[\v!top][breve]["02D8] +\definemathtopaccent[\v!top][dot] ["02D9] +\definemathtopaccent[\v!top][ring] ["02DA] +\definemathtopaccent[\v!top][tilde]["02DC] \definemathtopaccent[\v!top][dddot]["20DB] \definemathaccent @@ -156,16 +145,16 @@ %D We have a problem. We can use stackers but then we need to adapt the dimensions %D which is font dependent. So, for now we keep them as accents. -\definemathtopaccent[\v!top:\v!stretch][widegrave]["0300] % ["060] -\definemathtopaccent[\v!top:\v!stretch][wideddot] ["0308] % ["0A8] -\definemathtopaccent[\v!top:\v!stretch][widebar] ["0304] % ["0AF] -\definemathtopaccent[\v!top:\v!stretch][wideacute]["0301] % ["0B4] -\definemathtopaccent[\v!top:\v!stretch][widehat] ["0302] % ["2C6] -\definemathtopaccent[\v!top:\v!stretch][widecheck]["030C] % ["2C7] -\definemathtopaccent[\v!top:\v!stretch][widebreve]["0306] % ["2D8] -\definemathtopaccent[\v!top:\v!stretch][widedot] ["0307] % ["2D9] -\definemathtopaccent[\v!top:\v!stretch][widering] ["030A] % ["2DA] -\definemathtopaccent[\v!top:\v!stretch][widetilde]["0303] % ["2DC] +\definemathtopaccent[\v!top:\v!stretch][widegrave]["0300] % these are generic modern +\definemathtopaccent[\v!top:\v!stretch][wideddot] ["0308] +\definemathtopaccent[\v!top:\v!stretch][widebar] ["0304] +\definemathtopaccent[\v!top:\v!stretch][wideacute]["0301] +\definemathtopaccent[\v!top:\v!stretch][widehat] ["0302] +\definemathtopaccent[\v!top:\v!stretch][widecheck]["030C] +\definemathtopaccent[\v!top:\v!stretch][widebreve]["0306] +\definemathtopaccent[\v!top:\v!stretch][widedot] ["0307] +\definemathtopaccent[\v!top:\v!stretch][widering] ["030A] +\definemathtopaccent[\v!top:\v!stretch][widetilde]["0303] \definemathtopaccent[\v!top:\v!stretch][widedddot]["20DB] \aliased\let\mathring\ring % for a while |