mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-14 19:26:08 +00:00
a2b53e5a36
but \operatorname to fix Bug 31442. More specifically, TEX_FUN1 now adds braces as it did in previous versions. The result is texvc will once again correctly sanitize multiple math accents even when no braces are given (e.g. \dot \vec B) and it will allow math accents to be used with symbols whose font as been changed (e.g. \tilde \mathcal{M}). Parser tests are created to ensure these continue to work. The handling of \operatorname is now handled specially by the function TEX_FUN1nb (nb stands for no braces and the name is taken to be consistent with the existing function TEX_FUN2nb). The addition of braces causes this command to LaTeX incorrectly. The parser test for \operatorname has been updated to reflect the fact the hash of the images involved has changed.
25 lines
920 B
OCaml
25 lines
920 B
OCaml
type t =
|
|
TEX_LITERAL of Render_info.t
|
|
| TEX_CURLY of t list
|
|
| TEX_FQ of t * t * t
|
|
| TEX_DQ of t * t
|
|
| TEX_UQ of t * t
|
|
| TEX_FQN of t * t
|
|
| TEX_DQN of t
|
|
| TEX_UQN of t
|
|
| TEX_LR of Render_info.t * Render_info.t * t list
|
|
| TEX_BOX of string * string
|
|
| TEX_BIG of string * Render_info.t
|
|
| TEX_FUN1 of string * t
|
|
| TEX_FUN1nb of string * t
|
|
| TEX_FUN2 of string * t * t
|
|
| TEX_FUN2nb of string * t * t
|
|
| TEX_INFIX of string * t list * t list
|
|
| TEX_FUN2sq of string * t * t
|
|
| TEX_FUN1hl of string * (string * string) * t
|
|
| TEX_FUN1hf of string * Render_info.font_force * t
|
|
| TEX_FUN2h of string * (t -> t -> string * string * string) * t * t
|
|
| TEX_INFIXh of string * (t list -> t list -> string * string * string) * t list * t list
|
|
| TEX_MATRIX of string * t list list list
|
|
| TEX_DECLh of string * Render_info.font_force * t list
|