hyhyhy 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (576) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +4 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +184 -0
  9. data/Rakefile +2 -0
  10. data/bin/hyhyhy +59 -0
  11. data/hyhyhy.gemspec +29 -0
  12. data/lib/hyhyhy.rb +101 -0
  13. data/lib/hyhyhy/config.rb +29 -0
  14. data/lib/hyhyhy/frames.rb +108 -0
  15. data/lib/hyhyhy/logger.rb +40 -0
  16. data/lib/hyhyhy/parser.rb +9 -0
  17. data/lib/hyhyhy/structure/.bowerrc +5 -0
  18. data/lib/hyhyhy/structure/.hyhyhy +5 -0
  19. data/lib/hyhyhy/structure/README.md +0 -0
  20. data/lib/hyhyhy/structure/_assets/javascripts/main.js +395 -0
  21. data/lib/hyhyhy/structure/_assets/stylesheets/main.css +520 -0
  22. data/lib/hyhyhy/structure/_includes/bootstrap/.bower.json +47 -0
  23. data/lib/hyhyhy/structure/_includes/bootstrap/Gruntfile.js +472 -0
  24. data/lib/hyhyhy/structure/_includes/bootstrap/LICENSE +21 -0
  25. data/lib/hyhyhy/structure/_includes/bootstrap/README.md +129 -0
  26. data/lib/hyhyhy/structure/_includes/bootstrap/bower.json +38 -0
  27. data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.css +470 -0
  28. data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
  29. data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.min.css +5 -0
  30. data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.css +6332 -0
  31. data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.css.map +1 -0
  32. data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.min.css +5 -0
  33. data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  34. data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
  35. data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  36. data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  37. data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/bootstrap.js +2320 -0
  38. data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/bootstrap.min.js +7 -0
  39. data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/npm.js +13 -0
  40. data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  41. data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.svg +229 -0
  42. data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  43. data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  44. data/lib/hyhyhy/structure/_includes/bootstrap/grunt/.jshintrc +7 -0
  45. data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-commonjs-generator.js +23 -0
  46. data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-lessdoc-parser.js +238 -0
  47. data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-raw-files-generator.js +46 -0
  48. data/lib/hyhyhy/structure/_includes/bootstrap/grunt/configBridge.json +44 -0
  49. data/lib/hyhyhy/structure/_includes/bootstrap/grunt/sauce_browsers.yml +82 -0
  50. data/lib/hyhyhy/structure/_includes/bootstrap/js/.jscsrc +34 -0
  51. data/lib/hyhyhy/structure/_includes/bootstrap/js/.jshintrc +15 -0
  52. data/lib/hyhyhy/structure/_includes/bootstrap/js/affix.js +162 -0
  53. data/lib/hyhyhy/structure/_includes/bootstrap/js/alert.js +94 -0
  54. data/lib/hyhyhy/structure/_includes/bootstrap/js/button.js +116 -0
  55. data/lib/hyhyhy/structure/_includes/bootstrap/js/carousel.js +240 -0
  56. data/lib/hyhyhy/structure/_includes/bootstrap/js/collapse.js +211 -0
  57. data/lib/hyhyhy/structure/_includes/bootstrap/js/dropdown.js +161 -0
  58. data/lib/hyhyhy/structure/_includes/bootstrap/js/modal.js +324 -0
  59. data/lib/hyhyhy/structure/_includes/bootstrap/js/popover.js +119 -0
  60. data/lib/hyhyhy/structure/_includes/bootstrap/js/scrollspy.js +175 -0
  61. data/lib/hyhyhy/structure/_includes/bootstrap/js/tab.js +153 -0
  62. data/lib/hyhyhy/structure/_includes/bootstrap/js/tooltip.js +478 -0
  63. data/lib/hyhyhy/structure/_includes/bootstrap/js/transition.js +59 -0
  64. data/lib/hyhyhy/structure/_includes/bootstrap/less/.csscomb.json +304 -0
  65. data/lib/hyhyhy/structure/_includes/bootstrap/less/.csslintrc +19 -0
  66. data/lib/hyhyhy/structure/_includes/bootstrap/less/alerts.less +68 -0
  67. data/lib/hyhyhy/structure/_includes/bootstrap/less/badges.less +61 -0
  68. data/lib/hyhyhy/structure/_includes/bootstrap/less/bootstrap.less +50 -0
  69. data/lib/hyhyhy/structure/_includes/bootstrap/less/breadcrumbs.less +26 -0
  70. data/lib/hyhyhy/structure/_includes/bootstrap/less/button-groups.less +243 -0
  71. data/lib/hyhyhy/structure/_includes/bootstrap/less/buttons.less +160 -0
  72. data/lib/hyhyhy/structure/_includes/bootstrap/less/carousel.less +267 -0
  73. data/lib/hyhyhy/structure/_includes/bootstrap/less/close.less +33 -0
  74. data/lib/hyhyhy/structure/_includes/bootstrap/less/code.less +69 -0
  75. data/lib/hyhyhy/structure/_includes/bootstrap/less/component-animations.less +34 -0
  76. data/lib/hyhyhy/structure/_includes/bootstrap/less/dropdowns.less +213 -0
  77. data/lib/hyhyhy/structure/_includes/bootstrap/less/forms.less +546 -0
  78. data/lib/hyhyhy/structure/_includes/bootstrap/less/glyphicons.less +234 -0
  79. data/lib/hyhyhy/structure/_includes/bootstrap/less/grid.less +84 -0
  80. data/lib/hyhyhy/structure/_includes/bootstrap/less/input-groups.less +166 -0
  81. data/lib/hyhyhy/structure/_includes/bootstrap/less/jumbotron.less +49 -0
  82. data/lib/hyhyhy/structure/_includes/bootstrap/less/labels.less +64 -0
  83. data/lib/hyhyhy/structure/_includes/bootstrap/less/list-group.less +124 -0
  84. data/lib/hyhyhy/structure/_includes/bootstrap/less/media.less +47 -0
  85. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins.less +39 -0
  86. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/alerts.less +14 -0
  87. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/background-variant.less +8 -0
  88. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/border-radius.less +18 -0
  89. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/buttons.less +52 -0
  90. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/center-block.less +7 -0
  91. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/clearfix.less +22 -0
  92. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/forms.less +85 -0
  93. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/gradients.less +59 -0
  94. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/grid-framework.less +91 -0
  95. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/grid.less +122 -0
  96. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/hide-text.less +21 -0
  97. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/image.less +33 -0
  98. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/labels.less +12 -0
  99. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/list-group.less +29 -0
  100. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/nav-divider.less +10 -0
  101. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/nav-vertical-align.less +9 -0
  102. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/opacity.less +8 -0
  103. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/pagination.less +23 -0
  104. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/panels.less +24 -0
  105. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/progress-bar.less +10 -0
  106. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/reset-filter.less +8 -0
  107. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/resize.less +6 -0
  108. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/responsive-visibility.less +15 -0
  109. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/size.less +10 -0
  110. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/tab-focus.less +9 -0
  111. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/table-row.less +28 -0
  112. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/text-emphasis.less +8 -0
  113. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/text-overflow.less +8 -0
  114. data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/vendor-prefixes.less +227 -0
  115. data/lib/hyhyhy/structure/_includes/bootstrap/less/modals.less +148 -0
  116. data/lib/hyhyhy/structure/_includes/bootstrap/less/navbar.less +660 -0
  117. data/lib/hyhyhy/structure/_includes/bootstrap/less/navs.less +244 -0
  118. data/lib/hyhyhy/structure/_includes/bootstrap/less/normalize.less +427 -0
  119. data/lib/hyhyhy/structure/_includes/bootstrap/less/pager.less +54 -0
  120. data/lib/hyhyhy/structure/_includes/bootstrap/less/pagination.less +88 -0
  121. data/lib/hyhyhy/structure/_includes/bootstrap/less/panels.less +261 -0
  122. data/lib/hyhyhy/structure/_includes/bootstrap/less/popovers.less +135 -0
  123. data/lib/hyhyhy/structure/_includes/bootstrap/less/print.less +107 -0
  124. data/lib/hyhyhy/structure/_includes/bootstrap/less/progress-bars.less +87 -0
  125. data/lib/hyhyhy/structure/_includes/bootstrap/less/responsive-embed.less +35 -0
  126. data/lib/hyhyhy/structure/_includes/bootstrap/less/responsive-utilities.less +194 -0
  127. data/lib/hyhyhy/structure/_includes/bootstrap/less/scaffolding.less +150 -0
  128. data/lib/hyhyhy/structure/_includes/bootstrap/less/tables.less +234 -0
  129. data/lib/hyhyhy/structure/_includes/bootstrap/less/theme.less +272 -0
  130. data/lib/hyhyhy/structure/_includes/bootstrap/less/thumbnails.less +36 -0
  131. data/lib/hyhyhy/structure/_includes/bootstrap/less/tooltip.less +103 -0
  132. data/lib/hyhyhy/structure/_includes/bootstrap/less/type.less +302 -0
  133. data/lib/hyhyhy/structure/_includes/bootstrap/less/utilities.less +56 -0
  134. data/lib/hyhyhy/structure/_includes/bootstrap/less/variables.less +856 -0
  135. data/lib/hyhyhy/structure/_includes/bootstrap/less/wells.less +29 -0
  136. data/lib/hyhyhy/structure/_includes/bootstrap/package.json +82 -0
  137. data/lib/hyhyhy/structure/_includes/bower.json +9 -0
  138. data/lib/hyhyhy/structure/_includes/d3/.bower.json +37 -0
  139. data/lib/hyhyhy/structure/_includes/d3/CONTRIBUTING.md +25 -0
  140. data/lib/hyhyhy/structure/_includes/d3/LICENSE +26 -0
  141. data/lib/hyhyhy/structure/_includes/d3/README.md +9 -0
  142. data/lib/hyhyhy/structure/_includes/d3/bower.json +26 -0
  143. data/lib/hyhyhy/structure/_includes/d3/d3.js +9470 -0
  144. data/lib/hyhyhy/structure/_includes/d3/d3.min.js +5 -0
  145. data/lib/hyhyhy/structure/_includes/jquery/.bower.json +38 -0
  146. data/lib/hyhyhy/structure/_includes/jquery/MIT-LICENSE.txt +21 -0
  147. data/lib/hyhyhy/structure/_includes/jquery/bower.json +27 -0
  148. data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.js +9190 -0
  149. data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.min.js +5 -0
  150. data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.min.map +1 -0
  151. data/lib/hyhyhy/structure/_includes/jquery/src/ajax.js +806 -0
  152. data/lib/hyhyhy/structure/_includes/jquery/src/ajax/jsonp.js +89 -0
  153. data/lib/hyhyhy/structure/_includes/jquery/src/ajax/load.js +75 -0
  154. data/lib/hyhyhy/structure/_includes/jquery/src/ajax/parseJSON.js +13 -0
  155. data/lib/hyhyhy/structure/_includes/jquery/src/ajax/parseXML.js +28 -0
  156. data/lib/hyhyhy/structure/_includes/jquery/src/ajax/script.js +64 -0
  157. data/lib/hyhyhy/structure/_includes/jquery/src/ajax/var/nonce.js +5 -0
  158. data/lib/hyhyhy/structure/_includes/jquery/src/ajax/var/rquery.js +3 -0
  159. data/lib/hyhyhy/structure/_includes/jquery/src/ajax/xhr.js +135 -0
  160. data/lib/hyhyhy/structure/_includes/jquery/src/attributes.js +11 -0
  161. data/lib/hyhyhy/structure/_includes/jquery/src/attributes/attr.js +143 -0
  162. data/lib/hyhyhy/structure/_includes/jquery/src/attributes/classes.js +158 -0
  163. data/lib/hyhyhy/structure/_includes/jquery/src/attributes/prop.js +96 -0
  164. data/lib/hyhyhy/structure/_includes/jquery/src/attributes/support.js +35 -0
  165. data/lib/hyhyhy/structure/_includes/jquery/src/attributes/val.js +163 -0
  166. data/lib/hyhyhy/structure/_includes/jquery/src/callbacks.js +205 -0
  167. data/lib/hyhyhy/structure/_includes/jquery/src/core.js +498 -0
  168. data/lib/hyhyhy/structure/_includes/jquery/src/core/access.js +60 -0
  169. data/lib/hyhyhy/structure/_includes/jquery/src/core/init.js +123 -0
  170. data/lib/hyhyhy/structure/_includes/jquery/src/core/parseHTML.js +39 -0
  171. data/lib/hyhyhy/structure/_includes/jquery/src/core/ready.js +97 -0
  172. data/lib/hyhyhy/structure/_includes/jquery/src/core/var/rsingleTag.js +4 -0
  173. data/lib/hyhyhy/structure/_includes/jquery/src/css.js +451 -0
  174. data/lib/hyhyhy/structure/_includes/jquery/src/css/addGetHookIf.js +24 -0
  175. data/lib/hyhyhy/structure/_includes/jquery/src/css/curCSS.js +57 -0
  176. data/lib/hyhyhy/structure/_includes/jquery/src/css/defaultDisplay.js +70 -0
  177. data/lib/hyhyhy/structure/_includes/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  178. data/lib/hyhyhy/structure/_includes/jquery/src/css/support.js +91 -0
  179. data/lib/hyhyhy/structure/_includes/jquery/src/css/swap.js +28 -0
  180. data/lib/hyhyhy/structure/_includes/jquery/src/css/var/cssExpand.js +3 -0
  181. data/lib/hyhyhy/structure/_includes/jquery/src/css/var/getStyles.js +5 -0
  182. data/lib/hyhyhy/structure/_includes/jquery/src/css/var/isHidden.js +13 -0
  183. data/lib/hyhyhy/structure/_includes/jquery/src/css/var/rmargin.js +3 -0
  184. data/lib/hyhyhy/structure/_includes/jquery/src/css/var/rnumnonpx.js +5 -0
  185. data/lib/hyhyhy/structure/_includes/jquery/src/data.js +179 -0
  186. data/lib/hyhyhy/structure/_includes/jquery/src/data/Data.js +181 -0
  187. data/lib/hyhyhy/structure/_includes/jquery/src/data/accepts.js +20 -0
  188. data/lib/hyhyhy/structure/_includes/jquery/src/data/var/data_priv.js +5 -0
  189. data/lib/hyhyhy/structure/_includes/jquery/src/data/var/data_user.js +5 -0
  190. data/lib/hyhyhy/structure/_includes/jquery/src/deferred.js +149 -0
  191. data/lib/hyhyhy/structure/_includes/jquery/src/deprecated.js +13 -0
  192. data/lib/hyhyhy/structure/_includes/jquery/src/dimensions.js +50 -0
  193. data/lib/hyhyhy/structure/_includes/jquery/src/effects.js +649 -0
  194. data/lib/hyhyhy/structure/_includes/jquery/src/effects/Tween.js +114 -0
  195. data/lib/hyhyhy/structure/_includes/jquery/src/effects/animatedSelector.js +13 -0
  196. data/lib/hyhyhy/structure/_includes/jquery/src/event.js +868 -0
  197. data/lib/hyhyhy/structure/_includes/jquery/src/event/alias.js +39 -0
  198. data/lib/hyhyhy/structure/_includes/jquery/src/event/support.js +9 -0
  199. data/lib/hyhyhy/structure/_includes/jquery/src/exports/amd.js +24 -0
  200. data/lib/hyhyhy/structure/_includes/jquery/src/exports/global.js +32 -0
  201. data/lib/hyhyhy/structure/_includes/jquery/src/intro.js +44 -0
  202. data/lib/hyhyhy/structure/_includes/jquery/src/jquery.js +36 -0
  203. data/lib/hyhyhy/structure/_includes/jquery/src/manipulation.js +582 -0
  204. data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/_evalUrl.js +18 -0
  205. data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/support.js +31 -0
  206. data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/var/rcheckableType.js +3 -0
  207. data/lib/hyhyhy/structure/_includes/jquery/src/offset.js +204 -0
  208. data/lib/hyhyhy/structure/_includes/jquery/src/outro.js +1 -0
  209. data/lib/hyhyhy/structure/_includes/jquery/src/queue.js +142 -0
  210. data/lib/hyhyhy/structure/_includes/jquery/src/queue/delay.js +22 -0
  211. data/lib/hyhyhy/structure/_includes/jquery/src/selector-native.js +172 -0
  212. data/lib/hyhyhy/structure/_includes/jquery/src/selector-sizzle.js +14 -0
  213. data/lib/hyhyhy/structure/_includes/jquery/src/selector.js +1 -0
  214. data/lib/hyhyhy/structure/_includes/jquery/src/serialize.js +111 -0
  215. data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.js +2044 -0
  216. data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  217. data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  218. data/lib/hyhyhy/structure/_includes/jquery/src/traversing.js +200 -0
  219. data/lib/hyhyhy/structure/_includes/jquery/src/traversing/findFilter.js +100 -0
  220. data/lib/hyhyhy/structure/_includes/jquery/src/traversing/var/rneedsContext.js +6 -0
  221. data/lib/hyhyhy/structure/_includes/jquery/src/var/arr.js +3 -0
  222. data/lib/hyhyhy/structure/_includes/jquery/src/var/class2type.js +4 -0
  223. data/lib/hyhyhy/structure/_includes/jquery/src/var/concat.js +5 -0
  224. data/lib/hyhyhy/structure/_includes/jquery/src/var/hasOwn.js +5 -0
  225. data/lib/hyhyhy/structure/_includes/jquery/src/var/indexOf.js +5 -0
  226. data/lib/hyhyhy/structure/_includes/jquery/src/var/pnum.js +3 -0
  227. data/lib/hyhyhy/structure/_includes/jquery/src/var/push.js +5 -0
  228. data/lib/hyhyhy/structure/_includes/jquery/src/var/rnotwhite.js +3 -0
  229. data/lib/hyhyhy/structure/_includes/jquery/src/var/slice.js +5 -0
  230. data/lib/hyhyhy/structure/_includes/jquery/src/var/strundefined.js +3 -0
  231. data/lib/hyhyhy/structure/_includes/jquery/src/var/support.js +4 -0
  232. data/lib/hyhyhy/structure/_includes/jquery/src/var/toString.js +5 -0
  233. data/lib/hyhyhy/structure/_includes/jquery/src/wrap.js +78 -0
  234. data/lib/hyhyhy/structure/_includes/katex/.arcconfig +4 -0
  235. data/lib/hyhyhy/structure/_includes/katex/.bower.json +14 -0
  236. data/lib/hyhyhy/structure/_includes/katex/.gitignore +5 -0
  237. data/lib/hyhyhy/structure/_includes/katex/.hyhyhy +10 -0
  238. data/lib/hyhyhy/structure/_includes/katex/.jshintrc +67 -0
  239. data/lib/hyhyhy/structure/_includes/katex/.travis.yml +4 -0
  240. data/lib/hyhyhy/structure/_includes/katex/CONTRIBUTING.md +112 -0
  241. data/lib/hyhyhy/structure/_includes/katex/LICENSE.txt +21 -0
  242. data/lib/hyhyhy/structure/_includes/katex/Makefile +61 -0
  243. data/lib/hyhyhy/structure/_includes/katex/README.md +50 -0
  244. data/lib/hyhyhy/structure/_includes/katex/cli.js +15 -0
  245. data/lib/hyhyhy/structure/_includes/katex/dockers/HuxleyTests/Dockerfile +13 -0
  246. data/lib/hyhyhy/structure/_includes/katex/dockers/HuxleyTests/README.md +29 -0
  247. data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/Dockerfile +34 -0
  248. data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/README.md +55 -0
  249. data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/copy_fonts.sh +47 -0
  250. data/lib/hyhyhy/structure/_includes/katex/katex.js +54 -0
  251. data/lib/hyhyhy/structure/_includes/katex/lint_blacklist.txt +8 -0
  252. data/lib/hyhyhy/structure/_includes/katex/metrics/README.md +21 -0
  253. data/lib/hyhyhy/structure/_includes/katex/metrics/extract_tfms.py +94 -0
  254. data/lib/hyhyhy/structure/_includes/katex/metrics/extract_ttfs.py +75 -0
  255. data/lib/hyhyhy/structure/_includes/katex/metrics/mapping.pl +997 -0
  256. data/lib/hyhyhy/structure/_includes/katex/metrics/parse_tfm.py +201 -0
  257. data/lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py +17 -0
  258. data/lib/hyhyhy/structure/_includes/katex/package.json +30 -0
  259. data/lib/hyhyhy/structure/_includes/katex/server.js +77 -0
  260. data/lib/hyhyhy/structure/_includes/katex/src/Lexer.js +190 -0
  261. data/lib/hyhyhy/structure/_includes/katex/src/Options.js +85 -0
  262. data/lib/hyhyhy/structure/_includes/katex/src/ParseError.js +40 -0
  263. data/lib/hyhyhy/structure/_includes/katex/src/Parser.js +639 -0
  264. data/lib/hyhyhy/structure/_includes/katex/src/Style.js +126 -0
  265. data/lib/hyhyhy/structure/_includes/katex/src/buildCommon.js +271 -0
  266. data/lib/hyhyhy/structure/_includes/katex/src/buildTree.js +1167 -0
  267. data/lib/hyhyhy/structure/_includes/katex/src/delimiter.js +541 -0
  268. data/lib/hyhyhy/structure/_includes/katex/src/domTree.js +241 -0
  269. data/lib/hyhyhy/structure/_includes/katex/src/fontMetrics.js +129 -0
  270. data/lib/hyhyhy/structure/_includes/katex/src/functions.js +539 -0
  271. data/lib/hyhyhy/structure/_includes/katex/src/parseTree.js +17 -0
  272. data/lib/hyhyhy/structure/_includes/katex/src/symbols.js +1006 -0
  273. data/lib/hyhyhy/structure/_includes/katex/src/utils.js +97 -0
  274. data/lib/hyhyhy/structure/_includes/katex/static/fonts.less +73 -0
  275. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.eot +0 -0
  276. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.ttf +0 -0
  277. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.woff +0 -0
  278. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  279. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.eot +0 -0
  280. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  281. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  282. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  283. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.eot +0 -0
  284. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  285. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  286. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  287. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.eot +0 -0
  288. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  289. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  290. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  291. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.eot +0 -0
  292. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  293. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  294. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  295. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Bold.woff2 +0 -0
  296. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-BoldItalic.woff2 +0 -0
  297. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Italic.woff2 +0 -0
  298. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Regular.woff2 +0 -0
  299. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.eot +0 -0
  300. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.ttf +0 -0
  301. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.woff +0 -0
  302. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.woff2 +0 -0
  303. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.eot +0 -0
  304. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.ttf +0 -0
  305. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.woff +0 -0
  306. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.woff2 +0 -0
  307. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.eot +0 -0
  308. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.ttf +0 -0
  309. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.woff +0 -0
  310. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.woff2 +0 -0
  311. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.eot +0 -0
  312. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  313. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  314. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  315. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.eot +0 -0
  316. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.ttf +0 -0
  317. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.woff +0 -0
  318. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.woff2 +0 -0
  319. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.eot +0 -0
  320. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.ttf +0 -0
  321. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.woff +0 -0
  322. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.woff2 +0 -0
  323. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.eot +0 -0
  324. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  325. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  326. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  327. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.eot +0 -0
  328. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  329. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  330. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  331. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.eot +0 -0
  332. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  333. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  334. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  335. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.eot +0 -0
  336. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.ttf +0 -0
  337. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.woff +0 -0
  338. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.woff2 +0 -0
  339. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.eot +0 -0
  340. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.ttf +0 -0
  341. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.woff +0 -0
  342. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  343. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.eot +0 -0
  344. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.ttf +0 -0
  345. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.woff +0 -0
  346. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  347. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.eot +0 -0
  348. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.ttf +0 -0
  349. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.woff +0 -0
  350. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  351. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.eot +0 -0
  352. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.ttf +0 -0
  353. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.woff +0 -0
  354. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  355. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.eot +0 -0
  356. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  357. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  358. data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  359. data/lib/hyhyhy/structure/_includes/katex/static/index.html +17 -0
  360. data/lib/hyhyhy/structure/_includes/katex/static/katex.less +430 -0
  361. data/lib/hyhyhy/structure/_includes/katex/static/main.css +12 -0
  362. data/lib/hyhyhy/structure/_includes/katex/static/main.js +42 -0
  363. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfile.json +199 -0
  364. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Accents.hux/firefox-1.png +0 -0
  365. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Accents.record.json +5 -0
  366. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Baseline.hux/firefox-1.png +0 -0
  367. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Baseline.record.json +5 -0
  368. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BasicTest.hux/firefox-1.png +0 -0
  369. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BasicTest.record.json +5 -0
  370. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BinomTest.hux/firefox-1.png +0 -0
  371. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BinomTest.record.json +5 -0
  372. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Colors.hux/firefox-1.png +0 -0
  373. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Colors.record.json +5 -0
  374. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DeepFontSizing.hux/firefox-1.png +0 -0
  375. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DeepFontSizing.record.json +5 -0
  376. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DelimiterSizing.hux/firefox-1.png +0 -0
  377. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DelimiterSizing.record.json +5 -0
  378. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DisplayStyle.hux/firefox-1.png +0 -0
  379. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DisplayStyle.record.json +5 -0
  380. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Exponents.hux/firefox-1.png +0 -0
  381. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Exponents.record.json +5 -0
  382. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/FractionTest.hux/firefox-1.png +0 -0
  383. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/FractionTest.record.json +5 -0
  384. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Functions.hux/firefox-1.png +0 -0
  385. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Functions.record.json +5 -0
  386. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/GreekLetters.hux/firefox-1.png +0 -0
  387. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/GreekLetters.record.json +5 -0
  388. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/KaTeX.hux/firefox-1.png +0 -0
  389. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/KaTeX.record.json +5 -0
  390. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Lap.hux/firefox-1.png +0 -0
  391. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Lap.record.json +5 -0
  392. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRight.hux/firefox-1.png +0 -0
  393. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRight.record.json +5 -0
  394. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightListStyling.hux/firefox-1.png +0 -0
  395. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightListStyling.record.json +5 -0
  396. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightStyleSizing.hux/firefox-1.png +0 -0
  397. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightStyleSizing.record.json +5 -0
  398. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NestedFractions.hux/firefox-1.png +0 -0
  399. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NestedFractions.record.json +5 -0
  400. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NullDelimiterInteraction.hux/firefox-1.png +0 -0
  401. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NullDelimiterInteraction.record.json +5 -0
  402. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/OpLimits.hux/firefox-1.png +0 -0
  403. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/OpLimits.record.json +5 -0
  404. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Overline.hux/firefox-1.png +0 -0
  405. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Overline.record.json +5 -0
  406. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/PrimeSpacing.hux/firefox-1.png +0 -0
  407. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/PrimeSpacing.record.json +5 -0
  408. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/RlapBug.hux/firefox-1.png +0 -0
  409. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/RlapBug.record.json +5 -0
  410. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Rule.hux/firefox-1.png +0 -0
  411. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Rule.record.json +5 -0
  412. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sizing.hux/firefox-1.png +0 -0
  413. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sizing.record.json +5 -0
  414. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SizingBaseline.hux/firefox-1.png +0 -0
  415. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SizingBaseline.record.json +5 -0
  416. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Spacing.hux/firefox-1.png +0 -0
  417. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Spacing.record.json +5 -0
  418. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sqrt.hux/firefox-1.png +0 -0
  419. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sqrt.record.json +5 -0
  420. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubCharacterBox.hux/firefox-1.png +0 -0
  421. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubCharacterBox.record.json +5 -0
  422. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubHorizSpacing.hux/firefox-1.png +0 -0
  423. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubHorizSpacing.record.json +5 -0
  424. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubOffsets.hux/firefox-1.png +0 -0
  425. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubOffsets.record.json +5 -0
  426. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Text.hux/firefox-1.png +0 -0
  427. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Text.record.json +5 -0
  428. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/VerticalSpacing.hux/firefox-1.png +0 -0
  429. data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/VerticalSpacing.record.json +5 -0
  430. data/lib/hyhyhy/structure/_includes/katex/test/huxley/test.html +30 -0
  431. data/lib/hyhyhy/structure/_includes/katex/test/jasmine/MIT.LICENSE +20 -0
  432. data/lib/hyhyhy/structure/_includes/katex/test/jasmine/boot.js +120 -0
  433. data/lib/hyhyhy/structure/_includes/katex/test/jasmine/console.js +166 -0
  434. data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine-html.js +390 -0
  435. data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine.css +61 -0
  436. data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine.js +2593 -0
  437. data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine_favicon.png +0 -0
  438. data/lib/hyhyhy/structure/_includes/katex/test/katex-spec.js +1179 -0
  439. data/lib/hyhyhy/structure/_includes/katex/test/test.html +12 -0
  440. data/lib/hyhyhy/structure/_includes/metrics-graphics/.bower.json +61 -0
  441. data/lib/hyhyhy/structure/_includes/metrics-graphics/.hyhyhy +17 -0
  442. data/lib/hyhyhy/structure/_includes/metrics-graphics/LICENSE +362 -0
  443. data/lib/hyhyhy/structure/_includes/metrics-graphics/README.md +70 -0
  444. data/lib/hyhyhy/structure/_includes/metrics-graphics/bower.json +50 -0
  445. data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics-demo-dark.css +640 -0
  446. data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics-demo.css +176 -0
  447. data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics.css +344 -0
  448. data/lib/hyhyhy/structure/_includes/metrics-graphics/images/missing-data-dark.png +0 -0
  449. data/lib/hyhyhy/structure/_includes/metrics-graphics/images/missing-data.png +0 -0
  450. data/lib/hyhyhy/structure/_includes/metrics-graphics/js/metricsgraphics.min.js +590 -0
  451. data/lib/hyhyhy/structure/_includes/metrics-graphics/package.json +35 -0
  452. data/lib/hyhyhy/structure/_includes/prism/.bower.json +34 -0
  453. data/lib/hyhyhy/structure/_includes/prism/.hyhyhy +33 -0
  454. data/lib/hyhyhy/structure/_includes/prism/LICENSE +21 -0
  455. data/lib/hyhyhy/structure/_includes/prism/README.md +22 -0
  456. data/lib/hyhyhy/structure/_includes/prism/bower.json +26 -0
  457. data/lib/hyhyhy/structure/_includes/prism/components.js +233 -0
  458. data/lib/hyhyhy/structure/_includes/prism/components/prism-apacheconf.js +46 -0
  459. data/lib/hyhyhy/structure/_includes/prism/components/prism-apacheconf.min.js +1 -0
  460. data/lib/hyhyhy/structure/_includes/prism/components/prism-aspnet.js +49 -0
  461. data/lib/hyhyhy/structure/_includes/prism/components/prism-aspnet.min.js +1 -0
  462. data/lib/hyhyhy/structure/_includes/prism/components/prism-autohotkey.js +27 -0
  463. data/lib/hyhyhy/structure/_includes/prism/components/prism-autohotkey.min.js +1 -0
  464. data/lib/hyhyhy/structure/_includes/prism/components/prism-bash.js +24 -0
  465. data/lib/hyhyhy/structure/_includes/prism/components/prism-bash.min.js +1 -0
  466. data/lib/hyhyhy/structure/_includes/prism/components/prism-c.js +26 -0
  467. data/lib/hyhyhy/structure/_includes/prism/components/prism-c.min.js +1 -0
  468. data/lib/hyhyhy/structure/_includes/prism/components/prism-clike.js +32 -0
  469. data/lib/hyhyhy/structure/_includes/prism/components/prism-clike.min.js +1 -0
  470. data/lib/hyhyhy/structure/_includes/prism/components/prism-coffeescript.js +18 -0
  471. data/lib/hyhyhy/structure/_includes/prism/components/prism-coffeescript.min.js +1 -0
  472. data/lib/hyhyhy/structure/_includes/prism/components/prism-core.js +424 -0
  473. data/lib/hyhyhy/structure/_includes/prism/components/prism-core.min.js +1 -0
  474. data/lib/hyhyhy/structure/_includes/prism/components/prism-cpp.js +12 -0
  475. data/lib/hyhyhy/structure/_includes/prism/components/prism-cpp.min.js +1 -0
  476. data/lib/hyhyhy/structure/_includes/prism/components/prism-csharp.js +6 -0
  477. data/lib/hyhyhy/structure/_includes/prism/components/prism-csharp.min.js +1 -0
  478. data/lib/hyhyhy/structure/_includes/prism/components/prism-css-extras.js +15 -0
  479. data/lib/hyhyhy/structure/_includes/prism/components/prism-css-extras.min.js +1 -0
  480. data/lib/hyhyhy/structure/_includes/prism/components/prism-css.js +50 -0
  481. data/lib/hyhyhy/structure/_includes/prism/components/prism-css.min.js +1 -0
  482. data/lib/hyhyhy/structure/_includes/prism/components/prism-gherkin.js +13 -0
  483. data/lib/hyhyhy/structure/_includes/prism/components/prism-gherkin.min.js +1 -0
  484. data/lib/hyhyhy/structure/_includes/prism/components/prism-git.js +68 -0
  485. data/lib/hyhyhy/structure/_includes/prism/components/prism-git.min.js +1 -0
  486. data/lib/hyhyhy/structure/_includes/prism/components/prism-go.js +9 -0
  487. data/lib/hyhyhy/structure/_includes/prism/components/prism-go.min.js +1 -0
  488. data/lib/hyhyhy/structure/_includes/prism/components/prism-groovy.js +43 -0
  489. data/lib/hyhyhy/structure/_includes/prism/components/prism-groovy.min.js +1 -0
  490. data/lib/hyhyhy/structure/_includes/prism/components/prism-handlebars.js +92 -0
  491. data/lib/hyhyhy/structure/_includes/prism/components/prism-handlebars.min.js +1 -0
  492. data/lib/hyhyhy/structure/_includes/prism/components/prism-haskell.js +32 -0
  493. data/lib/hyhyhy/structure/_includes/prism/components/prism-haskell.min.js +1 -0
  494. data/lib/hyhyhy/structure/_includes/prism/components/prism-http.js +44 -0
  495. data/lib/hyhyhy/structure/_includes/prism/components/prism-http.min.js +1 -0
  496. data/lib/hyhyhy/structure/_includes/prism/components/prism-ini.js +11 -0
  497. data/lib/hyhyhy/structure/_includes/prism/components/prism-ini.min.js +1 -0
  498. data/lib/hyhyhy/structure/_includes/prism/components/prism-java.js +8 -0
  499. data/lib/hyhyhy/structure/_includes/prism/components/prism-java.min.js +1 -0
  500. data/lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js +27 -0
  501. data/lib/hyhyhy/structure/_includes/prism/components/prism-javascript.min.js +1 -0
  502. data/lib/hyhyhy/structure/_includes/prism/components/prism-latex.js +6 -0
  503. data/lib/hyhyhy/structure/_includes/prism/components/prism-latex.min.js +1 -0
  504. data/lib/hyhyhy/structure/_includes/prism/components/prism-markup.js +41 -0
  505. data/lib/hyhyhy/structure/_includes/prism/components/prism-markup.min.js +1 -0
  506. data/lib/hyhyhy/structure/_includes/prism/components/prism-nasm.js +20 -0
  507. data/lib/hyhyhy/structure/_includes/prism/components/prism-nasm.min.js +1 -0
  508. data/lib/hyhyhy/structure/_includes/prism/components/prism-nsis.js +19 -0
  509. data/lib/hyhyhy/structure/_includes/prism/components/prism-nsis.min.js +5 -0
  510. data/lib/hyhyhy/structure/_includes/prism/components/prism-objectivec.js +5 -0
  511. data/lib/hyhyhy/structure/_includes/prism/components/prism-objectivec.min.js +1 -0
  512. data/lib/hyhyhy/structure/_includes/prism/components/prism-perl.js +112 -0
  513. data/lib/hyhyhy/structure/_includes/prism/components/prism-perl.min.js +1 -0
  514. data/lib/hyhyhy/structure/_includes/prism/components/prism-php-extras.js +11 -0
  515. data/lib/hyhyhy/structure/_includes/prism/components/prism-php-extras.min.js +1 -0
  516. data/lib/hyhyhy/structure/_includes/prism/components/prism-php.js +99 -0
  517. data/lib/hyhyhy/structure/_includes/prism/components/prism-php.min.js +1 -0
  518. data/lib/hyhyhy/structure/_includes/prism/components/prism-python.js +14 -0
  519. data/lib/hyhyhy/structure/_includes/prism/components/prism-python.min.js +1 -0
  520. data/lib/hyhyhy/structure/_includes/prism/components/prism-rip.js +29 -0
  521. data/lib/hyhyhy/structure/_includes/prism/components/prism-rip.min.js +1 -0
  522. data/lib/hyhyhy/structure/_includes/prism/components/prism-ruby.js +21 -0
  523. data/lib/hyhyhy/structure/_includes/prism/components/prism-ruby.min.js +1 -0
  524. data/lib/hyhyhy/structure/_includes/prism/components/prism-scala.js +8 -0
  525. data/lib/hyhyhy/structure/_includes/prism/components/prism-scala.min.js +1 -0
  526. data/lib/hyhyhy/structure/_includes/prism/components/prism-scheme-min.js +1 -0
  527. data/lib/hyhyhy/structure/_includes/prism/components/prism-scheme.js +24 -0
  528. data/lib/hyhyhy/structure/_includes/prism/components/prism-scss.js +36 -0
  529. data/lib/hyhyhy/structure/_includes/prism/components/prism-scss.min.js +1 -0
  530. data/lib/hyhyhy/structure/_includes/prism/components/prism-sql.js +17 -0
  531. data/lib/hyhyhy/structure/_includes/prism/components/prism-sql.min.js +1 -0
  532. data/lib/hyhyhy/structure/_includes/prism/components/prism-swift.js +8 -0
  533. data/lib/hyhyhy/structure/_includes/prism/components/prism-swift.min.js +1 -0
  534. data/lib/hyhyhy/structure/_includes/prism/components/prism-twig.js +46 -0
  535. data/lib/hyhyhy/structure/_includes/prism/components/prism-twig.min.js +1 -0
  536. data/lib/hyhyhy/structure/_includes/prism/gulpfile.js +48 -0
  537. data/lib/hyhyhy/structure/_includes/prism/package.json +27 -0
  538. data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.css +3 -0
  539. data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.js +66 -0
  540. data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.min.js +1 -0
  541. data/lib/hyhyhy/structure/_includes/prism/plugins/file-highlight/prism-file-highlight.js +54 -0
  542. data/lib/hyhyhy/structure/_includes/prism/plugins/file-highlight/prism-file-highlight.min.js +1 -0
  543. data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.css +3 -0
  544. data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.js +42 -0
  545. data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.min.js +1 -0
  546. data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.css +47 -0
  547. data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.js +109 -0
  548. data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.min.js +1 -0
  549. data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.css +40 -0
  550. data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.js +24 -0
  551. data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.min.js +1 -0
  552. data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.css +17 -0
  553. data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.js +15 -0
  554. data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.min.js +1 -0
  555. data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.css +21 -0
  556. data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.js +16 -0
  557. data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.min.css +1 -0
  558. data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.min.js +1 -0
  559. data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.css +11 -0
  560. data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.js +163 -0
  561. data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.min.js +1 -0
  562. data/lib/hyhyhy/structure/_includes/prism/prism.js +662 -0
  563. data/lib/hyhyhy/structure/_includes/prism/themes/prism-coy.css +210 -0
  564. data/lib/hyhyhy/structure/_includes/prism/themes/prism-dark.css +122 -0
  565. data/lib/hyhyhy/structure/_includes/prism/themes/prism-funky.css +111 -0
  566. data/lib/hyhyhy/structure/_includes/prism/themes/prism-okaidia.css +114 -0
  567. data/lib/hyhyhy/structure/_includes/prism/themes/prism-tomorrow.css +115 -0
  568. data/lib/hyhyhy/structure/_includes/prism/themes/prism-twilight.css +195 -0
  569. data/lib/hyhyhy/structure/_includes/prism/themes/prism.css +131 -0
  570. data/lib/hyhyhy/structure/_includes/prism/vendor/promise.js +5 -0
  571. data/lib/hyhyhy/structure/_layouts/default.erb +41 -0
  572. data/lib/hyhyhy/structure/_slides/1.introduction.md +36 -0
  573. data/lib/hyhyhy/structure/_slides/2.packages.md +52 -0
  574. data/lib/hyhyhy/structure/_slides/3.usage.md +146 -0
  575. data/lib/hyhyhy/version.rb +5 -0
  576. metadata +747 -0
@@ -0,0 +1,55 @@
1
+ ### How to generate MathJax fonts
2
+ ---------------------------------
3
+
4
+ It's really simple (now)! Just make a docker image from the included Dockerfile
5
+ using a command like
6
+
7
+ sudo docker build --tag=mathjaxfonts .
8
+
9
+ from within this directory (note you need to have docker installed and running
10
+ for this to work). This will build a docker image with the mathjaxfonts tag,
11
+ which you can then use to run dockers based on them. Then, run a mathjaxfonts
12
+ docker with
13
+
14
+ sudo docker run --interactive --tty --name mjf mathjaxfonts /bin/bash
15
+
16
+ We name this docker "mjf" so we can reference it later when we want to copy the
17
+ files off. (If you get an error about the name being in use, perhaps because you
18
+ are trying to create another docker, you can either delete the old docker with
19
+
20
+ sudo docker rm mjf
21
+
22
+ or use a different name.) This will get you into the docker in the root
23
+ directory. From there, cd into the `/MathJax-dev/fonts/OTF/TeX` directory, and
24
+ run
25
+
26
+ make ttf eot woff woff2
27
+
28
+ to build all of the fonts that we need. Finally, leave the docker and copy all
29
+ the files off with the `copy_fonts.sh` script:
30
+
31
+ ./copy_fonts.sh mjf
32
+
33
+ And you're good to go! Don't forget to update the font metrics with `make
34
+ metrics`.
35
+
36
+ ### General Docker Help
37
+ -----------------------
38
+
39
+ When you quit the docker, it will stop the docker from running. If you want to
40
+ reattach to the docker, you can start it again with
41
+
42
+ sudo docker start mjf
43
+
44
+ and then attach with
45
+
46
+ sudo docker attach mjf
47
+
48
+ Alternatively, if you want to detach from the docker when you're done instead of
49
+ quitting and stopping it, you can detach with `C-p C-q`, and then re-attach with
50
+
51
+ sudo docker attach mjf
52
+
53
+ To see a list of your current dockers, you can run
54
+
55
+ docker ps
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ if [ -z "$1" ]; then
6
+ echo "Usage: $(basename $0) <docker name>"
7
+ echo " If you followed the README, the docker name would be 'mjf'"
8
+ exit 1
9
+ else
10
+ DOCKER_NAME="$1"
11
+ fi
12
+
13
+ mkdir fonts
14
+
15
+ used_fonts=(
16
+ KaTeX_AMS-Regular
17
+ KaTeX_Caligraphic-Bold
18
+ KaTeX_Caligraphic-Regular
19
+ KaTeX_Fraktur-Bold
20
+ KaTeX_Fraktur-Regular
21
+ KaTeX_Main-Bold
22
+ KaTeX_Main-Italic
23
+ KaTeX_Main-Regular
24
+ KaTeX_Math-BoldItalic
25
+ KaTeX_Math-Italic
26
+ KaTeX_Math-Regular
27
+ KaTeX_SansSerif-Bold
28
+ KaTeX_SansSerif-Italic
29
+ KaTeX_SansSerif-Regular
30
+ KaTeX_Script-Regular
31
+ KaTeX_Size1-Regular
32
+ KaTeX_Size2-Regular
33
+ KaTeX_Size3-Regular
34
+ KaTeX_Size4-Regular
35
+ KaTeX_Typewriter-Regular
36
+ )
37
+
38
+ for filetype in ttf eot woff woff2; do
39
+ echo "Copying $filetype"
40
+ docker cp "$DOCKER_NAME":/MathJax-dev/fonts/OTF/TeX/"$filetype" fonts
41
+
42
+ for font in ${used_fonts[*]}; do
43
+ mv fonts/"$filetype"/"$font"* fonts/
44
+ done
45
+
46
+ rm -rf fonts/"$filetype"
47
+ done
@@ -0,0 +1,54 @@
1
+ /**
2
+ * This is the main entry point for KaTeX. Here, we expose functions for
3
+ * rendering expressions either to DOM nodes or to markup strings.
4
+ *
5
+ * We also expose the ParseError class to check if errors thrown from KaTeX are
6
+ * errors in the expression, or errors in javascript handling.
7
+ */
8
+
9
+ var ParseError = require("./src/ParseError");
10
+
11
+ var buildTree = require("./src/buildTree");
12
+ var parseTree = require("./src/parseTree");
13
+ var utils = require("./src/utils");
14
+
15
+ /**
16
+ * Parse and build an expression, and place that expression in the DOM node
17
+ * given.
18
+ */
19
+ var render = function(toParse, baseNode) {
20
+ utils.clearNode(baseNode);
21
+
22
+ var tree = parseTree(toParse);
23
+ var node = buildTree(tree).toNode();
24
+
25
+ baseNode.appendChild(node);
26
+ };
27
+
28
+ // KaTeX's styles don't work properly in quirks mode. Print out an error, and
29
+ // disable rendering.
30
+ if (typeof document !== "undefined") {
31
+ if (document.compatMode !== "CSS1Compat") {
32
+ typeof console !== "undefined" && console.warn(
33
+ "Warning: KaTeX doesn't work in quirks mode. Make sure your " +
34
+ "website has a suitable doctype.");
35
+
36
+ render = function() {
37
+ throw new ParseError("KaTeX doesn't work in quirks mode.");
38
+ };
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Parse and build an expression, and return the markup for that.
44
+ */
45
+ var renderToString = function(toParse) {
46
+ var tree = parseTree(toParse);
47
+ return buildTree(tree).toMarkup();
48
+ };
49
+
50
+ module.exports = {
51
+ render: render,
52
+ renderToString: renderToString,
53
+ ParseError: ParseError
54
+ };
@@ -0,0 +1,8 @@
1
+ .git
2
+
3
+ # Autogenerated code
4
+ build/**
5
+ node_modules/**
6
+
7
+ # Third party code
8
+ test/jasmine/**
@@ -0,0 +1,21 @@
1
+ ### How to generate new metrics
2
+ -------------------------------
3
+
4
+ There are several requirements for generating the metrics used by KaTeX.
5
+
6
+ - You need to have an installation of TeX which supports kpathsea. You can check
7
+ this by running `tex --version`, and seeing if it has a line that looks like
8
+ > kpathsea version 6.2.0
9
+
10
+ - You need the JSON module for perl. You can install this either from CPAN or with
11
+ your package manager.
12
+
13
+ - You need the python fontforge module. This is probably either installed with
14
+ fontforge or can be installed from your package manager.
15
+
16
+ Once you have these things, run
17
+
18
+ make metrics
19
+
20
+ which should generate new metrics and place them into `fontMetrics.js`. You're
21
+ done!
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env python
2
+
3
+ import collections
4
+ import json
5
+ import parse_tfm
6
+ import subprocess
7
+ import sys
8
+
9
+
10
+ def find_font_path(font_name):
11
+ try:
12
+ font_path = subprocess.check_output(['kpsewhich', font_name])
13
+ except OSError:
14
+ raise RuntimeError("Couldn't find kpsewhich program, make sure you" +
15
+ " have TeX installed")
16
+ except subprocess.CalledProcessError:
17
+ raise RuntimeError("Couldn't find font metrics: '%s'" % font_name)
18
+ return font_path.strip()
19
+
20
+
21
+ def main():
22
+ mapping = json.load(sys.stdin)
23
+
24
+ fonts = [
25
+ 'cmbsy10.tfm',
26
+ 'cmbx10.tfm',
27
+ 'cmex10.tfm',
28
+ 'cmmi10.tfm',
29
+ 'cmmib10.tfm',
30
+ 'cmr10.tfm',
31
+ 'cmsy10.tfm',
32
+ 'cmti10.tfm',
33
+ 'msam10.tfm',
34
+ 'msbm10.tfm'
35
+ ]
36
+
37
+ # Extracted by running `\font\a=<font>` and then `\showthe\skewchar\a` in
38
+ # TeX, where `<font>` is the name of the font listed here. The skewchar
39
+ # will be printed out in the output. If it outputs `-1`, that means there
40
+ # is no skewchar, so we use `None` here.
41
+ font_skewchar = {
42
+ 'cmbsy10': None,
43
+ 'cmbx10': None,
44
+ 'cmex10': None,
45
+ 'cmmi10': 127,
46
+ 'cmmib10': None,
47
+ 'cmr10': None,
48
+ 'cmsy10': 48,
49
+ 'cmti10': None,
50
+ 'msam10': None,
51
+ 'msbm10': None
52
+ }
53
+
54
+ font_name_to_tfm = {}
55
+
56
+ for font_name in fonts:
57
+ font_basename = font_name.split('.')[0]
58
+ font_path = find_font_path(font_name)
59
+ font_name_to_tfm[font_basename] = parse_tfm.read_tfm_file(font_path)
60
+
61
+ families = collections.defaultdict(dict)
62
+
63
+ for family, chars in mapping.iteritems():
64
+ for char, char_data in chars.iteritems():
65
+ char_num = int(char)
66
+
67
+ font = char_data['font']
68
+ tex_char_num = int(char_data['char'])
69
+ yshift = float(char_data['yshift'])
70
+
71
+ tfm_char = font_name_to_tfm[font].get_char_metrics(tex_char_num)
72
+
73
+ height = round(tfm_char.height + yshift / 1000.0, 5)
74
+ depth = round(tfm_char.depth - yshift / 1000.0, 5)
75
+ italic = round(tfm_char.italic_correction, 5)
76
+
77
+ skewkern = 0.0
78
+ if (font_skewchar[font] and
79
+ font_skewchar[font] in tfm_char.kern_table):
80
+ skewkern = round(
81
+ tfm_char.kern_table[font_skewchar[font]], 5)
82
+
83
+ families[family][char_num] = {
84
+ 'height': height,
85
+ 'depth': depth,
86
+ 'italic': italic,
87
+ 'skew': skewkern,
88
+ }
89
+
90
+ sys.stdout.write(
91
+ json.dumps(families, separators=(',', ':'), sort_keys=True))
92
+
93
+ if __name__ == '__main__':
94
+ main()
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env python
2
+
3
+ import fontforge
4
+ import sys
5
+ import json
6
+
7
+ # map of characters to extract
8
+ metrics_to_extract = {
9
+ # Font name
10
+ "Main-Regular": {
11
+ # Skew and italic metrics can't be easily parsed from the TTF. Instead,
12
+ # we map each character to a "base character", which is a character
13
+ # from the same font with correct italic and skew metrics. A character
14
+ # maps to None if it doesn't have a base.
15
+
16
+ u"\u2260": None, # \neq
17
+ u"\u2245": None, # \cong
18
+ u"\u0020": None, # space
19
+ u"\u00a0": None, # nbsp
20
+ u"\u2026": None, # \ldots
21
+ u"\u22ef": None, # \cdots
22
+ u"\u22f1": None, # \ddots
23
+ u"\u22ee": None, # \vdots
24
+ },
25
+ "Size1-Regular": {
26
+ u"\u222c": u"\u222b", # \iint, based on \int
27
+ u"\u222d": u"\u222b", # \iiint, based on \int
28
+ },
29
+ "Size2-Regular": {
30
+ u"\u222c": u"\u222b", # \iint, based on \int
31
+ u"\u222d": u"\u222b", # \iiint, based on \int
32
+ },
33
+ }
34
+
35
+
36
+ def main():
37
+ start_json = json.load(sys.stdin)
38
+
39
+ for font, chars in metrics_to_extract.iteritems():
40
+ fontInfo = fontforge.open("../static/fonts/KaTeX_" + font + ".ttf")
41
+
42
+ for glyph in fontInfo.glyphs():
43
+ try:
44
+ char = unichr(glyph.unicode)
45
+ except ValueError:
46
+ continue
47
+
48
+ if char in chars:
49
+ _, depth, _, height = glyph.boundingBox()
50
+
51
+ depth = -depth
52
+
53
+ base_char = chars[char]
54
+ if base_char:
55
+ base_char_str = str(ord(base_char))
56
+ base_metrics = start_json[font][base_char_str]
57
+
58
+ italic = base_metrics["italic"]
59
+ skew = base_metrics["skew"]
60
+ else:
61
+ italic = 0
62
+ skew = 0
63
+
64
+ start_json[font][ord(char)] = {
65
+ "height": height / fontInfo.em,
66
+ "depth": depth / fontInfo.em,
67
+ "italic": italic,
68
+ "skew": skew,
69
+ }
70
+
71
+ sys.stdout.write(
72
+ json.dumps(start_json, separators=(',', ':'), sort_keys=True))
73
+
74
+ if __name__ == "__main__":
75
+ main()
@@ -0,0 +1,997 @@
1
+ #! /usr/bin/perl
2
+
3
+ # Adapted from the MathJax-dev repository file /fonts/OTF/TeX/makeFF under the
4
+ # Apache 2 license
5
+
6
+ # We use this file to recover the mapping from TeX fonts to KaTeX fonts, to
7
+ # accurately extract the metrics from the corresponding .tfm (TeX font metric)
8
+ # files
9
+
10
+ use JSON;
11
+
12
+ $map{cmr10} = {
13
+ "Main-Regular" => [
14
+ [0,1] => 0x393, # \Gamma, \Delta
15
+ 2 => 0x398, # \Theta
16
+ 3 => 0x39B, # \Lambda
17
+ 4 => 0x39E, # \Xi
18
+ 5 => 0x3A0, # \Pi
19
+ 6 => 0x3A3, # \Sigma
20
+ [7,8] => 0x3A5, # \Upsilon, \Phi
21
+ [9,0xA] => 0x3A8, # \Psi, \Omega
22
+
23
+ 0x10 => 0x131, # \imath (roman)
24
+ 0x11 => 0x237, # \jmath (roman)
25
+ 0x12 => 0x60, # \grave
26
+ 0x12 => 0x2CB, # \grave
27
+ 0x12 => [0x300,-500,0], # \grave (combining)
28
+ 0x13 => 0xB4, # \acute
29
+ 0x13 => 0x2CA, # \acute
30
+ 0x13 => [0x301,-500,0], # \acute (combining)
31
+ 0x14 => 0x2C7, # \check
32
+ 0x14 => [0x30C,-500,0], # \check (combining)
33
+ 0x15 => 0x2D8, # \breve
34
+ 0x15 => [0x306,-500,0], # \breve (combining)
35
+ 0x16 => 0xAF, # \bar
36
+ 0x16 => 0x2C9, # \bar
37
+ 0x16 => [0x304,-500,0], # \bar (combining)
38
+ 0x17 => [0xB0,-125,0], # ring above
39
+ 0x17 => [0x2DA,-125,0], # ring above
40
+ 0x17 => [0x30A,-625,0], # ring above (combining)
41
+
42
+ [0x21,0x2F] => 0x21, # !, ", #, $, %, &, ', (, ), *, +, comma, -, ., /
43
+ 0x22 => 0x201D, # "
44
+ 0x27 => 0x2019, # '
45
+ [0x30,0x39] => 0x30, # 0-9
46
+ [0x3A,0x3B] => 0x3A, # :, ;
47
+ 0x3D => 0x3D, # =
48
+ [0x3F,0x40] => 0x3F, # ?, @
49
+ [0x41,0x5A] => 0x41, # A-Z
50
+ 0x5B => 0x5B, # [
51
+ 0x5C => 0x201C, # ``
52
+ [0x5D,0x5E] => 0x5D, # ], ^
53
+ 0x5E => 0x2C6, # \hat
54
+ 0x5E => [0x302,-500,0], # \hat (combining)
55
+ 0x5F => [0x2D9,111,0], # \dot
56
+ 0x5F => [0x307,-389,0], # \dot (combining)
57
+ 0x60 => 0x2018, # `
58
+ [0x61,0x7A] => 0x61, # a-z
59
+ [0x7B,0x7C] => 0x2013, # \endash, \emdash
60
+ 0x7B => [0x5F,0,-310], # underline
61
+ 0x7D => [0x30B,-500,0], # double acute (combining)
62
+ 0x7E => [0x7E,0,-350], # ~
63
+ 0x7E => 0x2DC, # \tilde
64
+ 0x7E => [0x303,-500,0], # \tilde (combining)
65
+ 0x7F => 0xA8, # \ddot
66
+ 0x7F => [0x308,-500,0], # \ddot (combining)
67
+ ],
68
+ };
69
+
70
+ $map{cmmi10} = {
71
+ "Math-Regular" => [
72
+ [0,1] => 0x393, # \Gamma, \Delta
73
+ 2 => 0x398, # \Theta
74
+ 3 => 0x39B, # \Lambda
75
+ 4 => 0x39E, # \Xi
76
+ 5 => 0x3A0, # \Pi
77
+ 6 => 0x3A3, # \Sigma
78
+ [7,8] => 0x3A5, # \Upsilon, \Phi
79
+ [9,0xA] => 0x3A8, # \Psi, \Omega
80
+
81
+ [0xB,0xE] => 0x3B1, # \alpha, \beta, \gamma, \delta
82
+ 0xF => 0x3F5, # \elpsilon
83
+ [0x10,0x18] => 0x3B6, # \zeta, \eta, \theta, \iota, \kappa, \lambda, \mu, \nu, \xi
84
+ [0x19,0x1A] => 0x3C0, # \pi, \rho
85
+ [0x1B,0x1D] => 0x3C3, # \sigma, \tau, \upsilon
86
+ 0x1E => 0x3D5, # \phi
87
+ [0x1F,0x21] => 0x3C7, # \chi, \psi, \omega
88
+ 0x22 => 0x3B5, # \varepsilon
89
+ 0x23 => 0x3D1, # \vartheta
90
+ 0x24 => 0x3D6, # \varpi
91
+ 0x25 => 0x3F1, # \varrho
92
+ 0x26 => 0x3C2, # \varsigma
93
+ 0x27 => 0x3C6, # \varphi
94
+
95
+ [0x41,0x5A] => 0x41, # A-Z
96
+ [0x61,0x7A] => 0x61, # a - z
97
+ 0x6F => 0x3BF, # omicron
98
+ ],
99
+
100
+ "Math-Italic" => [
101
+ [0,1] => 0x393, # \Gamma, \Delta
102
+ 2 => 0x398, # \Theta
103
+ 3 => 0x39B, # \Lambda
104
+ 4 => 0x39E, # \Xi
105
+ 5 => 0x3A0, # \Pi
106
+ 6 => 0x3A3, # \Sigma
107
+ [7,8] => 0x3A5, # \Upsilon, \Phi
108
+ [9,0xA] => 0x3A8, # \Psi, \Omega
109
+
110
+ [0xB,0xE] => 0x3B1, # \alpha, \beta, \gamma, \delta
111
+ 0xF => 0x3F5, # \elpsilon
112
+ [0x10,0x18] => 0x3B6, # \zeta, \eta, \theta, \iota, \kappa, \lambda, \mu, \nu, \xi
113
+ [0x19,0x1A] => 0x3C0, # \pi, \rho
114
+ [0x1B,0x1D] => 0x3C3, # \sigma, \tau, \upsilon
115
+ 0x1E => 0x3D5, # \phi
116
+ [0x1F,0x21] => 0x3C7, # \chi, \psi, \omega
117
+ 0x22 => 0x3B5, # \varepsilon
118
+ 0x23 => 0x3D1, # \vartheta
119
+ 0x24 => 0x3D6, # \varpi
120
+ 0x25 => 0x3F1, # \varrho
121
+ 0x26 => 0x3C2, # \varsigma
122
+ 0x27 => 0x3C6, # \varphi
123
+
124
+ [0x41,0x5A] => 0x41, # A-Z
125
+ [0x61,0x7A] => 0x61, # a - z
126
+ 0x6F => 0x3BF, # omicron
127
+ ],
128
+
129
+ "Main-Regular" => [
130
+ 0x28 => 0x21BC, # \leftharpoonup
131
+ 0x29 => 0x21BD, # \leftharpoondown
132
+ 0x2A => 0x21C0, # \rightharpoonup
133
+ 0x2B => 0x21C1, # \rightharpoondown
134
+
135
+ 0x2E => 0x25B9, # \triangleright
136
+ 0x2F => 0x25C3, # \triangleleft
137
+
138
+ 0x3A => 0x2E, # .
139
+ 0x3B => 0x2C, # ,
140
+ 0x3C => 0x3C, # <
141
+ 0x3D => 0x2215, # /
142
+ 0x3E => 0x3E, # >
143
+ 0x3F => 0x22C6, # \star
144
+ 0x40 => 0x2202, # \partial
145
+
146
+ [0x5B,0x5D] => 0x266D, # \flat, \natural, \sharp
147
+ 0x5E => 0x2323, # \smile
148
+ 0x5F => 0x2322, # \frown
149
+ 0x60 => 0x2113, # \ell
150
+
151
+ 0x7B => 0x131, # \imath
152
+ 0x7C => 0x237, # \jmath
153
+ 0x7D => 0x2118, # \wp
154
+ 0x7E => [0x20D7,-653,0],# \vec
155
+ ]
156
+ };
157
+
158
+ $map{cmsy10} = {
159
+ "Main-Regular" => [
160
+ [0,1] => 0x2212, # -
161
+ 1 => 0x22C5, # \cdot
162
+ 2 => 0xD7, # \times
163
+ 3 => 0x2217, # \ast
164
+ 4 => 0xF7, # \div
165
+ 5 => 0x22C4, # \diamond
166
+ 6 => 0xB1, # \pm
167
+ 7 => 0x2213, # \mp
168
+ [8,0xC] => 0x2295, # \oplus, \ominus, \otimes, \oslash, \odot
169
+ 0xD => 0x25EF, # \bigcirc
170
+ [0xE,0xF] => 0x2218, # \circ, \bullet
171
+
172
+ 0x10 => 0x224D, # \asymp
173
+ 0x11 => 0x2261, # \equiv
174
+ [0x12,0x13] => 0x2286, # \subseteq, \supseteq
175
+ [0x14,0x15] => 0x2264, # \leq, \geq
176
+ [0x16,0x17] => 0x2AAF, # \preceq, \succeq
177
+ 0x18 => 0x223C, # \sim
178
+ 0x19 => 0x2248, # \approx
179
+ [0x1A,0x1B] => 0x2282, # \subset, \supset
180
+ [0x1C,0x1D] => 0x226A, # \ll, \gg
181
+ [0x1E,0x1F] => 0x227A, # \prec, \succ
182
+
183
+ 0x20 => 0x2190, # \leftarrow
184
+ 0x21 => 0x2192, # \rightarrow
185
+ 0x22 => 0x2191, # \uparrow
186
+ 0x23 => 0x2193, # \downarrow
187
+ 0x24 => 0x2194, # \leftrightarrow
188
+ 0x25 => 0x2197, # \nearrow
189
+ 0x26 => 0x2198, # \searrow
190
+ 0x27 => 0x2243, # \simeq
191
+
192
+ 0x28 => 0x21D0, # \Leftarrow
193
+ 0x29 => 0x21D2, # \Rightarrow
194
+ 0x2A => 0x21D1, # \Uparrow
195
+ 0x2B => 0x21D3, # \Downarrow
196
+ 0x2C => 0x21D4, # \Leftrightarrow
197
+ 0x2D => 0x2196, # \nwarrow
198
+ 0x2E => 0x2199, # \swarrow
199
+ 0x2F => 0x221D, # \propto
200
+
201
+ 0x30 => 0x2032, # \prime
202
+ 0x31 => 0x221E, # \infty
203
+ 0x32 => 0x2208, # \in
204
+ 0x33 => 0x220B, # \ni
205
+ 0x34 => 0x25B3, # \bigtriangleup and \triangle
206
+ 0x35 => 0x25BD, # \bigtriangledown
207
+ 0x36 => [0x338,-778,0], # \not (combining)
208
+
209
+ 0x38 => 0x2200, # \forall
210
+ 0x39 => 0x2203, # \exists
211
+ 0x3A => 0xAC, # \neg
212
+ 0x3B => 0x2205, # \emptyset
213
+ 0x3C => 0x211C, # \Re
214
+ 0x3D => 0x2111, # \Im
215
+ 0x3E => 0x22A4, # \top
216
+ 0x3F => 0x22A5, # \bot
217
+
218
+ 0x40 => 0x2135, # \aleph
219
+
220
+ 0x5B => 0x222A, # \cup
221
+ 0x5C => 0x2229, # \cap
222
+ 0x5D => 0x228E, # \uplus
223
+ [0x5E,0x5F] => 0x2227, # \wedge, \vee
224
+
225
+ [0x60,0x61] => 0x22A2, # \vdash, \dashv
226
+ [0x62,0x63] => 0x230A, # \lfloor, \rfloor
227
+ [0x64,0x65] => 0x2308, # \lceil, \rceil
228
+ 0x66 => 0x7B, # {
229
+ 0x67 => 0x7D, # }
230
+ [0x68,0x69] => 0x27E8, # \langle, \rangle
231
+ 0x6A => 0x7C, # |
232
+ 0x6A => 0x2223, # \vert
233
+ 0x6B => 0x2225, # \Vert
234
+ 0x6C => 0x2195, # \updownarrow
235
+ 0x6D => 0x21D5, # \Updownarrow
236
+ 0x6E => 0x5C, # \backslash
237
+ 0x6E => 0x2216, # \setminus
238
+ 0x6F => 0x2240, # \wr
239
+
240
+ 0x70 => [0x221A,0,760], # \surd ### adjust position so font doesn't have a large depth
241
+ 0x71 => 0x2A3F, # \amalg
242
+ 0x72 => 0x2207, # \nabla
243
+ 0x73 => 0x222B, # \int
244
+ 0x74 => 0x2294, # \sqcup
245
+ 0x75 => 0x2293, # \sqcap
246
+ [0x76,0x77] => 0x2291, # \sqsubseteq, \sqsupseteq
247
+
248
+ [0x79,0x7A] => 0x2020, # \dagger, \ddagger
249
+
250
+ 0x7C => 0x2663, # \clubsuit
251
+ 0x7D => 0x2662, # \diamondsuit
252
+ 0x7E => 0x2661, # \heartsuit
253
+ 0x7F => 0x2660, # \spadesuit
254
+ ],
255
+
256
+ "Math-Italic" => [
257
+ 0x36 => 0x2F # \not
258
+ ],
259
+ };
260
+
261
+ $map{cmex10} = {
262
+ "Size1" => [
263
+ 0 => [0x28,0,810], # (
264
+ 1 => [0x29,0,810], # )
265
+ 2 => [0x5B,0,810], # [
266
+ 3 => [0x5D,0,810], # ]
267
+ 4 => [0x230A,0,810], # \lfloor
268
+ 5 => [0x230B,0,810], # \rfloor
269
+ 6 => [0x2308,0,810], # \lceil
270
+ 7 => [0x2309,0,810], # \rceil
271
+ 8 => [0x7B,0,810], # {
272
+ 9 => [0x7D,0,810], # }
273
+ 0xA => [0x27E8,0,810], # \langle
274
+ 0xB => [0x27E9,0,810], # \rangle
275
+ 0xC => [0x2223,0,606], # \vert
276
+ 0xD => [0x2225,0,606], # \Vert
277
+ 0xE => [0x2F,0,810], # /
278
+ 0xF => [0x5C,0,810], # \
279
+
280
+ 0x46 => [0x2A06,0,750], # \bigsqcup
281
+ 0x48 => [0x222E,0,805], # \oint
282
+ 0x4A => [0x2A00,0,750], # \bigodot
283
+ 0x4C => [0x2A01,0,750], # \bigoplus
284
+ 0x4E => [0x2A02,0,750], # \bigotimes
285
+
286
+ 0x50 => [0x2211,0,750], # \sum
287
+ 0x51 => [0x220F,0,750], # \prod
288
+ 0x52 => [0x222B,0,805], # \int
289
+ 0x53 => [0x22C3,0,750], # \bigcup
290
+ 0x54 => [0x22C2,0,750], # \bigcap
291
+ 0x55 => [0x2A04,0,750], # \biguplus
292
+ 0x56 => [0x22C0,0,750], # \bigwedge
293
+ 0x57 => [0x22C1,0,750], # \bigvee
294
+
295
+ 0x60 => [0x2210,0,750], # \coprod
296
+ 0x62 => 0x2C6, # \widehat
297
+ 0x62 => [0x302,-556,0], # \widehat (combining)
298
+ 0x65 => 0x2DC, # \widetilde
299
+ 0x65 => [0x303,-556,0], # \widetilde (combining)
300
+
301
+ 0x70 => [0x221A,0,810], # surd
302
+ 0x3F => [0x23D0,0,601], # arrow extension
303
+ 0x77 => [0x2016,0,601], # Arrow extension (non-standard)
304
+ 0x78 => [0x2191,0,600], # uparrow top
305
+ 0x79 => [0x2193,0,600], # downarrow bottom
306
+ 0x7E => [0x21D1,0,600], # Uparrow top
307
+ 0x7F => [0x21D3,0,600], # Downarrow bottom
308
+ ],
309
+
310
+ "Size2" => [
311
+ 0x10 => [0x28,0,1110], # (
312
+ 0x11 => [0x29,0,1110], # )
313
+ 0x2E => [0x2F,0,1110], # /
314
+ 0x2F => [0x5C,0,1110], # \
315
+ 0x44 => [0x27E8,0,1110],# \langle
316
+ 0x45 => [0x27E9,0,1110],# \rangle
317
+
318
+ 0x47 => [0x2A06,0,950], # \bigsqcup
319
+ 0x49 => [0x222E,0,1360],# \oint
320
+ 0x4B => [0x2A00,0,950], # \bigodot
321
+ 0x4D => [0x2A01,0,950], # \bigoplus
322
+ 0x4F => [0x2A02,0,950], # \bigotimes
323
+
324
+ 0x58 => [0x2211,0,950], # \sum
325
+ 0x59 => [0x220F,0,950], # \prod
326
+ 0x5A => [0x222B,0,1360],# \int
327
+ 0x5B => [0x22C3,0,950], # \bigcup
328
+ 0x5C => [0x22C2,0,950], # \bigcap
329
+ 0x5D => [0x2A04,0,950], # \biguplus
330
+ 0x5E => [0x22C0,0,950], # \bigwedge
331
+ 0x5F => [0x22C1,0,950], # \bigvee
332
+ 0x61 => [0x2210,0,950], # \coprod
333
+
334
+ 0x63 => 0x2C6, # \widehat
335
+ 0x63 => [0x302,-1000,0],# \widehat (combining)
336
+ 0x66 => 0x2DC, # \widetilde
337
+ 0x66 => [0x303,-1000,0],# \widetilde (combining)
338
+
339
+ 0x68 => [0x5B,0,1110], # [
340
+ 0x69 => [0x5D,0,1110], # ]
341
+ 0x6A => [0x230A,0,1110],# \lfloor
342
+ 0x6B => [0x230B,0,1110],# \rfloor
343
+ 0x6C => [0x2308,0,1110],# \lceil
344
+ 0x6D => [0x2309,0,1110],# \rceil
345
+ 0x6E => [0x7B,0,1110], # {
346
+ 0x6F => [0x7D,0,1110], # }
347
+ 0x71 => [0x221A,0,1110],# surd
348
+ ],
349
+
350
+ "Size3" => [
351
+ 0x12 => [0x28,0,1410], # (
352
+ 0x13 => [0x29,0,1410], # )
353
+ 0x14 => [0x5B,0,1410], # [
354
+ 0x15 => [0x5D,0,1410], # ]
355
+ 0x16 => [0x230A,0,1410],# \lfloor
356
+ 0x17 => [0x230B,0,1410],# \rfloor
357
+ 0x18 => [0x2308,0,1410],# \lceil
358
+ 0x19 => [0x2309,0,1410],# \rceil
359
+ 0x1A => [0x7B,0,1410], # {
360
+ 0x1B => [0x7D,0,1410], # }
361
+ 0x1C => [0x27E8,0,1410],# \langle
362
+ 0x1D => [0x27E9,0,1410],# \rangle
363
+ 0x1E => [0x2F,0,1410], # /
364
+ 0x1F => [0x5C,0,1410], # \
365
+ 0x64 => 0x2C6, # \widehat
366
+ 0x64 => [0x302,-1444,0],# \widehat (combining)
367
+ 0x67 => 0x2DC, # \widetilde
368
+ 0x67 => [0x303,-1444,0],# \widetilde (combining)
369
+ 0x72 => [0x221A,0,1410],# surd
370
+ ],
371
+
372
+ "Size4" => [
373
+ 0x20 => [0x28,0,1710], # (
374
+ 0x21 => [0x29,0,1710], # )
375
+ 0x22 => [0x5B,0,1710], # [
376
+ 0x23 => [0x5D,0,1710], # ]
377
+ 0x24 => [0x230A,0,1710],# \lfloor
378
+ 0x25 => [0x230B,0,1710],# \rfloor
379
+ 0x26 => [0x2308,0,1710],# \lceil
380
+ 0x27 => [0x2309,0,1710],# \rceil
381
+ 0x28 => [0x7B,0,1710], # {
382
+ 0x29 => [0x7D,0,1710], # }
383
+ 0x2A => [0x27E8,0,1710],# \langle
384
+ 0x2B => [0x27E9,0,1710],# \rangle
385
+ 0x2C => [0x2F,0,1710], # /
386
+ 0x2D => [0x5C,0,1710], # \
387
+ 0x73 => [0x221A,0,1710],# surd
388
+
389
+ 0x30 => [0x239B,0,1115],# left paren upper hook
390
+ 0x31 => [0x239E,0,1115],# right paren upper hook
391
+ 0x32 => [0x23A1,0,1115],# left square bracket upper corner
392
+ 0x33 => [0x23A4,0,1115],# right square bracket upper corner
393
+ 0x34 => [0x23A3,0,1115],# left square bracket lower corner
394
+ 0x35 => [0x23A6,0,1115],# right square bracket lower hook
395
+ 0x36 => [0x23A2,0,601], # left square bracket extension
396
+ 0x37 => [0x23A5,0,601], # right square bracket extension
397
+ 0x38 => [0x23A7,0,900], # left curly brace upper hook
398
+ 0x39 => [0x23AB,0,900], # right curly brace upper hook
399
+ 0x3A => 0x23A9, # left curly brace lower hook
400
+ 0x3B => 0x23AD, # right curly brace lower hook
401
+ 0x3C => [0x23A8,0,1150],# left curly brace middle
402
+ 0x3D => [0x23AC,0,1150],# right curly brace middle
403
+ 0x3E => [0x23AA,0,300], # curly brace extension
404
+
405
+ 0x40 => [0x239D,0,1115],# left paren lower hook
406
+ 0x41 => [0x23A0,0,1115],# right paren lower hook
407
+ 0x42 => [0x239C,0,600], # left paren extension
408
+ 0x43 => [0x239F,0,600], # right paren extension
409
+
410
+ 0x74 => [0x23B7,0,915], # radical bottom
411
+ 0x75 => [0xE000,0,605], # radical extension (PUA)
412
+ 0x76 => [0xE001,0,565], # radical top (PUA)
413
+ [0x7A,0x7D] => 0xE150, # \braceld, \bracerd, \bracelu, \braceru (PUA)
414
+ ],
415
+ };
416
+
417
+ $map{cmti10} = {
418
+ "Main-Italic" => [
419
+ [0,1] => 0x393, # \Gamma, \Delta
420
+ 2 => 0x398, # \Theta
421
+ 3 => 0x39B, # \Lambda
422
+ 4 => 0x39E, # \Xi
423
+ 5 => 0x3A0, # \Pi
424
+ 6 => 0x3A3, # \Sigma
425
+ [7,8] => 0x3A5, # \Upsilon, \Phi
426
+ [9,0xA] => 0x3A8, # \Psi, \Omega
427
+
428
+ 0x10 => 0x131, # \imath (roman)
429
+ 0x11 => 0x237, # \jmath (roman)
430
+ 0x12 => [0x300,-511,0], # \grave (combining)
431
+ 0x13 => [0x301,-511,0], # \acute (combining)
432
+ 0x14 => [0x30C,-511,0], # \check (combining)
433
+ 0x15 => [0x306,-511,0], # \breve (combining)
434
+ 0x16 => [0x304,-511,0], # \bar (combining)
435
+ 0x17 => [0x30A,-671,0], # ring above (combining)
436
+
437
+ [0x21,0x23] => 0x21, # !, ", #,
438
+ 0x22 => 0x201D, # "
439
+ 0x24 => 0xA3, # pound sign
440
+ [0x25,0x2F] => 0x25, # %, &, ', (, ), *, +, comma, -, ., /
441
+ 0x27 => 0x2019, # '
442
+ [0x30,0x39] => 0x30, # 0-9
443
+ [0x3A,0x3B] => 0x3A, # :, ;
444
+ 0x3D => 0x3D, # =
445
+ [0x3F,0x40] => 0x3F, # ?, @
446
+ [0x41,0x5A] => 0x41, # A-Z
447
+ 0x5B => 0x5B, # [
448
+ 0x5C => 0x201C, # ``
449
+ [0x5D,0x5E] => 0x5D, # ], ^
450
+ 0x5E => [0x302,-511,0], # \hat (combining)
451
+ 0x5F => [0x307,-409,0], # \dot (combining)
452
+ 0x60 => 0x2018, # `
453
+ [0x61,0x7A] => 0x61, # a-z
454
+ [0x7B,0x7C] => 0x2013, # \endash, \emdash
455
+ 0x7B => [0x5F,0,-310], # underline
456
+ 0x7D => [0x30B,-511,0], # double acute (combining)
457
+ 0x7E => [0x7E,0,-350], # ~
458
+ 0x7E => [0x303,-511,0], # \tilde (combining)
459
+ 0x7F => [0x308,-511,0], # \ddot (combining)
460
+ ],
461
+ };
462
+
463
+ $map{cmbx10} = {
464
+ "Main-Bold" => [
465
+ [0,1] => 0x393, # \Gamma, \Delta
466
+ 2 => 0x398, # \Theta
467
+ 3 => 0x39B, # \Lambda
468
+ 4 => 0x39E, # \Xi
469
+ 5 => 0x3A0, # \Pi
470
+ 6 => 0x3A3, # \Sigma
471
+ [7,8] => 0x3A5, # \Upsilon, \Phi
472
+ [9,0xA] => 0x3A8, # \Psi, \Omega
473
+
474
+ 0x10 => 0x131, # \imath (roman bold)
475
+ 0x11 => 0x237, # \jmath (roman bold)
476
+ 0x12 => 0x60, # \grave
477
+ 0x12 => 0x2CB, # \grave
478
+ 0x12 => [0x300,-575,0], # \grave (combining)
479
+ 0x13 => 0xB4, # \acute
480
+ 0x13 => 0x2CA, # \acute
481
+ 0x13 => [0x301,-575,0], # \acute (combining)
482
+ 0x14 => 0x2C7, # \check
483
+ 0x14 => [0x30C,-575,0], # \check (combining)
484
+ 0x15 => 0x2D8, # \breve
485
+ 0x15 => [0x306,-575,0], # \breve (combining)
486
+ 0x16 => 0xAF, # \bar
487
+ 0x16 => 0x2C9, # \bar
488
+ 0x16 => [0x304,-575,0], # \bar (combining)
489
+ 0x17 => [0xB0,-147,0], # ring above
490
+ 0x17 => [0x2DA,-147,0], # ring above
491
+ 0x17 => [0x30A,-722,0], # ring above (combining)
492
+
493
+ [0x21,0x2F] => 0x21, # !, ", #, $, %, &, ', (, ), *, +, comma, -, ., /
494
+ 0x22 => 0x201D, # "
495
+ 0x27 => 0x2019, # '
496
+ [0x30,0x39] => 0x30, # 0-9
497
+ [0x3A,0x3B] => 0x3A, # :, ;
498
+ 0x3D => 0x3D, # =
499
+ [0x3F,0x40] => 0x3F, # ?, @
500
+ [0x41,0x5A] => 0x41, # A-Z
501
+ 0x5B => 0x5B, # [
502
+ 0x5C => 0x201C, # ``
503
+ [0x5D,0x5E] => 0x5D, # ], ^
504
+ 0x5E => 0x2C6, # \hat
505
+ 0x5E => [0x302,-575,0], # \hat (combining)
506
+ 0x5F => [0x2D9,128,0], # \dot
507
+ 0x5F => [0x307,-447,0], # \dot (combining)
508
+ 0x60 => 0x2018, # `
509
+ [0x61,0x7A] => 0x61, # a-z
510
+ [0x7B,0x7C] => 0x2013, # \endash, \emdash
511
+ 0x7B => [0x5F,0,-310], # underline
512
+ 0x7D => [0x30B,-575,0], # double acute (combining)
513
+ 0x7E => [0x7E,0,-350], # ~
514
+ 0x7E => 0x2DC, # \tilde
515
+ 0x7E => [0x303,-575,0], # \tilde (combining)
516
+ 0x7F => 0xA8, # \ddot
517
+ 0x7F => [0x308,-575,0], # \ddot (combining)
518
+ ],
519
+ };
520
+
521
+ $map{cmmib10} = {
522
+ "Math-BoldItalic" => [
523
+ [0,1] => 0x393, # \Gamma, \Delta
524
+ 2 => 0x398, # \Theta
525
+ 3 => 0x39B, # \Lambda
526
+ 4 => 0x39E, # \Xi
527
+ 5 => 0x3A0, # \Pi
528
+ 6 => 0x3A3, # \Sigma
529
+ [7,8] => 0x3A5, # \Upsilon, \Phi
530
+ [9,0xA] => 0x3A8, # \Psi, \Omega
531
+
532
+ [0xB,0xE] => 0x3B1, # \alpha, \beta, \gamma, \delta
533
+ 0xF => 0x3F5, # \elpsilon
534
+ [0x10,0x18] => 0x3B6, # \zeta, \eta, \theta, \iota, \kappa, \lambda, \mu, \nu, \xi
535
+ [0x19,0x1A] => 0x3C0, # \pi, \rho
536
+ [0x1B,0x1D] => 0x3C3, # \sigma, \tau, \upsilon
537
+ 0x1E => 0x3D5, # \phi
538
+ [0x1F,0x21] => 0x3C7, # \chi, \psi, \omega
539
+ 0x22 => 0x3B5, # \varepsilon
540
+ 0x23 => 0x3D1, # \vartheta
541
+ 0x24 => 0x3D6, # \varpi
542
+ 0x25 => 0x3F1, # \varrho
543
+ 0x26 => 0x3C2, # \varsigma
544
+ 0x27 => 0x3C6, # \varphi
545
+
546
+ [0x41,0x5A] => 0x41, # A-Z
547
+ [0x61,0x7A] => 0x61, # a - z
548
+ 0x6F => 0x3BF, # omicron
549
+ ],
550
+
551
+ "Main-Bold" => [
552
+ 0x28 => 0x21BC, # \leftharpoonup
553
+ 0x29 => 0x21BD, # \leftharpoondown
554
+ 0x2A => 0x21C0, # \rightharpoonup
555
+ 0x2B => 0x21C1, # \rightharpoondown
556
+
557
+ 0x2E => 0x25B9, # \triangleright
558
+ 0x2F => 0x25C3, # \triangleleft
559
+
560
+ 0x3A => 0x2E, # .
561
+ 0x3B => 0x2C, # ,
562
+ 0x3C => 0x3C, # <
563
+ 0x3D => 0x2215, # /
564
+ 0x3E => 0x3E, # >
565
+ 0x3F => 0x22C6, # \star
566
+ 0x40 => 0x2202, # \partial
567
+
568
+ [0x5B,0x5D] => 0x266D, # \flat, \natural, \sharp
569
+ 0x5E => 0x2323, # \smile
570
+ 0x5F => 0x2322, # \frown
571
+ 0x60 => 0x2113, # \ell
572
+ 0x68 => 0x210F, # \hbar (bar added below)
573
+
574
+ 0x7B => 0x131, # \imath
575
+ 0x7C => 0x237, # \jmath
576
+ 0x7D => 0x2118, # \wp
577
+ 0x7E => [0x20D7,-729,0],# \vec
578
+ ],
579
+ };
580
+
581
+ $map{cmbsy10} = {
582
+ "Main-Bold" => [
583
+ [0,1] => 0x2212, # -
584
+ 1 => 0x22C5, # \cdot
585
+ 2 => 0xD7, # \times
586
+ 3 => 0x2217, # \ast
587
+ 4 => 0xF7, # \div
588
+ 5 => 0x22C4, # \diamond
589
+ 6 => 0xB1, # \pm
590
+ 7 => 0x2213, # \mp
591
+ [8,0xC] => 0x2295, # \oplus, \ominus, \otimes, \oslash, \odot
592
+ 0xD => 0x25EF, # \bigcirc
593
+ [0xE,0xF] => 0x2218, # \circ, \bullet
594
+
595
+ 0x10 => 0x224D, # \asymp
596
+ 0x11 => 0x2261, # \equiv
597
+ [0x12,0x13] => 0x2286, # \subseteq, \supseteq
598
+ [0x14,0x15] => 0x2264, # \leq, \geq
599
+ [0x16,0x17] => 0x2AAF, # \preceq, \succeq
600
+ 0x18 => 0x223C, # \sim
601
+ 0x19 => 0x2248, # \approx
602
+ [0x1A,0x1B] => 0x2282, # \subset, \supset
603
+ [0x1C,0x1D] => 0x226A, # \ll, \gg
604
+ [0x1E,0x1F] => 0x227A, # \prec, \succ
605
+
606
+ 0x20 => 0x2190, # \leftarrow
607
+ 0x21 => 0x2192, # \rightarrow
608
+ 0x22 => 0x2191, # \uparrow
609
+ 0x23 => 0x2193, # \downarrow
610
+ 0x24 => 0x2194, # \leftrightarrow
611
+ 0x25 => 0x2197, # \nearrow
612
+ 0x26 => 0x2198, # \searrow
613
+ 0x27 => 0x2243, # \simeq
614
+
615
+ 0x28 => 0x21D0, # \Leftarrow
616
+ 0x29 => 0x21D2, # \Rightarrow
617
+ 0x2A => 0x21D1, # \Uparrow
618
+ 0x2B => 0x21D3, # \Downarrow
619
+ 0x2C => 0x21D4, # \Leftrightarrow
620
+ 0x2D => 0x2196, # \nwarrow
621
+ 0x2E => 0x2199, # \swarrow
622
+ 0x2F => 0x221D, # \propto
623
+
624
+ 0x30 => 0x2032, # \prime
625
+ 0x31 => 0x221E, # \infty
626
+ 0x32 => 0x2208, # \in
627
+ 0x33 => 0x220B, # \ni
628
+ 0x34 => 0x25B3, # \bigtriangleup and \triangle
629
+ 0x35 => 0x25BD, # \bigtriangledown
630
+ 0x36 => [0x338,-894,0], # \not (combining)
631
+
632
+ 0x38 => 0x2200, # \forall
633
+ 0x39 => 0x2203, # \exists
634
+ 0x3A => 0xAC, # \neg
635
+ 0x3B => 0x2205, # \emptyset
636
+ 0x3C => 0x211C, # \Re
637
+ 0x3D => 0x2111, # \Im
638
+ 0x3E => 0x22A4, # \top
639
+ 0x3F => 0x22A5, # \bot
640
+
641
+ 0x40 => 0x2135, # \aleph
642
+
643
+ 0x5B => 0x222A, # \cup
644
+ 0x5C => 0x2229, # \cap
645
+ 0x5D => 0x228E, # \uplus
646
+ [0x5E,0x5F] => 0x2227, # \wedge, \vee
647
+
648
+ [0x60,0x61] => 0x22A2, # \vdash, \dashv
649
+ [0x62,0x63] => 0x230A, # \lfloor, \rfloor
650
+ [0x64,0x65] => 0x2308, # \lceil, \rceil
651
+ 0x66 => 0x7B, # {
652
+ 0x67 => 0x7D, # }
653
+ [0x68,0x69] => 0x27E8, # \langle, \rangle
654
+ 0x6A => 0x7C, # |
655
+ 0x6A => 0x2223, # \vert
656
+ 0x6B => 0x2225, # \Vert
657
+ 0x6C => 0x2195, # \updownarrow
658
+ 0x6D => 0x21D5, # \Updownarrow
659
+ 0x6E => 0x5C, # \backslash
660
+ 0x6E => 0x2216, # \setminus
661
+ 0x6F => 0x2240, # \wr
662
+
663
+ 0x70 => [0x221A,0,760], # \surd ### adjust position so font doesn't have a large depth
664
+ 0x71 => 0x2A3F, # \amalg
665
+ 0x72 => 0x2207, # \nabla
666
+ 0x73 => 0x222B, # \int
667
+ 0x74 => 0x2294, # \sqcup
668
+ 0x75 => 0x2293, # \sqcap
669
+ [0x76,0x77] => 0x2291, # \sqsubseteq, \sqsupseteq
670
+
671
+ [0x79,0x7A] => 0x2020, # \dagger, \ddagger
672
+
673
+ 0x7C => 0x2663, # \clubsuit
674
+ 0x7D => 0x2662, # \diamondsuit
675
+ 0x7E => 0x2661, # \heartsuit
676
+ 0x7F => 0x2660, # \spadesuit
677
+ ],
678
+
679
+ "Math-BoldItalic" => [
680
+ 0x36 => 0x2F # \not
681
+ ],
682
+ };
683
+
684
+ $map{msam10} = {
685
+ "Main-Regular" => [
686
+ 0x5C => 0x2220, # \angle
687
+ ],
688
+
689
+ "Main-Bold" => [
690
+ 0x5C => 0x2220, # \angle (emboldened below)
691
+ ],
692
+
693
+ "AMS" => [
694
+ 0x00 => 0x22A1, # \boxdot
695
+ 0x01 => 0x229E, # \boxplus
696
+ 0x02 => 0x22A0, # \boxtimes
697
+ 0x03 => 0x25A1, # \square
698
+ 0x04 => 0x25A0, # \blacksquare
699
+ 0x05 => 0x22C5, # \centerdot
700
+ 0x06 => 0x25CA, # \lozenge
701
+ 0x07 => 0x29EB, # \blacklozenge
702
+ 0x08 => 0x21BB, # \circlearrowright
703
+ 0x09 => 0x21BA, # \circlearrowleft
704
+ 0x0A => 0x21CC, # \rightleftharpoons
705
+ 0x0B => 0x21CB, # \leftrightharpoons
706
+ 0x0C => 0x229F, # \boxminus
707
+ 0x0D => 0x22A9, # \Vdash
708
+ 0x0E => 0x22AA, # \Vvdash
709
+ 0x0F => 0x22A8, # \vDash
710
+ 0x10 => 0x21A0, # \twoheadrightarrow
711
+ 0x11 => 0x219E, # \twoheadleftarrow
712
+ 0x12 => 0x21C7, # \leftleftarrows
713
+ 0x13 => 0x21C9, # \rightrightarrows
714
+ 0x14 => 0x21C8, # \upuparrows
715
+ 0x15 => 0x21CA, # \downdownarrows
716
+ 0x16 => 0x21BE, # \upharpoonright
717
+ 0x17 => 0x21C2, # \downharpoonright
718
+ 0x18 => 0x21BF, # \upharpoonleft
719
+ 0x19 => 0x21C3, # \downharpoonleft
720
+ 0x1A => 0x21A3, # \rightarrowtail
721
+ 0x1B => 0x21A2, # \leftarrowtail
722
+ 0x1C => 0x21C6, # \leftrightarrows
723
+ 0x1D => 0x21C4, # \rightleftarrows
724
+ 0x1E => 0x21B0, # \Lsh
725
+ 0x1F => 0x21B1, # \Rsh
726
+ 0x20 => 0x21DD, # \rightsquigarrow
727
+ 0x21 => 0x21AD, # \leftrightsquigarrow
728
+ 0x22 => 0x21AB, # \looparrowleft
729
+ 0x23 => 0x21AC, # \looparrowright
730
+ 0x24 => 0x2257, # \circeq
731
+ 0x25 => 0x227F, # \succsim
732
+ 0x26 => 0x2273, # \gtrsim
733
+ 0x27 => 0x2A86, # \gtrapprox
734
+ 0x28 => 0x22B8, # \multimap
735
+ 0x29 => 0x2234, # \therefore
736
+ 0x2A => 0x2235, # \because
737
+ 0x2B => 0x2251, # \doteqdot
738
+ 0x2C => 0x225C, # \triangleq
739
+ 0x2D => 0x227E, # \precsim
740
+ 0x2E => 0x2272, # \lesssim
741
+ 0x2F => 0x2A85, # \lessapprox
742
+ 0x30 => 0x2A95, # \eqslantless
743
+ 0x31 => 0x2A96, # \eqslantgtr
744
+ 0x32 => 0x22DE, # \curlyeqprec
745
+ 0x33 => 0x22DF, # \curlyeqsucc
746
+ 0x34 => 0x227C, # \preccurlyeq
747
+ 0x35 => 0x2266, # \leqq
748
+ 0x36 => 0x2A7D, # \leqslant
749
+ 0x37 => 0x2276, # \lessgtr
750
+ 0x38 => 0x2035, # \backprime
751
+ 0x39 => 0x2212, # dahsed arrow extension
752
+ 0x3A => 0x2253, # \risingdotseq
753
+ 0x3B => 0x2252, # \fallingdotseq
754
+ 0x3C => 0x227D, # \succcurlyeq
755
+ 0x3D => 0x2267, # \geqq
756
+ 0x3E => 0x2A7E, # \geqslant
757
+ 0x3F => 0x2277, # \gtrless
758
+ 0x40 => 0x228F, # \sqsubset
759
+ 0x41 => 0x2290, # \sqsupset
760
+ 0x42 => 0x22B3, # \vartriangleright
761
+ 0x43 => 0x22B2, # \vartriangleleft
762
+ 0x44 => 0x22B5, # \trianglerighteq
763
+ 0x45 => 0x22B4, # \trianglelefteq
764
+ 0x46 => 0x2605, # \bigstar
765
+ 0x47 => 0x226C, # \between
766
+ 0x48 => 0x25BC, # \blacktriangledown
767
+ 0x49 => 0x25B6, # \blacktriangleright
768
+ 0x4A => 0x25C0, # \blacktriangleleft
769
+ 0x4B => 0x2192, # rightarrow
770
+ 0x4C => 0x2190, # leftarrow
771
+ 0x4D => 0x25B3, # \vartriangle
772
+ 0x4E => 0x25B2, # \blacktriangle
773
+ 0x4F => 0x25BD, # \triangledown
774
+ 0x50 => 0x2256, # \eqcirc
775
+ 0x51 => 0x22DA, # \lesseqgtr
776
+ 0x52 => 0x22DB, # \gtreqless
777
+ 0x53 => 0x2A8B, # \lesseqqgtr
778
+ 0x54 => 0x2A8C, # \gtreqqless
779
+ 0x55 => 0x00A5, # yen
780
+ 0x56 => 0x21DB, # \Rrightarrow
781
+ 0x57 => 0x21DA, # \Lleftarrow
782
+ 0x58 => 0x2713, # checkmark
783
+ 0x59 => 0x22BB, # \veebar
784
+ 0x5A => 0x22BC, # \barwedge
785
+ 0x5B => 0x2A5E, # \doublebarwedge
786
+ 0x5C => 0x2220, # \angle
787
+ 0x5D => 0x2221, # \measuredangle
788
+ 0x5E => 0x2222, # \sphericalangle
789
+ 0x5F => 0x221D, # \varpropto
790
+ 0x60 => 0x2323, # \smallsmile
791
+ 0x61 => 0x2322, # \smallfrown
792
+ 0x62 => 0x22D0, # \Subset
793
+ 0x63 => 0x22D1, # \Supset
794
+ 0x64 => 0x22D3, # \Cup
795
+ 0x65 => 0x22D2, # \Cap
796
+ 0x66 => 0x22CF, # \curlywedge
797
+ 0x67 => 0x22CE, # \curlyvee
798
+ 0x68 => 0x22CB, # \leftthreetimes
799
+ 0x69 => 0x22CC, # \rightthreetimes
800
+ 0x6A => 0x2AC5, # \subseteqq
801
+ 0x6B => 0x2AC6, # \supseteqq
802
+ 0x6C => 0x224F, # \bumpeq
803
+ 0x6D => 0x224E, # \Bumpeq
804
+ 0x6E => 0x22D8, # \lll
805
+ 0x6F => 0x22D9, # \ggg
806
+ 0x70 => 0x250C, # \ulcorner
807
+ 0x71 => 0x2510, # \urcorner
808
+ 0x72 => 0x00AE, # registered sign
809
+ 0x73 => 0x24C8, # \circledS
810
+ 0x74 => 0x22D4, # \pitchfork
811
+ 0x75 => 0x2214, # \dotplus
812
+ 0x76 => 0x223D, # \backsim
813
+ 0x77 => 0x22CD, # \backsimeq
814
+ 0x78 => 0x2514, # \llcorner
815
+ 0x79 => 0x2518, # \lrcorner
816
+ 0x7A => 0x2720, # maltese cross
817
+ 0x7B => 0x2201, # \complement
818
+ 0x7C => 0x22BA, # \intercal
819
+ 0x7D => 0x229A, # \circledcirc
820
+ 0x7E => 0x229B, # \circledast
821
+ 0x7F => 0x229D, # \circleddash
822
+ ],
823
+ };
824
+
825
+ $map{msbm10} = {
826
+ "Size4" => [
827
+ 0x5B => 0x2C6, # \widehat
828
+ 0x5B => [0x302,-1889,0],# \widehat (combining)
829
+ 0x5D => 0x2DC, # \widetilde
830
+ 0x5D => [0x303,-1889,0],# \widetilde (combining)
831
+ ],
832
+
833
+ "Main-Regular" => [
834
+ 0x7E => 0x210F, # \hbar
835
+ ],
836
+
837
+ "Main-Italic" => [
838
+ 0x7D => 0x210F, # \hbar (with slant)
839
+ ],
840
+
841
+ "AMS" => [
842
+ 0x00 => 0xE00C, # \lvertneqq
843
+ 0x01 => 0xE00D, # \gvertneqq
844
+ 0x02 => 0x2270, # \nleq
845
+ 0x03 => 0x2271, # \ngeq
846
+ 0x04 => 0x226E, # \nless
847
+ 0x05 => 0x226F, # \ngtr
848
+ 0x06 => 0x2280, # \nprec
849
+ 0x07 => 0x2281, # \nsucc
850
+ 0x08 => 0x2268, # \lneqq
851
+ 0x09 => 0x2269, # \gneqq
852
+ 0x0A => 0xE010, # \nleqslant
853
+ 0x0B => 0xE00F, # \ngeqslant
854
+ 0x0C => 0x2A87, # \lneq
855
+ 0x0D => 0x2A88, # \gneq
856
+ 0x0E => 0x22E0, # \npreceq
857
+ 0x0F => 0x22E1, # \nsucceq
858
+ 0x10 => 0x22E8, # \precnsim
859
+ 0x11 => 0x22E9, # \succnsim
860
+ 0x12 => 0x22E6, # \lnsim
861
+ 0x13 => 0x22E7, # \gnsim
862
+ 0x14 => 0xE011, # \nleqq
863
+ 0x15 => 0xE00E, # \ngeqq
864
+ 0x16 => 0x2AB5, # \precneqq
865
+ 0x17 => 0x2AB6, # \succneqq
866
+ 0x18 => 0x2AB9, # \precnapprox
867
+ 0x19 => 0x2ABA, # \succnapprox
868
+ 0x1A => 0x2A89, # \lnapprox
869
+ 0x1B => 0x2A8A, # \gnapprox
870
+ 0x1C => 0x2241, # \nsim
871
+ 0x1D => 0x2246, # \ncong
872
+ 0x1E => 0x2571, # \diagup
873
+ 0x1F => 0x2572, # \diagdown
874
+ 0x20 => 0xE01A, # \varsubsetneq
875
+ 0x21 => 0xE01B, # \varsupsetneq
876
+ 0x22 => 0xE016, # \nsubseteqq
877
+ 0x23 => 0xE018, # \nsupseteqq
878
+ 0x24 => 0x2ACB, # \subsetneqq
879
+ 0x25 => 0x2ACC, # \supsetneqq
880
+ 0x26 => 0xE017, # \varsubsetneqq
881
+ 0x27 => 0xE019, # \varsupsetneqq
882
+ 0x28 => 0x228A, # \subsetneq
883
+ 0x29 => 0x228B, # \supsetneq
884
+ 0x2A => 0x2288, # \nsubseteq
885
+ 0x2B => 0x2289, # \nsupseteq
886
+ 0x2C => 0x2226, # \nparallel
887
+ 0x2D => 0x2224, # \nmid
888
+ 0x2E => 0xE006, # \nshortmid
889
+ 0x2F => 0xE007, # \nshortparallel
890
+ 0x30 => 0x22AC, # \nvdash
891
+ 0x31 => 0x22AE, # \nVdash
892
+ 0x32 => 0x22AD, # \nvDash
893
+ 0x33 => 0x22AF, # \nVDash
894
+ 0x34 => 0x22ED, # \ntrianglerighteq
895
+ 0x35 => 0x22EC, # \ntrianglelefteq
896
+ 0x36 => 0x22EA, # \ntriangleleft
897
+ 0x37 => 0x22EB, # \ntriangleright
898
+ 0x38 => 0x219A, # \nleftarrow
899
+ 0x39 => 0x219B, # \nrightarrow
900
+ 0x3A => 0x21CD, # \nLeftarrow
901
+ 0x3B => 0x21CF, # \nRightarrow
902
+ 0x3C => 0x21CE, # \nLeftrightarrow
903
+ 0x3D => 0x21AE, # \nleftrightarrow
904
+ 0x3E => 0x22C7, # \divideontimes
905
+ 0x3F => 0x2205, # \varnothing
906
+ 0x40 => 0x2204, # \nexists
907
+
908
+ [0x41,0x5A] => 0x41, # A-Z
909
+ 0x5C => 0x2C6, # \widehat
910
+ 0x5C => [0x302,-2333,0],# \widehat (combining)
911
+ 0x5E => 0x2DC, # \widetilde
912
+ 0x5E => [0x303,-2333,0],# \widetilde (combining)
913
+
914
+ 0x60 => 0x2132, # \Finv
915
+ 0x61 => 0x2141, # \Game
916
+ 0x66 => 0x2127, # \mho
917
+ 0x67 => 0x00F0, # \eth
918
+ 0x68 => 0x2242, # minus-tilde
919
+ 0x69 => 0x2136, # \beth
920
+ 0x6A => 0x2137, # \gimel
921
+ 0x6B => 0x2138, # \daleth
922
+ 0x6C => 0x22D6, # \lessdot
923
+ 0x6D => 0x22D7, # \gtrdot
924
+ 0x6E => 0x22C9, # \ltimes
925
+ 0x6F => 0x22CA, # \rtimes
926
+ 0x70 => 0x2223, # \shortmid
927
+ 0x71 => 0x2225, # \shortparallel
928
+ 0x72 => 0x2216, # \smallsetminus
929
+ 0x73 => 0x223C, # \thicksim
930
+ 0x74 => 0x2248, # \thickapprox
931
+ 0x75 => 0x224A, # \approxeq
932
+ 0x76 => 0x2AB8, # \succapprox
933
+ 0x77 => 0x2AB7, # \precapprox
934
+ 0x78 => 0x21B6, # \curvearrowleft
935
+ 0x79 => 0x21B7, # \curvearrowright
936
+ 0x7A => 0x03DD, # \digamma
937
+ 0x7B => 0x03F0, # \varkappa
938
+ 0x7A => 0xE008, # \digamma (non-standard, for IE)
939
+ 0x7B => 0xE009, # \varkappa (non-standard, for IE)
940
+ 0x7C => 0x006B, # \Bbbk
941
+ 0x7D => 0x210F, # \hslash
942
+ 0x7E => 0x0127, # \hbar
943
+ 0x7F => 0x220D, # \backepsilon
944
+ ],
945
+ };
946
+
947
+ foreach $cmfont (keys %map) {
948
+ foreach $mjfont (keys %{$map{$cmfont}}) {
949
+ $style = $mjfont; $style =~ s/.*?(-|$)//; $style = "Regular" unless $style;
950
+ $family = $mjfont; $family =~ s/-.*//;
951
+ $fontname = "$family-$style";
952
+ @{$reverse{$fontname}{$cmfont}} = @{$map{$cmfont}{$mjfont}};
953
+ }
954
+ }
955
+
956
+ my %output;
957
+
958
+ sub add_to_output {
959
+ my ($mjfont,$cmfont,$from,$to) = @_;
960
+
961
+ my $xshift = 0, $yshift = 0;
962
+
963
+ if (ref($to) eq "ARRAY") {
964
+ $xshift = $to->[1];
965
+ $yshift = $to->[2];
966
+ $to = $to->[0];
967
+ }
968
+
969
+ $data = {
970
+ "font" => $cmfont,
971
+ "char" => $from,
972
+ "xshift" => $xshift,
973
+ "yshift" => $yshift
974
+ };
975
+
976
+ $output{$mjfont}{$to} = $data;
977
+ }
978
+
979
+ foreach $mjfont (keys %reverse) {
980
+ foreach $cmfont (keys %{$reverse{$mjfont}}) {
981
+ @remap = @{$reverse{$mjfont}{$cmfont}};
982
+ while (defined($item = shift(@remap))) {
983
+ $remap = shift(@remap);
984
+
985
+ if (ref($item) eq "ARRAY") {
986
+ foreach $from ($item->[0]...$item->[1]) {
987
+ $to = $from - $item->[0] + $remap;
988
+ add_to_output($mjfont, $cmfont, $from, $to);
989
+ }
990
+ } else {
991
+ add_to_output($mjfont, $cmfont, $item, $remap);
992
+ }
993
+ }
994
+ }
995
+ }
996
+
997
+ print(encode_json(\%output));