AMSsymbols.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. /* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
  2. /* vim: set ts=2 et sw=2 tw=80: */
  3. /*************************************************************
  4. *
  5. * MathJax/extensions/TeX/AMSsymbols.js
  6. *
  7. * Implements macros for accessing the AMS symbol fonts.
  8. *
  9. * ---------------------------------------------------------------------
  10. *
  11. * Copyright (c) 2009-2017 The MathJax Consortium
  12. *
  13. * Licensed under the Apache License, Version 2.0 (the "License");
  14. * you may not use this file except in compliance with the License.
  15. * You may obtain a copy of the License at
  16. *
  17. * http://www.apache.org/licenses/LICENSE-2.0
  18. *
  19. * Unless required by applicable law or agreed to in writing, software
  20. * distributed under the License is distributed on an "AS IS" BASIS,
  21. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the License for the specific language governing permissions and
  23. * limitations under the License.
  24. */
  25. MathJax.Extension["TeX/AMSsymbols"] = {
  26. version: "2.7.2"
  27. };
  28. MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
  29. var MML = MathJax.ElementJax.mml,
  30. TEXDEF = MathJax.InputJax.TeX.Definitions;
  31. TEXDEF.Add({
  32. mathchar0mi: {
  33. // Lowercase Greek letters
  34. digamma: '03DD',
  35. varkappa: '03F0',
  36. // Uppercase Greek letters
  37. varGamma: ['0393',{mathvariant: MML.VARIANT.ITALIC}],
  38. varDelta: ['0394',{mathvariant: MML.VARIANT.ITALIC}],
  39. varTheta: ['0398',{mathvariant: MML.VARIANT.ITALIC}],
  40. varLambda: ['039B',{mathvariant: MML.VARIANT.ITALIC}],
  41. varXi: ['039E',{mathvariant: MML.VARIANT.ITALIC}],
  42. varPi: ['03A0',{mathvariant: MML.VARIANT.ITALIC}],
  43. varSigma: ['03A3',{mathvariant: MML.VARIANT.ITALIC}],
  44. varUpsilon: ['03A5',{mathvariant: MML.VARIANT.ITALIC}],
  45. varPhi: ['03A6',{mathvariant: MML.VARIANT.ITALIC}],
  46. varPsi: ['03A8',{mathvariant: MML.VARIANT.ITALIC}],
  47. varOmega: ['03A9',{mathvariant: MML.VARIANT.ITALIC}],
  48. // Hebrew letters
  49. beth: '2136',
  50. gimel: '2137',
  51. daleth: '2138',
  52. // Miscellaneous symbols
  53. // hbar: '0127', // in TeX/jax.js
  54. backprime: ['2035',{variantForm: true}],
  55. hslash: '210F',
  56. varnothing: ['2205',{variantForm: true}],
  57. blacktriangle: '25B4',
  58. triangledown: ['25BD',{variantForm: true}],
  59. blacktriangledown: '25BE',
  60. square: '25FB',
  61. Box: '25FB',
  62. blacksquare: '25FC',
  63. lozenge: '25CA',
  64. Diamond: '25CA',
  65. blacklozenge: '29EB',
  66. circledS: ['24C8',{mathvariant: MML.VARIANT.NORMAL}],
  67. bigstar: '2605',
  68. // angle: '2220', // in TeX/jax.js
  69. sphericalangle: '2222',
  70. measuredangle: '2221',
  71. nexists: '2204',
  72. complement: '2201',
  73. mho: '2127',
  74. eth: ['00F0',{mathvariant: MML.VARIANT.NORMAL}],
  75. Finv: '2132',
  76. diagup: '2571',
  77. Game: '2141',
  78. diagdown: '2572',
  79. Bbbk: ['006B',{mathvariant: MML.VARIANT.DOUBLESTRUCK}],
  80. yen: '00A5',
  81. circledR: '00AE',
  82. checkmark: '2713',
  83. maltese: '2720'
  84. },
  85. mathchar0mo: {
  86. // Binary operators
  87. dotplus: '2214',
  88. ltimes: '22C9',
  89. smallsetminus: '2216',
  90. rtimes: '22CA',
  91. Cap: '22D2',
  92. doublecap: '22D2',
  93. leftthreetimes: '22CB',
  94. Cup: '22D3',
  95. doublecup: '22D3',
  96. rightthreetimes: '22CC',
  97. barwedge: '22BC',
  98. curlywedge: '22CF',
  99. veebar: '22BB',
  100. curlyvee: '22CE',
  101. doublebarwedge: '2A5E',
  102. boxminus: '229F',
  103. circleddash: '229D',
  104. boxtimes: '22A0',
  105. circledast: '229B',
  106. boxdot: '22A1',
  107. circledcirc: '229A',
  108. boxplus: '229E',
  109. centerdot: ['22C5',{variantForm: true}],
  110. divideontimes: '22C7',
  111. intercal: '22BA',
  112. // Binary relations
  113. leqq: '2266',
  114. geqq: '2267',
  115. leqslant: '2A7D',
  116. geqslant: '2A7E',
  117. eqslantless: '2A95',
  118. eqslantgtr: '2A96',
  119. lesssim: '2272',
  120. gtrsim: '2273',
  121. lessapprox: '2A85',
  122. gtrapprox: '2A86',
  123. approxeq: '224A',
  124. lessdot: '22D6',
  125. gtrdot: '22D7',
  126. lll: '22D8',
  127. llless: '22D8',
  128. ggg: '22D9',
  129. gggtr: '22D9',
  130. lessgtr: '2276',
  131. gtrless: '2277',
  132. lesseqgtr: '22DA',
  133. gtreqless: '22DB',
  134. lesseqqgtr: '2A8B',
  135. gtreqqless: '2A8C',
  136. doteqdot: '2251',
  137. Doteq: '2251',
  138. eqcirc: '2256',
  139. risingdotseq: '2253',
  140. circeq: '2257',
  141. fallingdotseq: '2252',
  142. triangleq: '225C',
  143. backsim: '223D',
  144. thicksim: ['223C',{variantForm: true}],
  145. backsimeq: '22CD',
  146. thickapprox: ['2248',{variantForm: true}],
  147. subseteqq: '2AC5',
  148. supseteqq: '2AC6',
  149. Subset: '22D0',
  150. Supset: '22D1',
  151. sqsubset: '228F',
  152. sqsupset: '2290',
  153. preccurlyeq: '227C',
  154. succcurlyeq: '227D',
  155. curlyeqprec: '22DE',
  156. curlyeqsucc: '22DF',
  157. precsim: '227E',
  158. succsim: '227F',
  159. precapprox: '2AB7',
  160. succapprox: '2AB8',
  161. vartriangleleft: '22B2',
  162. lhd: '22B2',
  163. vartriangleright: '22B3',
  164. rhd: '22B3',
  165. trianglelefteq: '22B4',
  166. unlhd: '22B4',
  167. trianglerighteq: '22B5',
  168. unrhd: '22B5',
  169. vDash: '22A8',
  170. Vdash: '22A9',
  171. Vvdash: '22AA',
  172. smallsmile: ['2323',{variantForm: true}],
  173. shortmid: ['2223',{variantForm: true}],
  174. smallfrown: ['2322',{variantForm: true}],
  175. shortparallel: ['2225',{variantForm: true}],
  176. bumpeq: '224F',
  177. between: '226C',
  178. Bumpeq: '224E',
  179. pitchfork: '22D4',
  180. varpropto: '221D',
  181. backepsilon: '220D',
  182. blacktriangleleft: '25C2',
  183. blacktriangleright: '25B8',
  184. therefore: '2234',
  185. because: '2235',
  186. eqsim: '2242',
  187. vartriangle: ['25B3',{variantForm: true}],
  188. Join: '22C8',
  189. // Negated relations
  190. nless: '226E',
  191. ngtr: '226F',
  192. nleq: '2270',
  193. ngeq: '2271',
  194. nleqslant: ['2A87',{variantForm: true}],
  195. ngeqslant: ['2A88',{variantForm: true}],
  196. nleqq: ['2270',{variantForm: true}],
  197. ngeqq: ['2271',{variantForm: true}],
  198. lneq: '2A87',
  199. gneq: '2A88',
  200. lneqq: '2268',
  201. gneqq: '2269',
  202. lvertneqq: ['2268',{variantForm: true}],
  203. gvertneqq: ['2269',{variantForm: true}],
  204. lnsim: '22E6',
  205. gnsim: '22E7',
  206. lnapprox: '2A89',
  207. gnapprox: '2A8A',
  208. nprec: '2280',
  209. nsucc: '2281',
  210. npreceq: ['22E0',{variantForm: true}],
  211. nsucceq: ['22E1',{variantForm: true}],
  212. precneqq: '2AB5',
  213. succneqq: '2AB6',
  214. precnsim: '22E8',
  215. succnsim: '22E9',
  216. precnapprox: '2AB9',
  217. succnapprox: '2ABA',
  218. nsim: '2241',
  219. ncong: '2246',
  220. nshortmid: ['2224',{variantForm: true}],
  221. nshortparallel: ['2226',{variantForm: true}],
  222. nmid: '2224',
  223. nparallel: '2226',
  224. nvdash: '22AC',
  225. nvDash: '22AD',
  226. nVdash: '22AE',
  227. nVDash: '22AF',
  228. ntriangleleft: '22EA',
  229. ntriangleright: '22EB',
  230. ntrianglelefteq: '22EC',
  231. ntrianglerighteq: '22ED',
  232. nsubseteq: '2288',
  233. nsupseteq: '2289',
  234. nsubseteqq: ['2288',{variantForm: true}],
  235. nsupseteqq: ['2289',{variantForm: true}],
  236. subsetneq: '228A',
  237. supsetneq: '228B',
  238. varsubsetneq: ['228A',{variantForm: true}],
  239. varsupsetneq: ['228B',{variantForm: true}],
  240. subsetneqq: '2ACB',
  241. supsetneqq: '2ACC',
  242. varsubsetneqq: ['2ACB',{variantForm: true}],
  243. varsupsetneqq: ['2ACC',{variantForm: true}],
  244. // Arrows
  245. leftleftarrows: '21C7',
  246. rightrightarrows: '21C9',
  247. leftrightarrows: '21C6',
  248. rightleftarrows: '21C4',
  249. Lleftarrow: '21DA',
  250. Rrightarrow: '21DB',
  251. twoheadleftarrow: '219E',
  252. twoheadrightarrow: '21A0',
  253. leftarrowtail: '21A2',
  254. rightarrowtail: '21A3',
  255. looparrowleft: '21AB',
  256. looparrowright: '21AC',
  257. leftrightharpoons: '21CB',
  258. rightleftharpoons: ['21CC',{variantForm: true}],
  259. curvearrowleft: '21B6',
  260. curvearrowright: '21B7',
  261. circlearrowleft: '21BA',
  262. circlearrowright: '21BB',
  263. Lsh: '21B0',
  264. Rsh: '21B1',
  265. upuparrows: '21C8',
  266. downdownarrows: '21CA',
  267. upharpoonleft: '21BF',
  268. upharpoonright: '21BE',
  269. downharpoonleft: '21C3',
  270. restriction: '21BE',
  271. multimap: '22B8',
  272. downharpoonright: '21C2',
  273. leftrightsquigarrow: '21AD',
  274. rightsquigarrow: '21DD',
  275. leadsto: '21DD',
  276. dashrightarrow: '21E2',
  277. dashleftarrow: '21E0',
  278. // Negated arrows
  279. nleftarrow: '219A',
  280. nrightarrow: '219B',
  281. nLeftarrow: '21CD',
  282. nRightarrow: '21CF',
  283. nleftrightarrow: '21AE',
  284. nLeftrightarrow: '21CE'
  285. },
  286. delimiter: {
  287. // corners
  288. "\\ulcorner": '231C',
  289. "\\urcorner": '231D',
  290. "\\llcorner": '231E',
  291. "\\lrcorner": '231F'
  292. },
  293. macros: {
  294. implies: ['Macro','\\;\\Longrightarrow\\;'],
  295. impliedby: ['Macro','\\;\\Longleftarrow\\;']
  296. }
  297. },null,true);
  298. var REL = MML.mo.OPTYPES.REL;
  299. MathJax.Hub.Insert(MML.mo.prototype,{
  300. OPTABLE: {
  301. infix: {
  302. '\u2322': REL, // smallfrown
  303. '\u2323': REL, // smallsmile
  304. '\u25B3': REL, // vartriangle
  305. '\uE006': REL, // nshortmid
  306. '\uE007': REL, // nshortparallel
  307. '\uE00C': REL, // lvertneqq
  308. '\uE00D': REL, // gvertneqq
  309. '\uE00E': REL, // ngeqq
  310. '\uE00F': REL, // ngeqslant
  311. '\uE010': REL, // nleqslant
  312. '\uE011': REL, // nleqq
  313. '\uE016': REL, // nsubseteqq
  314. '\uE017': REL, // varsubsetneqq
  315. '\uE018': REL, // nsupseteqq
  316. '\uE019': REL, // varsupsetneqq
  317. '\uE01A': REL, // varsubsetneq
  318. '\uE01B': REL, // varsupsetneq
  319. '\uE04B': REL, // npreceq
  320. '\uE04F': REL // nsucceq
  321. }
  322. }
  323. });
  324. MathJax.Hub.Startup.signal.Post("TeX AMSsymbols Ready");
  325. });
  326. MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/AMSsymbols.js");