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.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +184 -0
- data/Rakefile +2 -0
- data/bin/hyhyhy +59 -0
- data/hyhyhy.gemspec +29 -0
- data/lib/hyhyhy.rb +101 -0
- data/lib/hyhyhy/config.rb +29 -0
- data/lib/hyhyhy/frames.rb +108 -0
- data/lib/hyhyhy/logger.rb +40 -0
- data/lib/hyhyhy/parser.rb +9 -0
- data/lib/hyhyhy/structure/.bowerrc +5 -0
- data/lib/hyhyhy/structure/.hyhyhy +5 -0
- data/lib/hyhyhy/structure/README.md +0 -0
- data/lib/hyhyhy/structure/_assets/javascripts/main.js +395 -0
- data/lib/hyhyhy/structure/_assets/stylesheets/main.css +520 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/.bower.json +47 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/Gruntfile.js +472 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/LICENSE +21 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/README.md +129 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/bower.json +38 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.css +470 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap-theme.min.css +5 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.css +6332 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/css/bootstrap.min.css +5 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/bootstrap.js +2320 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/dist/js/npm.js +13 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.svg +229 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/.jshintrc +7 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-commonjs-generator.js +23 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-lessdoc-parser.js +238 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/bs-raw-files-generator.js +46 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/configBridge.json +44 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/grunt/sauce_browsers.yml +82 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/.jscsrc +34 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/.jshintrc +15 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/affix.js +162 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/alert.js +94 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/button.js +116 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/carousel.js +240 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/collapse.js +211 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/dropdown.js +161 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/modal.js +324 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/popover.js +119 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/scrollspy.js +175 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/tab.js +153 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/tooltip.js +478 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/js/transition.js +59 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/.csscomb.json +304 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/.csslintrc +19 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/alerts.less +68 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/badges.less +61 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/bootstrap.less +50 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/breadcrumbs.less +26 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/button-groups.less +243 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/buttons.less +160 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/carousel.less +267 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/close.less +33 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/code.less +69 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/component-animations.less +34 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/dropdowns.less +213 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/forms.less +546 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/glyphicons.less +234 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/grid.less +84 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/input-groups.less +166 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/jumbotron.less +49 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/labels.less +64 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/list-group.less +124 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/media.less +47 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins.less +39 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/alerts.less +14 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/background-variant.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/border-radius.less +18 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/buttons.less +52 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/center-block.less +7 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/clearfix.less +22 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/forms.less +85 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/gradients.less +59 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/grid-framework.less +91 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/grid.less +122 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/hide-text.less +21 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/image.less +33 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/labels.less +12 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/list-group.less +29 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/nav-divider.less +10 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/nav-vertical-align.less +9 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/opacity.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/pagination.less +23 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/panels.less +24 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/progress-bar.less +10 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/reset-filter.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/resize.less +6 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/responsive-visibility.less +15 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/size.less +10 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/tab-focus.less +9 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/table-row.less +28 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/text-emphasis.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/text-overflow.less +8 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/mixins/vendor-prefixes.less +227 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/modals.less +148 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/navbar.less +660 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/navs.less +244 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/normalize.less +427 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/pager.less +54 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/pagination.less +88 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/panels.less +261 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/popovers.less +135 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/print.less +107 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/progress-bars.less +87 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/responsive-embed.less +35 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/responsive-utilities.less +194 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/scaffolding.less +150 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/tables.less +234 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/theme.less +272 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/thumbnails.less +36 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/tooltip.less +103 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/type.less +302 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/utilities.less +56 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/variables.less +856 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/less/wells.less +29 -0
- data/lib/hyhyhy/structure/_includes/bootstrap/package.json +82 -0
- data/lib/hyhyhy/structure/_includes/bower.json +9 -0
- data/lib/hyhyhy/structure/_includes/d3/.bower.json +37 -0
- data/lib/hyhyhy/structure/_includes/d3/CONTRIBUTING.md +25 -0
- data/lib/hyhyhy/structure/_includes/d3/LICENSE +26 -0
- data/lib/hyhyhy/structure/_includes/d3/README.md +9 -0
- data/lib/hyhyhy/structure/_includes/d3/bower.json +26 -0
- data/lib/hyhyhy/structure/_includes/d3/d3.js +9470 -0
- data/lib/hyhyhy/structure/_includes/d3/d3.min.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/.bower.json +38 -0
- data/lib/hyhyhy/structure/_includes/jquery/MIT-LICENSE.txt +21 -0
- data/lib/hyhyhy/structure/_includes/jquery/bower.json +27 -0
- data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.js +9190 -0
- data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.min.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/dist/jquery.min.map +1 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax.js +806 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/jsonp.js +89 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/load.js +75 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/parseJSON.js +13 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/parseXML.js +28 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/script.js +64 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/var/nonce.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/var/rquery.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/ajax/xhr.js +135 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes.js +11 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/attr.js +143 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/classes.js +158 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/prop.js +96 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/support.js +35 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/attributes/val.js +163 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/callbacks.js +205 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core.js +498 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/access.js +60 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/init.js +123 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/parseHTML.js +39 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/ready.js +97 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/core/var/rsingleTag.js +4 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css.js +451 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/addGetHookIf.js +24 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/curCSS.js +57 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/defaultDisplay.js +70 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/support.js +91 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/swap.js +28 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/cssExpand.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/getStyles.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/isHidden.js +13 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/rmargin.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/css/var/rnumnonpx.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data.js +179 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data/Data.js +181 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data/accepts.js +20 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data/var/data_priv.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/data/var/data_user.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/deferred.js +149 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/deprecated.js +13 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/dimensions.js +50 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/effects.js +649 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/effects/Tween.js +114 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/effects/animatedSelector.js +13 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/event.js +868 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/event/alias.js +39 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/event/support.js +9 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/exports/amd.js +24 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/exports/global.js +32 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/intro.js +44 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/jquery.js +36 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/manipulation.js +582 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/_evalUrl.js +18 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/support.js +31 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/offset.js +204 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/outro.js +1 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/queue.js +142 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/queue/delay.js +22 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/selector-native.js +172 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/selector-sizzle.js +14 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/selector.js +1 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/serialize.js +111 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.js +2044 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/traversing.js +200 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/traversing/findFilter.js +100 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/arr.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/class2type.js +4 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/concat.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/hasOwn.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/indexOf.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/pnum.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/push.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/rnotwhite.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/slice.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/strundefined.js +3 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/support.js +4 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/var/toString.js +5 -0
- data/lib/hyhyhy/structure/_includes/jquery/src/wrap.js +78 -0
- data/lib/hyhyhy/structure/_includes/katex/.arcconfig +4 -0
- data/lib/hyhyhy/structure/_includes/katex/.bower.json +14 -0
- data/lib/hyhyhy/structure/_includes/katex/.gitignore +5 -0
- data/lib/hyhyhy/structure/_includes/katex/.hyhyhy +10 -0
- data/lib/hyhyhy/structure/_includes/katex/.jshintrc +67 -0
- data/lib/hyhyhy/structure/_includes/katex/.travis.yml +4 -0
- data/lib/hyhyhy/structure/_includes/katex/CONTRIBUTING.md +112 -0
- data/lib/hyhyhy/structure/_includes/katex/LICENSE.txt +21 -0
- data/lib/hyhyhy/structure/_includes/katex/Makefile +61 -0
- data/lib/hyhyhy/structure/_includes/katex/README.md +50 -0
- data/lib/hyhyhy/structure/_includes/katex/cli.js +15 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/HuxleyTests/Dockerfile +13 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/HuxleyTests/README.md +29 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/Dockerfile +34 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/README.md +55 -0
- data/lib/hyhyhy/structure/_includes/katex/dockers/MathJaxFonts/copy_fonts.sh +47 -0
- data/lib/hyhyhy/structure/_includes/katex/katex.js +54 -0
- data/lib/hyhyhy/structure/_includes/katex/lint_blacklist.txt +8 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/README.md +21 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/extract_tfms.py +94 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/extract_ttfs.py +75 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/mapping.pl +997 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/parse_tfm.py +201 -0
- data/lib/hyhyhy/structure/_includes/katex/metrics/replace_line.py +17 -0
- data/lib/hyhyhy/structure/_includes/katex/package.json +30 -0
- data/lib/hyhyhy/structure/_includes/katex/server.js +77 -0
- data/lib/hyhyhy/structure/_includes/katex/src/Lexer.js +190 -0
- data/lib/hyhyhy/structure/_includes/katex/src/Options.js +85 -0
- data/lib/hyhyhy/structure/_includes/katex/src/ParseError.js +40 -0
- data/lib/hyhyhy/structure/_includes/katex/src/Parser.js +639 -0
- data/lib/hyhyhy/structure/_includes/katex/src/Style.js +126 -0
- data/lib/hyhyhy/structure/_includes/katex/src/buildCommon.js +271 -0
- data/lib/hyhyhy/structure/_includes/katex/src/buildTree.js +1167 -0
- data/lib/hyhyhy/structure/_includes/katex/src/delimiter.js +541 -0
- data/lib/hyhyhy/structure/_includes/katex/src/domTree.js +241 -0
- data/lib/hyhyhy/structure/_includes/katex/src/fontMetrics.js +129 -0
- data/lib/hyhyhy/structure/_includes/katex/src/functions.js +539 -0
- data/lib/hyhyhy/structure/_includes/katex/src/parseTree.js +17 -0
- data/lib/hyhyhy/structure/_includes/katex/src/symbols.js +1006 -0
- data/lib/hyhyhy/structure/_includes/katex/src/utils.js +97 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts.less +73 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-BoldItalic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Italic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Greek-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Math-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.eot +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/lib/hyhyhy/structure/_includes/katex/static/index.html +17 -0
- data/lib/hyhyhy/structure/_includes/katex/static/katex.less +430 -0
- data/lib/hyhyhy/structure/_includes/katex/static/main.css +12 -0
- data/lib/hyhyhy/structure/_includes/katex/static/main.js +42 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfile.json +199 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Accents.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Accents.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Baseline.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Baseline.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BasicTest.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BasicTest.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BinomTest.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/BinomTest.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Colors.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Colors.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DeepFontSizing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DeepFontSizing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DelimiterSizing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DelimiterSizing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DisplayStyle.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/DisplayStyle.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Exponents.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Exponents.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/FractionTest.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/FractionTest.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Functions.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Functions.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/GreekLetters.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/GreekLetters.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/KaTeX.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/KaTeX.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Lap.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Lap.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRight.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRight.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightListStyling.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightListStyling.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightStyleSizing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/LeftRightStyleSizing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NestedFractions.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NestedFractions.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NullDelimiterInteraction.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/NullDelimiterInteraction.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/OpLimits.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/OpLimits.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Overline.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Overline.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/PrimeSpacing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/PrimeSpacing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/RlapBug.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/RlapBug.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Rule.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Rule.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sizing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sizing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SizingBaseline.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SizingBaseline.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Spacing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Spacing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sqrt.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Sqrt.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubCharacterBox.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubCharacterBox.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubHorizSpacing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubHorizSpacing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubOffsets.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/SupSubOffsets.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Text.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/Text.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/VerticalSpacing.hux/firefox-1.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/Huxleyfolder/VerticalSpacing.record.json +5 -0
- data/lib/hyhyhy/structure/_includes/katex/test/huxley/test.html +30 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/MIT.LICENSE +20 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/boot.js +120 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/console.js +166 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine-html.js +390 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine.css +61 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine.js +2593 -0
- data/lib/hyhyhy/structure/_includes/katex/test/jasmine/jasmine_favicon.png +0 -0
- data/lib/hyhyhy/structure/_includes/katex/test/katex-spec.js +1179 -0
- data/lib/hyhyhy/structure/_includes/katex/test/test.html +12 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/.bower.json +61 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/.hyhyhy +17 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/LICENSE +362 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/README.md +70 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/bower.json +50 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics-demo-dark.css +640 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics-demo.css +176 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/css/metricsgraphics.css +344 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/images/missing-data-dark.png +0 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/images/missing-data.png +0 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/js/metricsgraphics.min.js +590 -0
- data/lib/hyhyhy/structure/_includes/metrics-graphics/package.json +35 -0
- data/lib/hyhyhy/structure/_includes/prism/.bower.json +34 -0
- data/lib/hyhyhy/structure/_includes/prism/.hyhyhy +33 -0
- data/lib/hyhyhy/structure/_includes/prism/LICENSE +21 -0
- data/lib/hyhyhy/structure/_includes/prism/README.md +22 -0
- data/lib/hyhyhy/structure/_includes/prism/bower.json +26 -0
- data/lib/hyhyhy/structure/_includes/prism/components.js +233 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-apacheconf.js +46 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-apacheconf.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-aspnet.js +49 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-aspnet.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-autohotkey.js +27 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-autohotkey.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-bash.js +24 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-bash.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-c.js +26 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-c.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-clike.js +32 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-clike.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-coffeescript.js +18 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-coffeescript.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-core.js +424 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-core.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-cpp.js +12 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-cpp.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-csharp.js +6 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-csharp.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-css-extras.js +15 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-css-extras.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-css.js +50 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-css.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-gherkin.js +13 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-gherkin.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-git.js +68 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-git.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-go.js +9 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-go.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-groovy.js +43 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-groovy.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-handlebars.js +92 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-handlebars.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-haskell.js +32 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-haskell.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-http.js +44 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-http.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-ini.js +11 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-ini.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-java.js +8 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-java.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js +27 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-javascript.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-latex.js +6 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-latex.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-markup.js +41 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-markup.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-nasm.js +20 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-nasm.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-nsis.js +19 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-nsis.min.js +5 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-objectivec.js +5 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-objectivec.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-perl.js +112 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-perl.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-php-extras.js +11 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-php-extras.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-php.js +99 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-php.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-python.js +14 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-python.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-rip.js +29 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-rip.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-ruby.js +21 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-ruby.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scala.js +8 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scala.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scheme-min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scheme.js +24 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scss.js +36 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-scss.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-sql.js +17 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-sql.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-swift.js +8 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-swift.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-twig.js +46 -0
- data/lib/hyhyhy/structure/_includes/prism/components/prism-twig.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/gulpfile.js +48 -0
- data/lib/hyhyhy/structure/_includes/prism/package.json +27 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.css +3 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.js +66 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/autolinker/prism-autolinker.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/file-highlight/prism-file-highlight.js +54 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/file-highlight/prism-file-highlight.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.css +3 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.js +42 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/ie8/prism-ie8.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.css +47 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.js +109 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-highlight/prism-line-highlight.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.css +40 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.js +24 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/line-numbers/prism-line-numbers.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.css +17 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.js +15 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-invisibles/prism-show-invisibles.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.css +21 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.js +16 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.min.css +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/show-language/prism-show-language.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.css +11 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.js +163 -0
- data/lib/hyhyhy/structure/_includes/prism/plugins/wpd/prism-wpd.min.js +1 -0
- data/lib/hyhyhy/structure/_includes/prism/prism.js +662 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-coy.css +210 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-dark.css +122 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-funky.css +111 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-okaidia.css +114 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-tomorrow.css +115 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism-twilight.css +195 -0
- data/lib/hyhyhy/structure/_includes/prism/themes/prism.css +131 -0
- data/lib/hyhyhy/structure/_includes/prism/vendor/promise.js +5 -0
- data/lib/hyhyhy/structure/_layouts/default.erb +41 -0
- data/lib/hyhyhy/structure/_slides/1.introduction.md +36 -0
- data/lib/hyhyhy/structure/_slides/2.packages.md +52 -0
- data/lib/hyhyhy/structure/_slides/3.usage.md +146 -0
- data/lib/hyhyhy/version.rb +5 -0
- metadata +747 -0
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file deals with creating delimiters of various sizes. The TeXbook
|
|
3
|
+
* discusses these routines on page 441-442, in the "Another subroutine sets box
|
|
4
|
+
* x to a specified variable delimiter" paragraph.
|
|
5
|
+
*
|
|
6
|
+
* There are three main routines here. `makeSmallDelim` makes a delimiter in the
|
|
7
|
+
* normal font, but in either text, script, or scriptscript style.
|
|
8
|
+
* `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1,
|
|
9
|
+
* Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of
|
|
10
|
+
* smaller pieces that are stacked on top of one another.
|
|
11
|
+
*
|
|
12
|
+
* The functions take a parameter `center`, which determines if the delimiter
|
|
13
|
+
* should be centered around the axis.
|
|
14
|
+
*
|
|
15
|
+
* Then, there are three exposed functions. `sizedDelim` makes a delimiter in
|
|
16
|
+
* one of the given sizes. This is used for things like `\bigl`.
|
|
17
|
+
* `customSizedDelim` makes a delimiter with a given total height+depth. It is
|
|
18
|
+
* called in places like `\sqrt`. `leftRightDelim` makes an appropriate
|
|
19
|
+
* delimiter which surrounds an expression of a given height an depth. It is
|
|
20
|
+
* used in `\left` and `\right`.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
var ParseError = require("./ParseError");
|
|
24
|
+
var Style = require("./Style");
|
|
25
|
+
|
|
26
|
+
var buildCommon = require("./buildCommon");
|
|
27
|
+
var fontMetrics = require("./fontMetrics");
|
|
28
|
+
var symbols = require("./symbols");
|
|
29
|
+
var utils = require("./utils");
|
|
30
|
+
|
|
31
|
+
var makeSpan = buildCommon.makeSpan;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get the metrics for a given symbol and font, after transformation (i.e.
|
|
35
|
+
* after following replacement from symbols.js)
|
|
36
|
+
*/
|
|
37
|
+
var getMetrics = function(symbol, font) {
|
|
38
|
+
if (symbols.math[symbol] && symbols.math[symbol].replace) {
|
|
39
|
+
return fontMetrics.getCharacterMetrics(
|
|
40
|
+
symbols.math[symbol].replace, font);
|
|
41
|
+
} else {
|
|
42
|
+
return fontMetrics.getCharacterMetrics(
|
|
43
|
+
symbol, font);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Builds a symbol in the given font size (note size is an integer)
|
|
49
|
+
*/
|
|
50
|
+
var mathrmSize = function(value, size, mode) {
|
|
51
|
+
return buildCommon.makeSymbol(value, "Size" + size + "-Regular", mode);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Puts a delimiter span in a given style, and adds appropriate height, depth,
|
|
56
|
+
* and maxFontSizes.
|
|
57
|
+
*/
|
|
58
|
+
var styleWrap = function(delim, toStyle, options) {
|
|
59
|
+
var span = makeSpan(
|
|
60
|
+
["style-wrap", options.style.reset(), toStyle.cls()], [delim]);
|
|
61
|
+
|
|
62
|
+
var multiplier = toStyle.sizeMultiplier / options.style.sizeMultiplier;
|
|
63
|
+
|
|
64
|
+
span.height *= multiplier;
|
|
65
|
+
span.depth *= multiplier;
|
|
66
|
+
span.maxFontSize = toStyle.sizeMultiplier;
|
|
67
|
+
|
|
68
|
+
return span;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Makes a small delimiter. This is a delimiter that comes in the Main-Regular
|
|
73
|
+
* font, but is restyled to either be in textstyle, scriptstyle, or
|
|
74
|
+
* scriptscriptstyle.
|
|
75
|
+
*/
|
|
76
|
+
var makeSmallDelim = function(delim, style, center, options, mode) {
|
|
77
|
+
var text = buildCommon.makeSymbol(delim, "Main-Regular", mode);
|
|
78
|
+
|
|
79
|
+
var span = styleWrap(text, style, options);
|
|
80
|
+
|
|
81
|
+
if (center) {
|
|
82
|
+
var shift =
|
|
83
|
+
(1 - options.style.sizeMultiplier / style.sizeMultiplier) *
|
|
84
|
+
fontMetrics.metrics.axisHeight;
|
|
85
|
+
|
|
86
|
+
span.style.top = shift + "em";
|
|
87
|
+
span.height -= shift;
|
|
88
|
+
span.depth += shift;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return span;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Makes a large delimiter. This is a delimiter that comes in the Size1, Size2,
|
|
96
|
+
* Size3, or Size4 fonts. It is always rendered in textstyle.
|
|
97
|
+
*/
|
|
98
|
+
var makeLargeDelim = function(delim, size, center, options, mode) {
|
|
99
|
+
var inner = mathrmSize(delim, size, mode);
|
|
100
|
+
|
|
101
|
+
var span = styleWrap(
|
|
102
|
+
makeSpan(["delimsizing", "size" + size],
|
|
103
|
+
[inner], options.getColor()),
|
|
104
|
+
Style.TEXT, options);
|
|
105
|
+
|
|
106
|
+
if (center) {
|
|
107
|
+
var shift = (1 - options.style.sizeMultiplier) *
|
|
108
|
+
fontMetrics.metrics.axisHeight;
|
|
109
|
+
|
|
110
|
+
span.style.top = shift + "em";
|
|
111
|
+
span.height -= shift;
|
|
112
|
+
span.depth += shift;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return span;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Make an inner span with the given offset and in the given font. This is used
|
|
120
|
+
* in `makeStackedDelim` to make the stacking pieces for the delimiter.
|
|
121
|
+
*/
|
|
122
|
+
var makeInner = function(symbol, font, mode) {
|
|
123
|
+
var sizeClass;
|
|
124
|
+
// Apply the correct CSS class to choose the right font.
|
|
125
|
+
if (font === "Size1-Regular") {
|
|
126
|
+
sizeClass = "delim-size1";
|
|
127
|
+
} else if (font === "Size4-Regular") {
|
|
128
|
+
sizeClass = "delim-size4";
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
var inner = makeSpan(
|
|
132
|
+
["delimsizinginner", sizeClass],
|
|
133
|
+
[makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]);
|
|
134
|
+
|
|
135
|
+
// Since this will be passed into `makeVList` in the end, wrap the element
|
|
136
|
+
// in the appropriate tag that VList uses.
|
|
137
|
+
return {type: "elem", elem: inner};
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Make a stacked delimiter out of a given delimiter, with the total height at
|
|
142
|
+
* least `heightTotal`. This routine is mentioned on page 442 of the TeXbook.
|
|
143
|
+
*/
|
|
144
|
+
var makeStackedDelim = function(delim, heightTotal, center, options, mode) {
|
|
145
|
+
// There are four parts, the top, an optional middle, a repeated part, and a
|
|
146
|
+
// bottom.
|
|
147
|
+
var top, middle, repeat, bottom;
|
|
148
|
+
top = repeat = bottom = delim;
|
|
149
|
+
middle = null;
|
|
150
|
+
// Also keep track of what font the delimiters are in
|
|
151
|
+
var font = "Size1-Regular";
|
|
152
|
+
|
|
153
|
+
// We set the parts and font based on the symbol. Note that we use
|
|
154
|
+
// '\u23d0' instead of '|' and '\u2016' instead of '\\|' for the
|
|
155
|
+
// repeats of the arrows
|
|
156
|
+
if (delim === "\\uparrow") {
|
|
157
|
+
repeat = bottom = "\u23d0";
|
|
158
|
+
} else if (delim === "\\Uparrow") {
|
|
159
|
+
repeat = bottom = "\u2016";
|
|
160
|
+
} else if (delim === "\\downarrow") {
|
|
161
|
+
top = repeat = "\u23d0";
|
|
162
|
+
} else if (delim === "\\Downarrow") {
|
|
163
|
+
top = repeat = "\u2016";
|
|
164
|
+
} else if (delim === "\\updownarrow") {
|
|
165
|
+
top = "\\uparrow";
|
|
166
|
+
repeat = "\u23d0";
|
|
167
|
+
bottom = "\\downarrow";
|
|
168
|
+
} else if (delim === "\\Updownarrow") {
|
|
169
|
+
top = "\\Uparrow";
|
|
170
|
+
repeat = "\u2016";
|
|
171
|
+
bottom = "\\Downarrow";
|
|
172
|
+
} else if (delim === "[" || delim === "\\lbrack") {
|
|
173
|
+
top = "\u23a1";
|
|
174
|
+
repeat = "\u23a2";
|
|
175
|
+
bottom = "\u23a3";
|
|
176
|
+
font = "Size4-Regular";
|
|
177
|
+
} else if (delim === "]" || delim === "\\rbrack") {
|
|
178
|
+
top = "\u23a4";
|
|
179
|
+
repeat = "\u23a5";
|
|
180
|
+
bottom = "\u23a6";
|
|
181
|
+
font = "Size4-Regular";
|
|
182
|
+
} else if (delim === "\\lfloor") {
|
|
183
|
+
repeat = top = "\u23a2";
|
|
184
|
+
bottom = "\u23a3";
|
|
185
|
+
font = "Size4-Regular";
|
|
186
|
+
} else if (delim === "\\lceil") {
|
|
187
|
+
top = "\u23a1";
|
|
188
|
+
repeat = bottom = "\u23a2";
|
|
189
|
+
font = "Size4-Regular";
|
|
190
|
+
} else if (delim === "\\rfloor") {
|
|
191
|
+
repeat = top = "\u23a5";
|
|
192
|
+
bottom = "\u23a6";
|
|
193
|
+
font = "Size4-Regular";
|
|
194
|
+
} else if (delim === "\\rceil") {
|
|
195
|
+
top = "\u23a4";
|
|
196
|
+
repeat = bottom = "\u23a5";
|
|
197
|
+
font = "Size4-Regular";
|
|
198
|
+
} else if (delim === "(") {
|
|
199
|
+
top = "\u239b";
|
|
200
|
+
repeat = "\u239c";
|
|
201
|
+
bottom = "\u239d";
|
|
202
|
+
font = "Size4-Regular";
|
|
203
|
+
} else if (delim === ")") {
|
|
204
|
+
top = "\u239e";
|
|
205
|
+
repeat = "\u239f";
|
|
206
|
+
bottom = "\u23a0";
|
|
207
|
+
font = "Size4-Regular";
|
|
208
|
+
} else if (delim === "\\{" || delim === "\\lbrace") {
|
|
209
|
+
top = "\u23a7";
|
|
210
|
+
middle = "\u23a8";
|
|
211
|
+
bottom = "\u23a9";
|
|
212
|
+
repeat = "\u23aa";
|
|
213
|
+
font = "Size4-Regular";
|
|
214
|
+
} else if (delim === "\\}" || delim === "\\rbrace") {
|
|
215
|
+
top = "\u23ab";
|
|
216
|
+
middle = "\u23ac";
|
|
217
|
+
bottom = "\u23ad";
|
|
218
|
+
repeat = "\u23aa";
|
|
219
|
+
font = "Size4-Regular";
|
|
220
|
+
} else if (delim === "\\surd") {
|
|
221
|
+
top = "\ue001";
|
|
222
|
+
bottom = "\u23b7";
|
|
223
|
+
repeat = "\ue000";
|
|
224
|
+
font = "Size4-Regular";
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Get the metrics of the four sections
|
|
228
|
+
var topMetrics = getMetrics(top, font);
|
|
229
|
+
var topHeightTotal = topMetrics.height + topMetrics.depth;
|
|
230
|
+
var repeatMetrics = getMetrics(repeat, font);
|
|
231
|
+
var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth;
|
|
232
|
+
var bottomMetrics = getMetrics(bottom, font);
|
|
233
|
+
var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth;
|
|
234
|
+
var middleMetrics, middleHeightTotal;
|
|
235
|
+
if (middle !== null) {
|
|
236
|
+
middleMetrics = getMetrics(middle, font);
|
|
237
|
+
middleHeightTotal = middleMetrics.height + middleMetrics.depth;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Calcuate the real height that the delimiter will have. It is at least the
|
|
241
|
+
// size of the top, bottom, and optional middle combined.
|
|
242
|
+
var realHeightTotal = topHeightTotal + bottomHeightTotal;
|
|
243
|
+
if (middle !== null) {
|
|
244
|
+
realHeightTotal += middleHeightTotal;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Then add repeated pieces until we reach the specified height.
|
|
248
|
+
while (realHeightTotal < heightTotal) {
|
|
249
|
+
realHeightTotal += repeatHeightTotal;
|
|
250
|
+
if (middle !== null) {
|
|
251
|
+
// If there is a middle section, we need an equal number of pieces
|
|
252
|
+
// on the top and bottom.
|
|
253
|
+
realHeightTotal += repeatHeightTotal;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// The center of the delimiter is placed at the center of the axis. Note
|
|
258
|
+
// that in this context, "center" means that the delimiter should be
|
|
259
|
+
// centered around the axis in the current style, while normally it is
|
|
260
|
+
// centered around the axis in textstyle.
|
|
261
|
+
var axisHeight = fontMetrics.metrics.axisHeight;
|
|
262
|
+
if (center) {
|
|
263
|
+
axisHeight *= options.style.sizeMultiplier;
|
|
264
|
+
}
|
|
265
|
+
// Calculate the depth
|
|
266
|
+
var depth = realHeightTotal / 2 - axisHeight;
|
|
267
|
+
|
|
268
|
+
// Now, we start building the pieces that will go into the vlist
|
|
269
|
+
|
|
270
|
+
// Keep a list of the inner pieces
|
|
271
|
+
var inners = [];
|
|
272
|
+
|
|
273
|
+
// Add the bottom symbol
|
|
274
|
+
inners.push(makeInner(bottom, font, mode));
|
|
275
|
+
|
|
276
|
+
var i;
|
|
277
|
+
if (middle === null) {
|
|
278
|
+
// Calculate the number of repeated symbols we need
|
|
279
|
+
var repeatHeight = realHeightTotal - topHeightTotal - bottomHeightTotal;
|
|
280
|
+
var symbolCount = Math.ceil(repeatHeight / repeatHeightTotal);
|
|
281
|
+
|
|
282
|
+
// Add that many symbols
|
|
283
|
+
for (i = 0; i < symbolCount; i++) {
|
|
284
|
+
inners.push(makeInner(repeat, font, mode));
|
|
285
|
+
}
|
|
286
|
+
} else {
|
|
287
|
+
// When there is a middle bit, we need the middle part and two repeated
|
|
288
|
+
// sections
|
|
289
|
+
|
|
290
|
+
// Calculate the number of symbols needed for the top and bottom
|
|
291
|
+
// repeated parts
|
|
292
|
+
var topRepeatHeight =
|
|
293
|
+
realHeightTotal / 2 - topHeightTotal - middleHeightTotal / 2;
|
|
294
|
+
var topSymbolCount = Math.ceil(topRepeatHeight / repeatHeightTotal);
|
|
295
|
+
|
|
296
|
+
var bottomRepeatHeight =
|
|
297
|
+
realHeightTotal / 2 - topHeightTotal - middleHeightTotal / 2;
|
|
298
|
+
var bottomSymbolCount =
|
|
299
|
+
Math.ceil(bottomRepeatHeight / repeatHeightTotal);
|
|
300
|
+
|
|
301
|
+
// Add the top repeated part
|
|
302
|
+
for (i = 0; i < topSymbolCount; i++) {
|
|
303
|
+
inners.push(makeInner(repeat, font, mode));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// Add the middle piece
|
|
307
|
+
inners.push(makeInner(middle, font, mode));
|
|
308
|
+
|
|
309
|
+
// Add the bottom repeated part
|
|
310
|
+
for (i = 0; i < bottomSymbolCount; i++) {
|
|
311
|
+
inners.push(makeInner(repeat, font, mode));
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Add the top symbol
|
|
316
|
+
inners.push(makeInner(top, font, mode));
|
|
317
|
+
|
|
318
|
+
// Finally, build the vlist
|
|
319
|
+
var inner = buildCommon.makeVList(inners, "bottom", depth, options);
|
|
320
|
+
|
|
321
|
+
return styleWrap(
|
|
322
|
+
makeSpan(["delimsizing", "mult"], [inner], options.getColor()),
|
|
323
|
+
Style.TEXT, options);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
// There are three kinds of delimiters, delimiters that stack when they become
|
|
327
|
+
// too large
|
|
328
|
+
var stackLargeDelimiters = [
|
|
329
|
+
"(", ")", "[", "\\lbrack", "]", "\\rbrack",
|
|
330
|
+
"\\{", "\\lbrace", "\\}", "\\rbrace",
|
|
331
|
+
"\\lfloor", "\\rfloor", "\\lceil", "\\rceil",
|
|
332
|
+
"\\surd"
|
|
333
|
+
];
|
|
334
|
+
|
|
335
|
+
// delimiters that always stack
|
|
336
|
+
var stackAlwaysDelimiters = [
|
|
337
|
+
"\\uparrow", "\\downarrow", "\\updownarrow",
|
|
338
|
+
"\\Uparrow", "\\Downarrow", "\\Updownarrow",
|
|
339
|
+
"|", "\\|", "\\vert", "\\Vert"
|
|
340
|
+
];
|
|
341
|
+
|
|
342
|
+
// and delimiters that never stack
|
|
343
|
+
var stackNeverDelimiters = [
|
|
344
|
+
"<", ">", "\\langle", "\\rangle", "/", "\\backslash"
|
|
345
|
+
];
|
|
346
|
+
|
|
347
|
+
// Metrics of the different sizes. Found by looking at TeX's output of
|
|
348
|
+
// $\bigl| // \Bigl| \biggl| \Biggl| \showlists$
|
|
349
|
+
// Used to create stacked delimiters of appropriate sizes in makeSizedDelim.
|
|
350
|
+
var sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0];
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4.
|
|
354
|
+
*/
|
|
355
|
+
var makeSizedDelim = function(delim, size, options, mode) {
|
|
356
|
+
// < and > turn into \langle and \rangle in delimiters
|
|
357
|
+
if (delim === "<") {
|
|
358
|
+
delim = "\\langle";
|
|
359
|
+
} else if (delim === ">") {
|
|
360
|
+
delim = "\\rangle";
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// Sized delimiters are never centered.
|
|
364
|
+
if (utils.contains(stackLargeDelimiters, delim) ||
|
|
365
|
+
utils.contains(stackNeverDelimiters, delim)) {
|
|
366
|
+
return makeLargeDelim(delim, size, false, options, mode);
|
|
367
|
+
} else if (utils.contains(stackAlwaysDelimiters, delim)) {
|
|
368
|
+
return makeStackedDelim(
|
|
369
|
+
delim, sizeToMaxHeight[size], false, options, mode);
|
|
370
|
+
} else {
|
|
371
|
+
throw new ParseError("Illegal delimiter: '" + delim + "'");
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* There are three different sequences of delimiter sizes that the delimiters
|
|
377
|
+
* follow depending on the kind of delimiter. This is used when creating custom
|
|
378
|
+
* sized delimiters to decide whether to create a small, large, or stacked
|
|
379
|
+
* delimiter.
|
|
380
|
+
*
|
|
381
|
+
* In real TeX, these sequences aren't explicitly defined, but are instead
|
|
382
|
+
* defined inside the font metrics. Since there are only three sequences that
|
|
383
|
+
* are possible for the delimiters that TeX defines, it is easier to just encode
|
|
384
|
+
* them explicitly here.
|
|
385
|
+
*/
|
|
386
|
+
|
|
387
|
+
// Delimiters that never stack try small delimiters and large delimiters only
|
|
388
|
+
var stackNeverDelimiterSequence = [
|
|
389
|
+
{type: "small", style: Style.SCRIPTSCRIPT},
|
|
390
|
+
{type: "small", style: Style.SCRIPT},
|
|
391
|
+
{type: "small", style: Style.TEXT},
|
|
392
|
+
{type: "large", size: 1},
|
|
393
|
+
{type: "large", size: 2},
|
|
394
|
+
{type: "large", size: 3},
|
|
395
|
+
{type: "large", size: 4}
|
|
396
|
+
];
|
|
397
|
+
|
|
398
|
+
// Delimiters that always stack try the small delimiters first, then stack
|
|
399
|
+
var stackAlwaysDelimiterSequence = [
|
|
400
|
+
{type: "small", style: Style.SCRIPTSCRIPT},
|
|
401
|
+
{type: "small", style: Style.SCRIPT},
|
|
402
|
+
{type: "small", style: Style.TEXT},
|
|
403
|
+
{type: "stack"}
|
|
404
|
+
];
|
|
405
|
+
|
|
406
|
+
// Delimiters that stack when large try the small and then large delimiters, and
|
|
407
|
+
// stack afterwards
|
|
408
|
+
var stackLargeDelimiterSequence = [
|
|
409
|
+
{type: "small", style: Style.SCRIPTSCRIPT},
|
|
410
|
+
{type: "small", style: Style.SCRIPT},
|
|
411
|
+
{type: "small", style: Style.TEXT},
|
|
412
|
+
{type: "large", size: 1},
|
|
413
|
+
{type: "large", size: 2},
|
|
414
|
+
{type: "large", size: 3},
|
|
415
|
+
{type: "large", size: 4},
|
|
416
|
+
{type: "stack"}
|
|
417
|
+
];
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Get the font used in a delimiter based on what kind of delimiter it is.
|
|
421
|
+
*/
|
|
422
|
+
var delimTypeToFont = function(type) {
|
|
423
|
+
if (type.type === "small") {
|
|
424
|
+
return "Main-Regular";
|
|
425
|
+
} else if (type.type === "large") {
|
|
426
|
+
return "Size" + type.size + "-Regular";
|
|
427
|
+
} else if (type.type === "stack") {
|
|
428
|
+
return "Size4-Regular";
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Traverse a sequence of types of delimiters to decide what kind of delimiter
|
|
434
|
+
* should be used to create a delimiter of the given height+depth.
|
|
435
|
+
*/
|
|
436
|
+
var traverseSequence = function(delim, height, sequence, options) {
|
|
437
|
+
// Here, we choose the index we should start at in the sequences. In smaller
|
|
438
|
+
// sizes (which correspond to larger numbers in style.size) we start earlier
|
|
439
|
+
// in the sequence. Thus, scriptscript starts at index 3-3=0, script starts
|
|
440
|
+
// at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2
|
|
441
|
+
var start = Math.min(2, 3 - options.style.size);
|
|
442
|
+
for (var i = start; i < sequence.length; i++) {
|
|
443
|
+
if (sequence[i].type === "stack") {
|
|
444
|
+
// This is always the last delimiter, so we just break the loop now.
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
var metrics = getMetrics(delim, delimTypeToFont(sequence[i]));
|
|
449
|
+
var heightDepth = metrics.height + metrics.depth;
|
|
450
|
+
|
|
451
|
+
// Small delimiters are scaled down versions of the same font, so we
|
|
452
|
+
// account for the style change size.
|
|
453
|
+
|
|
454
|
+
if (sequence[i].type === "small") {
|
|
455
|
+
heightDepth *= sequence[i].style.sizeMultiplier;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// Check if the delimiter at this size works for the given height.
|
|
459
|
+
if (heightDepth > height) {
|
|
460
|
+
return sequence[i];
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// If we reached the end of the sequence, return the last sequence element.
|
|
465
|
+
return sequence[sequence.length - 1];
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Make a delimiter of a given height+depth, with optional centering. Here, we
|
|
470
|
+
* traverse the sequences, and create a delimiter that the sequence tells us to.
|
|
471
|
+
*/
|
|
472
|
+
var makeCustomSizedDelim = function(delim, height, center, options, mode) {
|
|
473
|
+
if (delim === "<") {
|
|
474
|
+
delim = "\\langle";
|
|
475
|
+
} else if (delim === ">") {
|
|
476
|
+
delim = "\\rangle";
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// Decide what sequence to use
|
|
480
|
+
var sequence;
|
|
481
|
+
if (utils.contains(stackNeverDelimiters, delim)) {
|
|
482
|
+
sequence = stackNeverDelimiterSequence;
|
|
483
|
+
} else if (utils.contains(stackLargeDelimiters, delim)) {
|
|
484
|
+
sequence = stackLargeDelimiterSequence;
|
|
485
|
+
} else {
|
|
486
|
+
sequence = stackAlwaysDelimiterSequence;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// Look through the sequence
|
|
490
|
+
var delimType = traverseSequence(delim, height, sequence, options);
|
|
491
|
+
|
|
492
|
+
// Depending on the sequence element we decided on, call the appropriate
|
|
493
|
+
// function.
|
|
494
|
+
if (delimType.type === "small") {
|
|
495
|
+
return makeSmallDelim(delim, delimType.style, center, options, mode);
|
|
496
|
+
} else if (delimType.type === "large") {
|
|
497
|
+
return makeLargeDelim(delim, delimType.size, center, options, mode);
|
|
498
|
+
} else if (delimType.type === "stack") {
|
|
499
|
+
return makeStackedDelim(delim, height, center, options, mode);
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Make a delimiter for use with `\left` and `\right`, given a height and depth
|
|
505
|
+
* of an expression that the delimiters surround.
|
|
506
|
+
*/
|
|
507
|
+
var makeLeftRightDelim = function(delim, height, depth, options, mode) {
|
|
508
|
+
// We always center \left/\right delimiters, so the axis is always shifted
|
|
509
|
+
var axisHeight =
|
|
510
|
+
fontMetrics.metrics.axisHeight * options.style.sizeMultiplier;
|
|
511
|
+
|
|
512
|
+
// Taken from TeX source, tex.web, function make_left_right
|
|
513
|
+
var delimiterFactor = 901;
|
|
514
|
+
var delimiterExtend = 5.0 / fontMetrics.metrics.ptPerEm;
|
|
515
|
+
|
|
516
|
+
var maxDistFromAxis = Math.max(
|
|
517
|
+
height - axisHeight, depth + axisHeight);
|
|
518
|
+
|
|
519
|
+
var totalHeight = Math.max(
|
|
520
|
+
// In real TeX, calculations are done using integral values which are
|
|
521
|
+
// 65536 per pt, or 655360 per em. So, the division here truncates in
|
|
522
|
+
// TeX but doesn't here, producing different results. If we wanted to
|
|
523
|
+
// exactly match TeX's calculation, we could do
|
|
524
|
+
// Math.floor(655360 * maxDistFromAxis / 500) *
|
|
525
|
+
// delimiterFactor / 655360
|
|
526
|
+
// (To see the difference, compare
|
|
527
|
+
// x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
|
|
528
|
+
// in TeX and KaTeX)
|
|
529
|
+
maxDistFromAxis / 500 * delimiterFactor,
|
|
530
|
+
2 * maxDistFromAxis - delimiterExtend);
|
|
531
|
+
|
|
532
|
+
// Finally, we defer to `makeCustomSizedDelim` with our calculated total
|
|
533
|
+
// height
|
|
534
|
+
return makeCustomSizedDelim(delim, totalHeight, true, options, mode);
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
module.exports = {
|
|
538
|
+
sizedDelim: makeSizedDelim,
|
|
539
|
+
customSizedDelim: makeCustomSizedDelim,
|
|
540
|
+
leftRightDelim: makeLeftRightDelim
|
|
541
|
+
};
|