fontdata-extra.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
  6. *
  7. * Adds extra stretchy characters to the TeX font data.
  8. *
  9. * ---------------------------------------------------------------------
  10. *
  11. * Copyright (c) 2011-2013 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. (function (HTMLCSS) {
  26. var VERSION = "2.2";
  27. var DELIMITERS = HTMLCSS.FONTDATA.DELIMITERS;
  28. var MAIN = "MathJax_Main",
  29. BOLD = "MathJax_Main-bold",
  30. AMS = "MathJax_AMS",
  31. SIZE1 = "MathJax_Size1",
  32. SIZE4 = "MathJax_Size4";
  33. var H = "H", V = "V";
  34. var delim = {
  35. 0x003D: // equal sign
  36. {
  37. dir: H, HW: [[.767,MAIN]], stretch: {rep:[0x003D,MAIN]}
  38. },
  39. 0x219E: // left two-headed arrow
  40. {
  41. dir: H, HW: [[1,AMS]], stretch: {left:[0x219E,AMS], rep:[0x2212,MAIN]}
  42. },
  43. 0x21A0: // right two-headed arrow
  44. {
  45. dir: H, HW: [[1,AMS]], stretch: {right:[0x21A0,AMS], rep:[0x2212,MAIN]}
  46. },
  47. 0x21A4: // left arrow from bar
  48. {
  49. dir: H, HW: [],
  50. stretch: {min:1, left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
  51. },
  52. 0x21A5: // up arrow from bar
  53. {
  54. dir: V, HW: [],
  55. stretch: {min:.6, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x2191,SIZE1]}
  56. },
  57. 0x21A6: // right arrow from bar
  58. {
  59. dir: H, HW: [[1,MAIN]],
  60. stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x2192,MAIN]}
  61. },
  62. 0x21A7: // down arrow from bar
  63. {
  64. dir: V, HW: [],
  65. stretch: {min:.6, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]}
  66. },
  67. 0x21B0: // up arrow with top leftwards
  68. {
  69. dir: V, HW: [[.722,AMS]],
  70. stretch: {top:[0x21B0,AMS], ext:[0x23D0,SIZE1,.097]}
  71. },
  72. 0x21B1: // up arrow with top right
  73. {
  74. dir: V, HW: [[.722,AMS]],
  75. stretch: {top:[0x21B1,AMS,.27], ext:[0x23D0,SIZE1]}
  76. },
  77. 0x21BC: // left harpoon with barb up
  78. {
  79. dir: H, HW: [[1,MAIN]],
  80. stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN]}
  81. },
  82. 0x21BD: // left harpoon with barb down
  83. {
  84. dir: H, HW: [[1,MAIN]],
  85. stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN]}
  86. },
  87. 0x21BE: // up harpoon with barb right
  88. {
  89. dir: V, HW: [[.888,AMS]],
  90. stretch: {top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
  91. },
  92. 0x21BF: // up harpoon with barb left
  93. {
  94. dir: V, HW: [[.888,AMS]],
  95. stretch: {top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
  96. },
  97. 0x21C0: // right harpoon with barb up
  98. {
  99. dir: H, HW: [[1,MAIN]],
  100. stretch: {right:[0x21C0,MAIN], rep:[0x2212,MAIN]}
  101. },
  102. 0x21C1: // right harpoon with barb down
  103. {
  104. dir: H, HW: [[1,MAIN]],
  105. stretch: {right:[0x21C1,MAIN], rep:[0x2212,MAIN]}
  106. },
  107. 0x21C2: // down harpoon with barb right
  108. {
  109. dir: V, HW: [[.888,AMS]],
  110. stretch: {bot:[0x21C2,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
  111. },
  112. 0x21C3: // down harpoon with barb left
  113. {
  114. dir: V, HW: [[.888,AMS]],
  115. stretch: {bot:[0x21C3,AMS,.12,0,1.1], ext:[0x23D0,SIZE1]}
  116. },
  117. 0x21DA: // left triple arrow
  118. {
  119. dir: H, HW: [[1,AMS]],
  120. stretch: {left:[0x21DA,AMS], rep:[0x2261,MAIN]}
  121. },
  122. 0x21DB: // right triple arrow
  123. {
  124. dir: H, HW: [[1,AMS]],
  125. stretch: {right:[0x21DB,AMS], rep:[0x2261,MAIN]}
  126. },
  127. 0x23B4: // top square bracket
  128. {
  129. dir: H, HW: [],
  130. stretch: {min:.5, left:[0x250C,AMS,0,-.1], rep:[0x2212,MAIN,0,.35], right:[0x2510,AMS,0,-.1]}
  131. },
  132. 0x23B5: // bottom square bracket
  133. {
  134. dir: H, HW: [],
  135. stretch: {min:.5, left:[0x2514,AMS,0,.26], rep:[0x2212,MAIN,0,0,0,.25], right:[0x2518,AMS,0,.26]}
  136. },
  137. 0x23DC: // top paren
  138. {
  139. dir: H, HW: [[.778,AMS,0,0x2322],[1,MAIN,0,0x2322]],
  140. stretch: {left:[0xE150,SIZE4], rep:[0xE154,SIZE4], right:[0xE151,SIZE4]}
  141. },
  142. 0x23DD: // bottom paren
  143. {
  144. dir: H, HW: [[.778,AMS,0,0x2323],[1,MAIN,0,0x2323]],
  145. stretch: {left:[0xE152,SIZE4], rep:[0xE154,SIZE4], right:[0xE153,SIZE4]}
  146. },
  147. 0x23E0: // top tortoise shell
  148. {
  149. dir: H, HW: [],
  150. stretch: {min:1.25, left:[0x2CA,MAIN,-.1], rep:[0x2C9,MAIN,0,.13], right:[0x2CB,MAIN], fullExtenders:true}
  151. },
  152. 0x23E1: // bottom tortoise shell
  153. {
  154. dir: H, HW: [],
  155. stretch: {min:1.5, left:[0x2CB,MAIN,-.1,.1], rep:[0x2C9,MAIN], right:[0x2CA,MAIN,-.1,.1], fullExtenders:true}
  156. },
  157. 0x2906: // leftwards double arrow from bar
  158. {
  159. dir: H, HW: [],
  160. stretch: {min:1, left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]}
  161. },
  162. 0x2907: // rightwards double arrow from bar
  163. {
  164. dir: H, HW: [],
  165. stretch: {min:.7, left:[0x22A8,AMS,0,-.12], rep:[0x3D,MAIN], right:[0x21D2,MAIN]}
  166. },
  167. 0x294E: // left barb up right barb up harpoon
  168. {
  169. dir: H, HW: [],
  170. stretch: {min:.5, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x21C0,MAIN]}
  171. },
  172. 0x294F: // up barb right down barb right harpoon
  173. {
  174. dir: V, HW: [],
  175. stretch: {min:.5, top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
  176. },
  177. 0x2950: // left barb dow right barb down harpoon
  178. {
  179. dir: H, HW: [],
  180. stretch: {min:.5, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]}
  181. },
  182. 0x2951: // up barb left down barb left harpoon
  183. {
  184. dir: V, HW: [],
  185. stretch: {min:.5, top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
  186. },
  187. 0x295A: // leftwards harpoon with barb up from bar
  188. {
  189. dir: H, HW: [],
  190. stretch: {min:1, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
  191. },
  192. 0x295B: // rightwards harpoon with barb up from bar
  193. {
  194. dir: H, HW: [],
  195. stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:[0x2212,MAIN], right:[0x21C0,MAIN]}
  196. },
  197. 0x295C: // up harpoon with barb right from bar
  198. {
  199. dir: V, HW: [],
  200. stretch: {min:.7, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BE,AMS,.12,0,1.1]}
  201. },
  202. 0x295D: // down harpoon with barb right from bar
  203. {
  204. dir: V, HW: [],
  205. stretch: {min:.7, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
  206. },
  207. 0x295E: // leftwards harpoon with barb down from bar
  208. {
  209. dir: H, HW: [],
  210. stretch: {min:1, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
  211. },
  212. 0x295F: // rightwards harpoon with barb down from bar
  213. {
  214. dir: H, HW: [],
  215. stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:[0x2212,MAIN], right:[0x21C1,MAIN]}
  216. },
  217. 0x2960: // up harpoon with barb left from bar
  218. {
  219. dir: V, HW: [],
  220. stretch: {min:.7, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BF,AMS,.12,0,1.1]}
  221. },
  222. 0x2961: // down harpoon with barb left from bar
  223. {
  224. dir: V, HW: [],
  225. stretch: {min:.7, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
  226. }
  227. };
  228. for (var id in delim) {if (delim.hasOwnProperty(id)) {DELIMITERS[id] = delim[id]}};
  229. MathJax.Ajax.loadComplete(HTMLCSS.fontDir + "/fontdata-extra.js");
  230. })(MathJax.OutputJax["HTML-CSS"]);