mediawiki-texvc.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*************************************************************
  2. *
  3. * MathJax/extensions/TeX/mediawiki-texvc.js
  4. *
  5. * Implements macros used by mediawiki with their texvc preprocessor.
  6. *
  7. * ---------------------------------------------------------------------
  8. *
  9. * Copyright (c) 2015-2017 The MathJax Consortium
  10. *
  11. * Licensed under the Apache License, Version 2.0 (the "License");
  12. * you may not use this file except in compliance with the License.
  13. * You may obtain a copy of the License at
  14. *
  15. * http://www.apache.org/licenses/LICENSE-2.0
  16. *
  17. * Unless required by applicable law or agreed to in writing, software
  18. * distributed under the License is distributed on an "AS IS" BASIS,
  19. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20. * See the License for the specific language governing permissions and
  21. * limitations under the License.
  22. */
  23. MathJax.Extension["TeX/mediawiki-texvc"] = {
  24. version: "2.7.2"
  25. };
  26. MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () {
  27. MathJax.InputJax.TeX.Definitions.Add({
  28. macros: {
  29. AA: ["Macro", "\u00c5"],
  30. alef: ["Macro", "\\aleph"],
  31. alefsym: ["Macro", "\\aleph"],
  32. Alpha: ["Macro", "\\mathrm{A}"],
  33. and: ["Macro", "\\land"],
  34. ang: ["Macro", "\\angle"],
  35. Bbb: ["Macro", "\\mathbb"],
  36. Beta: ["Macro", "\\mathrm{B}"],
  37. bold: ["Macro", "\\mathbf"],
  38. bull: ["Macro", "\\bullet"],
  39. C: ["Macro", "\\mathbb{C}"],
  40. Chi: ["Macro", "\\mathrm{X}"],
  41. clubs: ["Macro", "\\clubsuit"],
  42. cnums: ["Macro", "\\mathbb{C}"],
  43. Complex: ["Macro", "\\mathbb{C}"],
  44. coppa: ["Macro", "\u03D9"],
  45. Coppa: ["Macro", "\u03D8"],
  46. Dagger: ["Macro", "\\ddagger"],
  47. Digamma: ["Macro", "\u03DC"],
  48. darr: ["Macro", "\\downarrow"],
  49. dArr: ["Macro", "\\Downarrow"],
  50. Darr: ["Macro", "\\Downarrow"],
  51. dashint: ["Macro", "\\unicodeInt{x2A0D}"],
  52. ddashint: ["Macro", "\\unicodeInt{x2A0E}"],
  53. diamonds: ["Macro", "\\diamondsuit"],
  54. empty: ["Macro", "\\emptyset"],
  55. Epsilon: ["Macro", "\\mathrm{E}"],
  56. Eta: ["Macro", "\\mathrm{H}"],
  57. euro: ["Macro", "\u20AC"],
  58. exist: ["Macro", "\\exists"],
  59. geneuro: ["Macro", "\u20AC"],
  60. geneuronarrow: ["Macro", "\u20AC"],
  61. geneurowide: ["Macro", "\u20AC"],
  62. H: ["Macro", "\\mathbb{H}"],
  63. hAar: ["Macro", "\\Leftrightarrow"],
  64. harr: ["Macro", "\\leftrightarrow"],
  65. Harr: ["Macro", "\\Leftrightarrow"],
  66. hearts: ["Macro", "\\heartsuit"],
  67. image: ["Macro", "\\Im"],
  68. infin: ["Macro", "\\infty"],
  69. Iota: ["Macro", "\\mathrm{I}"],
  70. isin: ["Macro", "\\in"],
  71. Kappa: ["Macro", "\\mathrm{K}"],
  72. koppa: ["Macro", "\u03DF"],
  73. Koppa: ["Macro", "\u03DE"],
  74. lang: ["Macro", "\\langle"],
  75. larr: ["Macro", "\\leftarrow"],
  76. Larr: ["Macro", "\\Leftarrow"],
  77. lArr: ["Macro", "\\Leftarrow"],
  78. lrarr: ["Macro", "\\leftrightarrow"],
  79. Lrarr: ["Macro", "\\Leftrightarrow"],
  80. lrArr: ["Macro", "\\Leftrightarrow"],
  81. Mu: ["Macro", "\\mathrm{M}"],
  82. N: ["Macro", "\\mathbb{N}"],
  83. natnums: ["Macro", "\\mathbb{N}"],
  84. Nu: ["Macro", "\\mathrm{N}"],
  85. O: ["Macro", "\\emptyset"],
  86. oint: ["Macro", "\\unicodeInt{x222E}"],
  87. oiint: ["Macro", "\\unicodeInt{x222F}"],
  88. oiiint: ["Macro", "\\unicodeInt{x2230}"],
  89. ointctrclockwise: ["Macro", "\\unicodeInt{x2233}"],
  90. officialeuro: ["Macro", "\u20AC"],
  91. Omicron: ["Macro", "\\mathrm{O}"],
  92. or: ["Macro", "\\lor"],
  93. P: ["Macro", "\u00B6"],
  94. pagecolor: ['Macro','',1], // ignore \pagecolor{}
  95. part: ["Macro", "\\partial"],
  96. plusmn: ["Macro", "\\pm"],
  97. Q: ["Macro", "\\mathbb{Q}"],
  98. R: ["Macro", "\\mathbb{R}"],
  99. rang: ["Macro", "\\rangle"],
  100. rarr: ["Macro", "\\rightarrow"],
  101. Rarr: ["Macro", "\\Rightarrow"],
  102. rArr: ["Macro", "\\Rightarrow"],
  103. real: ["Macro", "\\Re"],
  104. reals: ["Macro", "\\mathbb{R}"],
  105. Reals: ["Macro", "\\mathbb{R}"],
  106. Rho: ["Macro", "\\mathrm{P}"],
  107. sdot: ["Macro", "\\cdot"],
  108. sampi: ["Macro", "\u03E1"],
  109. Sampi: ["Macro", "\u03E0"],
  110. sect: ["Macro", "\\S"],
  111. spades: ["Macro", "\\spadesuit"],
  112. stigma: ["Macro", "\u03DB"],
  113. Stigma: ["Macro", "\u03DA"],
  114. sub: ["Macro", "\\subset"],
  115. sube: ["Macro", "\\subseteq"],
  116. supe: ["Macro", "\\supseteq"],
  117. Tau: ["Macro", "\\mathrm{T}"],
  118. textvisiblespace: ["Macro", "\u2423"],
  119. thetasym: ["Macro", "\\vartheta"],
  120. uarr: ["Macro", "\\uparrow"],
  121. uArr: ["Macro", "\\Uparrow"],
  122. Uarr: ["Macro", "\\Uparrow"],
  123. unicodeInt: ["Macro", "\\mathop{\\vcenter{\\mathchoice{\\huge\\unicode{#1}\\,}{\\unicode{#1}}{\\unicode{#1}}{\\unicode{#1}}}\\,}\\nolimits", 1],
  124. varcoppa: ["Macro", "\u03D9"],
  125. varstigma: ["Macro", "\u03DB"],
  126. varointclockwise: ["Macro", "\\unicodeInt{x2232}"],
  127. vline: ['Macro','\\smash{\\large\\lvert}',0],
  128. weierp: ["Macro", "\\wp"],
  129. Z: ["Macro", "\\mathbb{Z}"],
  130. Zeta: ["Macro", "\\mathrm{Z}"]
  131. }
  132. });
  133. });
  134. MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mediawiki-texvc.js");