jekyll-theme-hydejack 8.3.2 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1208 -0
- data/LICENSE.md +9 -3
- data/NOTICE.md +290 -0
- data/README.md +135 -93
- data/_config.yml +73 -0
- data/_includes/base-classes +9 -0
- data/_includes/body/analytics.html +1 -1
- data/_includes/body/comments.html +1 -1
- data/_includes/body/footer.html +3 -3
- data/_includes/body/index.html +17 -16
- data/_includes/body/main.html +3 -13
- data/_includes/body/menu.html +3 -2
- data/_includes/body/nav.html +4 -4
- data/_includes/body/scripts.html +5 -20
- data/_includes/body/sidebar-bg.html +13 -0
- data/_includes/body/sidebar-sticky.html +25 -0
- data/_includes/body/sidebar.html +7 -40
- data/_includes/components/about.html +1 -1
- data/_includes/components/author.html +3 -3
- data/_includes/components/hy-img.html +15 -26
- data/_includes/components/link.html +1 -1
- data/_includes/components/message.html +1 -1
- data/_includes/components/post-list-item.html +3 -5
- data/_includes/components/post.html +14 -11
- data/_includes/components/related-posts.html +14 -4
- data/_includes/components/tag-list.html +5 -1
- data/_includes/head/css/inline +1 -0
- data/_includes/head/index.html +14 -8
- data/_includes/head/links-static.html +27 -0
- data/_includes/head/links.html +1 -34
- data/_includes/head/meta-static.html +18 -0
- data/_includes/head/meta.html +9 -21
- data/_includes/head/page-style.html +1 -3
- data/_includes/head/scripts.html +13 -14
- data/_includes/head/styles-inline.html +19 -0
- data/_includes/head/styles-layout.html +4 -0
- data/_includes/head/styles-no-inline.html +8 -0
- data/_includes/head/styles.html +5 -46
- data/_includes/header.txt +1 -1
- data/_includes/if-non-null +7 -0
- data/_includes/my-body.html +1 -1
- data/_includes/my-scripts.html +1 -1
- data/_includes/scripts/load-js.min.js +1 -1
- data/_includes/scripts/nomodule.js +21 -0
- data/_includes/scripts/nomodule.min.js +1 -0
- data/_includes/smart-url +1 -0
- data/_includes/smart-url.txt +1 -1
- data/_includes/styles/common.scss +18 -0
- data/_includes/styles/inline.scss +16 -38
- data/_includes/styles/page-style.scss +5 -52
- data/_includes/styles/style.scss +22 -43
- data/_includes/styles/variables.scss +62 -0
- data/_includes/templates/animation.html +1 -1
- data/_includes/templates/back.html +3 -3
- data/_includes/templates/error.html +1 -1
- data/_includes/templates/forward.html +6 -0
- data/_includes/templates/index.html +10 -10
- data/_includes/templates/loading.html +1 -1
- data/_includes/templates/permalink.html +2 -2
- data/_layouts/about.html +1 -1
- data/_layouts/base.html +7 -2
- data/_layouts/blog.html +9 -7
- data/_layouts/compress.html +1 -1
- data/_layouts/default.html +4 -4
- data/_layouts/list.html +11 -17
- data/_layouts/page.html +1 -0
- data/_layouts/post.html +5 -3
- data/_sass/_mixins.scss +7 -21
- data/_sass/_spinner.scss +1 -1
- data/_sass/_syntax.scss +142 -130
- data/_sass/_variables.scss +2 -43
- data/_sass/html.scss +42 -0
- data/_sass/hydejack/__inline__/_avatar.scss +10 -10
- data/_sass/hydejack/__inline__/_base.scss +7 -21
- data/_sass/hydejack/__inline__/_content.scss +9 -2
- data/_sass/hydejack/__inline__/_images.scss +1 -3
- data/_sass/hydejack/__inline__/_links.scss +28 -13
- data/_sass/hydejack/__inline__/_menu.scss +42 -13
- data/_sass/hydejack/__inline__/_sidebar.scss +40 -14
- data/_sass/hydejack/__inline__/_social.scss +3 -0
- data/_sass/hydejack/__inline__/_toc.scss +55 -0
- data/_sass/hydejack/__inline__/_utilities.scss +3 -0
- data/_sass/hydejack/__link__/_avatar.scss +0 -4
- data/_sass/hydejack/__link__/_base.scss +1 -2
- data/_sass/hydejack/__link__/_break-layout.scss +17 -8
- data/_sass/hydejack/__link__/_content.scss +1 -0
- data/_sass/hydejack/__link__/_footer.scss +6 -8
- data/_sass/hydejack/__link__/_images.scss +8 -39
- data/_sass/hydejack/__link__/_katex.scss +1 -26
- data/_sass/hydejack/__link__/_links.scss +29 -20
- data/_sass/hydejack/__link__/_mark-external.scss +2 -7
- data/_sass/hydejack/__link__/_menu.scss +63 -8
- data/_sass/hydejack/__link__/_sidebar.scss +12 -9
- data/_sass/hydejack/__link__/_toc.scss +53 -0
- data/_sass/hydejack/__link__/_utilities.scss +3 -0
- data/_sass/hydejack/_avatar.pre.scss +10 -12
- data/_sass/hydejack/_base.pre.scss +7 -23
- data/_sass/hydejack/_break-layout.pre.scss +19 -10
- data/_sass/hydejack/_content.pre.scss +10 -2
- data/_sass/hydejack/_footer.pre.scss +6 -8
- data/_sass/hydejack/_images.pre.scss +9 -41
- data/_sass/hydejack/_katex.pre.scss +3 -28
- data/_sass/hydejack/_links.pre.scss +49 -19
- data/_sass/hydejack/_mark-external.pre.scss +2 -7
- data/_sass/hydejack/_menu.pre.scss +91 -22
- data/_sass/hydejack/_sidebar.pre.scss +48 -22
- data/_sass/hydejack/_social.pre.scss +3 -0
- data/_sass/hydejack/_toc.pre.scss +65 -0
- data/_sass/hydejack/_utilities.pre.scss +3 -0
- data/_sass/my-inline.scss +2 -16
- data/_sass/my-style.scss +0 -9
- data/_sass/pooleparty/__inline__/_base.scss +14 -9
- data/_sass/pooleparty/__inline__/_message.scss +31 -0
- data/_sass/pooleparty/__inline__/_posts.scss +19 -2
- data/_sass/pooleparty/__inline__/_table.scss +0 -28
- data/_sass/pooleparty/__inline__/_type.scss +81 -15
- data/_sass/pooleparty/__link__/_base.scss +11 -5
- data/_sass/pooleparty/__link__/_code.scss +40 -7
- data/_sass/pooleparty/__link__/_footnotes.scss +4 -5
- data/_sass/pooleparty/__link__/_pagination.scss +3 -2
- data/_sass/pooleparty/__link__/_posts.scss +11 -6
- data/_sass/pooleparty/__link__/_read-more.scss +1 -1
- data/_sass/pooleparty/__link__/_table.scss +27 -17
- data/_sass/pooleparty/__link__/_type.scss +56 -19
- data/_sass/pooleparty/_base.pre.scss +29 -18
- data/_sass/pooleparty/_code.pre.scss +40 -7
- data/_sass/pooleparty/_footnotes.pre.scss +4 -5
- data/_sass/pooleparty/_message.pre.scss +33 -2
- data/_sass/pooleparty/_pagination.pre.scss +5 -4
- data/_sass/pooleparty/_posts.pre.scss +34 -12
- data/_sass/pooleparty/_read-more.pre.scss +1 -1
- data/_sass/pooleparty/_table.pre.scss +13 -21
- data/_sass/pooleparty/_type.pre.scss +100 -35
- data/assets/bower.json +1 -2
- data/assets/bower_components/MathJax/.bower.json +28 -0
- data/assets/bower_components/MathJax/LICENSE +202 -0
- data/assets/bower_components/MathJax/bower.json +11 -0
- data/assets/bower_components/MathJax/composer.json +14 -0
- data/assets/bower_components/MathJax/es5/a11y/assistive-mml.js +1 -0
- data/assets/bower_components/MathJax/es5/a11y/complexity.js +1 -0
- data/assets/bower_components/MathJax/es5/a11y/explorer.js +1 -0
- data/assets/bower_components/MathJax/es5/a11y/semantic-enrich.js +1 -0
- data/assets/bower_components/MathJax/es5/adaptors/liteDOM.js +1 -0
- data/assets/bower_components/MathJax/es5/core.js +1 -0
- data/assets/bower_components/MathJax/es5/input/asciimath.js +1 -0
- data/assets/bower_components/MathJax/es5/input/mml.js +1 -0
- data/assets/bower_components/MathJax/es5/input/mml/entities.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex-base.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex-full.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/action.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/all-packages.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/ams.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/amscd.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/autoload.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/bbox.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/boldsymbol.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/braket.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/bussproofs.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/cancel.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/color.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/colorV2.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/configMacros.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/enclose.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/extpfeil.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/html.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/mhchem.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/newcommand.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/noerrors.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/noundefined.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/physics.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/require.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/tagFormat.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/unicode.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/verb.js +1 -0
- data/assets/bower_components/MathJax/es5/latest.js +1 -0
- data/assets/bower_components/MathJax/es5/loader.js +1 -0
- data/assets/bower_components/MathJax/es5/mml-chtml.js +1 -0
- data/assets/bower_components/MathJax/es5/mml-svg.js +1 -0
- data/assets/bower_components/MathJax/es5/node-main.js +1 -0
- data/assets/bower_components/MathJax/es5/output/chtml.js +1 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/tex.js +1 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/svg.js +1 -0
- data/assets/bower_components/MathJax/es5/output/svg/fonts/tex.js +1 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/en.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/es.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/fr.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/mathmaps_ie.js +410 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/nemeth.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/sre_browser.js +1709 -0
- data/assets/bower_components/MathJax/es5/startup.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-chtml-full.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-chtml.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-mml-chtml.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-mml-svg.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-svg-full.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-svg.js +1 -0
- data/assets/bower_components/MathJax/es5/ui/menu.js +1 -0
- data/assets/bower_components/MathJax/package.json +59 -0
- data/assets/bower_components/katex/.bower.json +7 -8
- data/assets/bower_components/katex/bower.json +1 -1
- data/assets/bower_components/katex/dist/contrib/auto-render.js +4 -0
- data/assets/bower_components/katex/dist/contrib/auto-render.min.js +1 -1
- data/assets/bower_components/katex/dist/contrib/auto-render.mjs +215 -0
- data/assets/bower_components/katex/dist/contrib/copy-tex.js +9 -4
- data/assets/bower_components/katex/dist/contrib/copy-tex.min.css +1 -1
- data/assets/bower_components/katex/dist/contrib/copy-tex.min.js +1 -1
- data/assets/bower_components/katex/dist/contrib/copy-tex.mjs +85 -0
- data/assets/bower_components/katex/dist/contrib/mathtex-script-type.min.js +1 -1
- data/assets/bower_components/katex/dist/contrib/mathtex-script-type.mjs +24 -0
- data/assets/bower_components/katex/dist/contrib/mhchem.js +3241 -0
- data/assets/bower_components/katex/dist/contrib/mhchem.min.js +1 -0
- data/assets/bower_components/katex/dist/contrib/mhchem.mjs +3109 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/katex.css +18 -4
- data/assets/bower_components/katex/dist/katex.js +1011 -663
- data/assets/bower_components/katex/dist/katex.min.css +1 -1
- data/assets/bower_components/katex/dist/katex.min.js +1 -1
- data/assets/bower_components/katex/dist/katex.mjs +904 -645
- data/assets/bower_components/katex/yarn.lock +3091 -2622
- data/assets/css/{hydejack-8.3.2.css → hydejack-9.0.0.css} +0 -0
- data/assets/icomoon/fonts/icomoon.eot +0 -0
- data/assets/icomoon/fonts/icomoon.svg +10 -2
- data/assets/icomoon/fonts/icomoon.ttf +0 -0
- data/assets/icomoon/fonts/icomoon.woff +0 -0
- data/assets/icomoon/selection.json +1 -2555
- data/assets/icomoon/style.css +37 -12
- data/assets/js/.gitkeep +0 -0
- data/assets/js/LEGACY-drawer-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-fetch-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-hydejack-9.0.0.js +28 -0
- data/assets/js/LEGACY-navbar-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-push-state-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-resize-observer-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-shadydom-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-vendors~drawer-hydejack-9.0.0.js +47 -0
- data/assets/js/LEGACY-vendors~drawer~push-state-hydejack-9.0.0.js +215 -0
- data/assets/js/LEGACY-vendors~fetch-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-vendors~intersection-observer-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-vendors~push-state-hydejack-9.0.0.js +33 -0
- data/assets/js/LEGACY-vendors~shadydom-hydejack-9.0.0.js +155 -0
- data/assets/js/LEGACY-vendors~webanimations-hydejack-9.0.0.js +14 -0
- data/assets/js/LEGACY-vendors~webcomponents-hydejack-9.0.0.js +34 -0
- data/assets/js/LEGACY-webcomponents-hydejack-9.0.0.js +14 -0
- data/assets/js/drawer-hydejack-9.0.0.js +14 -0
- data/assets/js/fetch-hydejack-9.0.0.js +14 -0
- data/assets/js/hydejack-9.0.0.js +28 -0
- data/assets/js/navbar-hydejack-9.0.0.js +14 -0
- data/assets/js/push-state-hydejack-9.0.0.js +14 -0
- data/assets/js/resize-observer-hydejack-9.0.0.js +14 -0
- data/assets/js/shadydom-hydejack-9.0.0.js +14 -0
- data/assets/js/vendors~drawer-hydejack-9.0.0.js +47 -0
- data/assets/js/vendors~drawer~push-state-hydejack-9.0.0.js +163 -0
- data/assets/js/vendors~intersection-observer-hydejack-9.0.0.js +14 -0
- data/assets/js/vendors~push-state-hydejack-9.0.0.js +33 -0
- data/assets/js/vendors~shadydom-hydejack-9.0.0.js +146 -0
- data/assets/js/vendors~webanimations-hydejack-9.0.0.js +14 -0
- data/assets/js/webcomponents-hydejack-9.0.0.js +14 -0
- data/assets/version.json +3 -2
- data/licenses/PRO.md +4 -0
- data/licenses/README.md +1 -1
- data/licenses/{W3C.md → W3C-20150513.md} +0 -0
- metadata +170 -55
- data/assets/Resume.pdf +0 -0
- data/assets/bower_components/fontfaceobserver/.bower.json +0 -33
- data/assets/bower_components/fontfaceobserver/.gitignore +0 -2
- data/assets/bower_components/fontfaceobserver/.travis.yml +0 -16
- data/assets/bower_components/fontfaceobserver/Gruntfile.js +0 -101
- data/assets/bower_components/fontfaceobserver/LICENSE +0 -23
- data/assets/bower_components/fontfaceobserver/bower.json +0 -22
- data/assets/bower_components/fontfaceobserver/exports.js +0 -8
- data/assets/bower_components/fontfaceobserver/externs-commonjs.js +0 -10
- data/assets/bower_components/fontfaceobserver/externs.js +0 -15
- data/assets/bower_components/fontfaceobserver/fontfaceobserver.js +0 -12
- data/assets/bower_components/fontfaceobserver/fontfaceobserver.standalone.js +0 -8
- data/assets/bower_components/fontfaceobserver/package.json +0 -57
- data/assets/bower_components/fontfaceobserver/src/descriptors.js +0 -10
- data/assets/bower_components/fontfaceobserver/src/observer.js +0 -349
- data/assets/bower_components/fontfaceobserver/src/ruler.js +0 -130
- data/assets/bower_components/fontfaceobserver/vendor/google/base.js +0 -1489
- data/assets/bower_components/katex/dist/README.md +0 -90
- data/assets/bower_components/katex/lint_blacklist.txt +0 -5
- data/assets/img/blog/COLOURlovers.com-Hydejack.png +0 -0
- data/assets/img/blog/blog-layout.jpg +0 -0
- data/assets/img/blog/caleb-george-old.jpg +0 -0
- data/assets/img/blog/caleb-george.jpg +0 -0
- data/assets/img/blog/cover-page.jpg +0 -0
- data/assets/img/blog/dark-mode-ii.jpg +0 -0
- data/assets/img/blog/dark-mode.jpg +0 -0
- data/assets/img/blog/example-content-ii.jpg +0 -0
- data/assets/img/blog/example-content-iii.jpg +0 -0
- data/assets/img/blog/hydejack-8.png +0 -0
- data/assets/img/blog/hydejack-8@0,25x.png +0 -0
- data/assets/img/blog/hydejack-8@0,5x.png +0 -0
- data/assets/img/blog/lazy-images.jpg +0 -0
- data/assets/img/blog/resume.png +0 -0
- data/assets/img/blog/steve-harvey.jpg +0 -0
- data/assets/img/blog/w3m.png +0 -0
- data/assets/img/blog/wade-lambert.jpg +0 -0
- data/assets/img/docs/google-fonts.png +0 -0
- data/assets/img/projects/hy-drawer.svg +0 -12
- data/assets/img/projects/hy-img.svg +0 -17
- data/assets/img/projects/hy-push-state.svg +0 -13
- data/assets/js/hydejack-8.3.1.js +0 -47
- data/assets/js/hydejack-8.3.2.js +0 -47
- data/assets/video/blog-layout.mp4 +0 -0
- data/assets/video/cover-page.mp4 +0 -0
- data/assets/video/dark-mode.mp4 +0 -0
- data/assets/video/lazy-images.mp4 +0 -0
@@ -1 +1 @@
|
|
1
|
-
@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important}.katex .katex-mathml{border:0;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathdefault{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer,.katex .sizing{display:inline-block}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .op-limits>.vlist-t{text-align:center}.katex .accent>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{border-right:.05em solid;display:inline-block;margin:0 -.025em;min-width:1px}.katex .mtable .vs-dashed{border-right:.05em dashed}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{display:block;fill:currentColor;fill-opacity:1;fill-rule:nonzero;height:inherit;position:absolute;stroke:currentColor;stroke-dasharray:none;stroke-dashoffset:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-width:1;width:100%}.katex svg path{stroke:none}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox{border:.04em solid #000;box-sizing:border-box}.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}
|
1
|
+
@font-face{font-family:KaTeX_AMS;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype");font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype");font-weight:400;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype");font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype");font-weight:400;font-style:italic}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype");font-weight:400;font-style:italic}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Script;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size1;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size2;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size3;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size4;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Typewriter;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype");font-weight:400;font-style:normal}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.10.2"}.katex .katex-mathml{position:absolute;clip:rect(1px,1px,1px,1px);padding:0;border:0;height:1px;width:1px;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathdefault{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-weight:700;font-style:italic}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;vertical-align:bottom;position:relative}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;vertical-align:bottom;font-size:1px;width:2px;min-width:2px}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{display:inline-block;border:0 solid;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline{display:inline-block;width:100%;border-bottom-style:dashed}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer,.katex .sizing{display:inline-block}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .op-limits>.vlist-t{text-align:center}.katex .accent>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid;min-width:1px}.katex .mtable .vs-dashed{border-right:.05em dashed}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;min-height:0;max-width:none;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{position:absolute;left:0;width:50.2%;overflow:hidden}.katex .halfarrow-right{position:absolute;right:0;width:50.2%;overflow:hidden}.katex .brace-left{position:absolute;left:0;width:25.1%;overflow:hidden}.katex .brace-center{position:absolute;left:25%;width:50%;overflow:hidden}.katex .brace-right{position:absolute;right:0;width:25.1%;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left}
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){return function(r){var n={};function i(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return i.m=r,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=2)}([function(e,t,r){},,function(e,t,r){"use strict";r.r(t);r(0);var p=function(){function r(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return r.prototype.getSource=function(){return this.lexer.input.slice(this.start,this.end)},r.range=function(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new r(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc},r}(),a=function(){function r(e,t){this.text=void 0,this.loc=void 0,this.text=e,this.loc=t}return r.prototype.range=function(e,t){return new r(t,p.range(this,e))},r}(),n=function e(t,r){this.position=void 0;var n,i="KaTeX parse error: "+t,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;n=a.start;var s=a.end;n===o.length?i+=" at end of input: ":i+=" at position "+(n+1)+": ";var l=o.slice(n,s).replace(/[^]/g,"$&\u0332");i+=(15
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.katex=e():t.katex=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){},function(t,e,r){"use strict";r.r(e);r(0);var a=function(){function t(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}return t.range=function(e,r){return r?e&&e.loc&&r.loc&&e.loc.lexer===r.loc.lexer?new t(e.loc.lexer,e.loc.start,r.loc.end):null:e&&e.loc},t}(),n=function(){function t(t,e){this.text=void 0,this.loc=void 0,this.text=t,this.loc=e}return t.prototype.range=function(e,r){return new t(r,a.range(this,e))},t}(),o=function t(e,r){this.position=void 0;var a,n="KaTeX parse error: "+e,o=r&&r.loc;if(o&&o.start<=o.end){var i=o.lexer.input;a=o.start;var s=o.end;a===i.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var h=i.slice(a,s).replace(/[^]/g,"$&\u0332");n+=(a>15?"\u2026"+i.slice(a-15,a):i.slice(0,a))+h+(s+15
|
@@ -15,10 +15,6 @@ class SourceLocation {
|
|
15
15
|
this.start = start;
|
16
16
|
this.end = end;
|
17
17
|
}
|
18
|
-
|
19
|
-
getSource() {
|
20
|
-
return this.lexer.input.slice(this.start, this.end);
|
21
|
-
}
|
22
18
|
/**
|
23
19
|
* Merges two `SourceLocation`s from location providers, given they are
|
24
20
|
* provided in order of appearance.
|
@@ -264,6 +260,8 @@ var utils = {
|
|
264
260
|
class Settings {
|
265
261
|
constructor(options) {
|
266
262
|
this.displayMode = void 0;
|
263
|
+
this.leqno = void 0;
|
264
|
+
this.fleqn = void 0;
|
267
265
|
this.throwOnError = void 0;
|
268
266
|
this.errorColor = void 0;
|
269
267
|
this.macros = void 0;
|
@@ -275,6 +273,8 @@ class Settings {
|
|
275
273
|
// allow null options
|
276
274
|
options = options || {};
|
277
275
|
this.displayMode = utils.deflt(options.displayMode, false);
|
276
|
+
this.leqno = utils.deflt(options.leqno, false);
|
277
|
+
this.fleqn = utils.deflt(options.fleqn, false);
|
278
278
|
this.throwOnError = utils.deflt(options.throwOnError, true);
|
279
279
|
this.errorColor = utils.deflt(options.errorColor, "#cc0000");
|
280
280
|
this.macros = options.macros || {};
|
@@ -839,7 +839,7 @@ s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
839
839
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
840
840
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
841
841
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
842
|
-
M100
|
842
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,
|
843
843
|
// rightarrowabovebar is mostly from glyph U+2192, KaTeX Main
|
844
844
|
rightarrowabovebar: `M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
845
845
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
@@ -1920,7 +1920,6 @@ var metricMap = {
|
|
1920
1920
|
"730": [0, 0.69444, 0, 0, 0.86944],
|
1921
1921
|
"732": [0, 0.69444, 0, 0, 0.575],
|
1922
1922
|
"733": [0, 0.69444, 0, 0, 0.575],
|
1923
|
-
"824": [0.19444, 0.69444, 0, 0, 0],
|
1924
1923
|
"915": [0, 0.68611, 0, 0, 0.69166],
|
1925
1924
|
"916": [0, 0.68611, 0, 0, 0.95833],
|
1926
1925
|
"920": [0, 0.68611, 0, 0, 0.89444],
|
@@ -2048,7 +2047,8 @@ var metricMap = {
|
|
2048
2047
|
"10217": [0.25, 0.75, 0, 0, 0.44722],
|
2049
2048
|
"10815": [0, 0.68611, 0, 0, 0.9],
|
2050
2049
|
"10927": [0.19667, 0.69667, 0, 0, 0.89444],
|
2051
|
-
"10928": [0.19667, 0.69667, 0, 0, 0.89444]
|
2050
|
+
"10928": [0.19667, 0.69667, 0, 0, 0.89444],
|
2051
|
+
"57376": [0.19444, 0.69444, 0, 0, 0]
|
2052
2052
|
},
|
2053
2053
|
"Main-BoldItalic": {
|
2054
2054
|
"33": [0, 0.69444, 0.11417, 0, 0.38611],
|
@@ -2431,7 +2431,6 @@ var metricMap = {
|
|
2431
2431
|
"730": [0, 0.69444, 0, 0, 0.75],
|
2432
2432
|
"732": [0, 0.66786, 0, 0, 0.5],
|
2433
2433
|
"733": [0, 0.69444, 0, 0, 0.5],
|
2434
|
-
"824": [0.19444, 0.69444, 0, 0, 0],
|
2435
2434
|
"915": [0, 0.68333, 0, 0, 0.625],
|
2436
2435
|
"916": [0, 0.68333, 0, 0, 0.83334],
|
2437
2436
|
"920": [0, 0.68333, 0, 0, 0.77778],
|
@@ -2516,7 +2515,6 @@ var metricMap = {
|
|
2516
2515
|
"8776": [-0.01688, 0.48312, 0, 0, 0.77778],
|
2517
2516
|
"8781": [-0.03625, 0.46375, 0, 0, 0.77778],
|
2518
2517
|
"8784": [-0.133, 0.67, 0, 0, 0.778],
|
2519
|
-
"8800": [0.215, 0.716, 0, 0, 0.778],
|
2520
2518
|
"8801": [-0.03625, 0.46375, 0, 0, 0.77778],
|
2521
2519
|
"8804": [0.13597, 0.63597, 0, 0, 0.77778],
|
2522
2520
|
"8805": [0.13597, 0.63597, 0, 0, 0.77778],
|
@@ -2583,10 +2581,10 @@ var metricMap = {
|
|
2583
2581
|
"10236": [0.011, 0.511, 0, 0, 1.638],
|
2584
2582
|
"10815": [0, 0.68333, 0, 0, 0.75],
|
2585
2583
|
"10927": [0.13597, 0.63597, 0, 0, 0.77778],
|
2586
|
-
"10928": [0.13597, 0.63597, 0, 0, 0.77778]
|
2584
|
+
"10928": [0.13597, 0.63597, 0, 0, 0.77778],
|
2585
|
+
"57376": [0.19444, 0.69444, 0, 0, 0]
|
2587
2586
|
},
|
2588
2587
|
"Math-BoldItalic": {
|
2589
|
-
"47": [0.19444, 0.69444, 0, 0, 0],
|
2590
2588
|
"65": [0, 0.68611, 0, 0, 0.86944],
|
2591
2589
|
"66": [0, 0.68611, 0.04835, 0, 0.8664],
|
2592
2590
|
"67": [0, 0.68611, 0.06979, 0, 0.81694],
|
@@ -2682,7 +2680,6 @@ var metricMap = {
|
|
2682
2680
|
"1013": [0, 0.44444, 0, 0, 0.48333]
|
2683
2681
|
},
|
2684
2682
|
"Math-Italic": {
|
2685
|
-
"47": [0.19444, 0.69444, 0, 0, 0],
|
2686
2683
|
"65": [0, 0.68333, 0, 0.13889, 0.75],
|
2687
2684
|
"66": [0, 0.68333, 0.05017, 0.08334, 0.75851],
|
2688
2685
|
"67": [0, 0.68333, 0.07153, 0.08334, 0.71472],
|
@@ -3749,13 +3746,13 @@ function getCharacterMetrics(character, font, mode) {
|
|
3749
3746
|
}
|
3750
3747
|
|
3751
3748
|
let ch = character.charCodeAt(0);
|
3749
|
+
let metrics = metricMap[font][ch];
|
3752
3750
|
|
3753
|
-
if (character[0] in extraCharacterMap) {
|
3751
|
+
if (!metrics && character[0] in extraCharacterMap) {
|
3754
3752
|
ch = extraCharacterMap[character[0]].charCodeAt(0);
|
3753
|
+
metrics = metricMap[font][ch];
|
3755
3754
|
}
|
3756
3755
|
|
3757
|
-
let metrics = metricMap[font][ch];
|
3758
|
-
|
3759
3756
|
if (!metrics && mode === 'text') {
|
3760
3757
|
// We don't typically have font metrics for Asian scripts.
|
3761
3758
|
// But since we support them in text mode, we need to return
|
@@ -3820,7 +3817,7 @@ function getGlobalMetrics(size) {
|
|
3820
3817
|
normal font), or "ams" (the ams fonts).
|
3821
3818
|
* - group (required): the ParseNode group type the symbol should have (i.e.
|
3822
3819
|
"textord", "mathord", etc).
|
3823
|
-
See https://github.com/
|
3820
|
+
See https://github.com/KaTeX/KaTeX/wiki/Examining-TeX#group-types
|
3824
3821
|
* - replace: the character that this symbol or function should be
|
3825
3822
|
* replaced with (i.e. "\phi" has a replace value of "\u03d5", the phi
|
3826
3823
|
* character in the main font).
|
@@ -3987,12 +3984,13 @@ defineSymbol(math, main, rel, "\u21c1", "\\rightharpoondown", true);
|
|
3987
3984
|
defineSymbol(math, main, rel, "\u2196", "\\nwarrow", true);
|
3988
3985
|
defineSymbol(math, main, rel, "\u21cc", "\\rightleftharpoons", true); // AMS Negated Binary Relations
|
3989
3986
|
|
3990
|
-
defineSymbol(math, ams, rel, "\u226e", "\\nless", true);
|
3991
|
-
|
3992
|
-
defineSymbol(math, ams, rel, "\
|
3987
|
+
defineSymbol(math, ams, rel, "\u226e", "\\nless", true); // Symbol names preceeded by "@" each have a corresponding macro.
|
3988
|
+
|
3989
|
+
defineSymbol(math, ams, rel, "\ue010", "\\@nleqslant");
|
3990
|
+
defineSymbol(math, ams, rel, "\ue011", "\\@nleqq");
|
3993
3991
|
defineSymbol(math, ams, rel, "\u2a87", "\\lneq", true);
|
3994
3992
|
defineSymbol(math, ams, rel, "\u2268", "\\lneqq", true);
|
3995
|
-
defineSymbol(math, ams, rel, "\ue00c", "
|
3993
|
+
defineSymbol(math, ams, rel, "\ue00c", "\\@lvertneqq");
|
3996
3994
|
defineSymbol(math, ams, rel, "\u22e6", "\\lnsim", true);
|
3997
3995
|
defineSymbol(math, ams, rel, "\u2a89", "\\lnapprox", true);
|
3998
3996
|
defineSymbol(math, ams, rel, "\u2280", "\\nprec", true); // unicode-math maps \u22e0 to \npreccurlyeq. We'll use the AMS synonym.
|
@@ -4001,22 +3999,22 @@ defineSymbol(math, ams, rel, "\u22e0", "\\npreceq", true);
|
|
4001
3999
|
defineSymbol(math, ams, rel, "\u22e8", "\\precnsim", true);
|
4002
4000
|
defineSymbol(math, ams, rel, "\u2ab9", "\\precnapprox", true);
|
4003
4001
|
defineSymbol(math, ams, rel, "\u2241", "\\nsim", true);
|
4004
|
-
defineSymbol(math, ams, rel, "\ue006", "
|
4002
|
+
defineSymbol(math, ams, rel, "\ue006", "\\@nshortmid");
|
4005
4003
|
defineSymbol(math, ams, rel, "\u2224", "\\nmid", true);
|
4006
4004
|
defineSymbol(math, ams, rel, "\u22ac", "\\nvdash", true);
|
4007
4005
|
defineSymbol(math, ams, rel, "\u22ad", "\\nvDash", true);
|
4008
4006
|
defineSymbol(math, ams, rel, "\u22ea", "\\ntriangleleft");
|
4009
4007
|
defineSymbol(math, ams, rel, "\u22ec", "\\ntrianglelefteq", true);
|
4010
4008
|
defineSymbol(math, ams, rel, "\u228a", "\\subsetneq", true);
|
4011
|
-
defineSymbol(math, ams, rel, "\ue01a", "
|
4009
|
+
defineSymbol(math, ams, rel, "\ue01a", "\\@varsubsetneq");
|
4012
4010
|
defineSymbol(math, ams, rel, "\u2acb", "\\subsetneqq", true);
|
4013
|
-
defineSymbol(math, ams, rel, "\ue017", "
|
4011
|
+
defineSymbol(math, ams, rel, "\ue017", "\\@varsubsetneqq");
|
4014
4012
|
defineSymbol(math, ams, rel, "\u226f", "\\ngtr", true);
|
4015
|
-
defineSymbol(math, ams, rel, "\ue00f", "
|
4016
|
-
defineSymbol(math, ams, rel, "\ue00e", "
|
4013
|
+
defineSymbol(math, ams, rel, "\ue00f", "\\@ngeqslant");
|
4014
|
+
defineSymbol(math, ams, rel, "\ue00e", "\\@ngeqq");
|
4017
4015
|
defineSymbol(math, ams, rel, "\u2a88", "\\gneq", true);
|
4018
4016
|
defineSymbol(math, ams, rel, "\u2269", "\\gneqq", true);
|
4019
|
-
defineSymbol(math, ams, rel, "\ue00d", "
|
4017
|
+
defineSymbol(math, ams, rel, "\ue00d", "\\@gvertneqq");
|
4020
4018
|
defineSymbol(math, ams, rel, "\u22e7", "\\gnsim", true);
|
4021
4019
|
defineSymbol(math, ams, rel, "\u2a8a", "\\gnapprox", true);
|
4022
4020
|
defineSymbol(math, ams, rel, "\u2281", "\\nsucc", true); // unicode-math maps \u22e1 to \nsucccurlyeq. We'll use the AMS synonym.
|
@@ -4026,20 +4024,20 @@ defineSymbol(math, ams, rel, "\u22e9", "\\succnsim", true);
|
|
4026
4024
|
defineSymbol(math, ams, rel, "\u2aba", "\\succnapprox", true); // unicode-math maps \u2246 to \simneqq. We'll use the AMS synonym.
|
4027
4025
|
|
4028
4026
|
defineSymbol(math, ams, rel, "\u2246", "\\ncong", true);
|
4029
|
-
defineSymbol(math, ams, rel, "\ue007", "
|
4027
|
+
defineSymbol(math, ams, rel, "\ue007", "\\@nshortparallel");
|
4030
4028
|
defineSymbol(math, ams, rel, "\u2226", "\\nparallel", true);
|
4031
4029
|
defineSymbol(math, ams, rel, "\u22af", "\\nVDash", true);
|
4032
4030
|
defineSymbol(math, ams, rel, "\u22eb", "\\ntriangleright");
|
4033
4031
|
defineSymbol(math, ams, rel, "\u22ed", "\\ntrianglerighteq", true);
|
4034
|
-
defineSymbol(math, ams, rel, "\ue018", "
|
4032
|
+
defineSymbol(math, ams, rel, "\ue018", "\\@nsupseteqq");
|
4035
4033
|
defineSymbol(math, ams, rel, "\u228b", "\\supsetneq", true);
|
4036
|
-
defineSymbol(math, ams, rel, "\ue01b", "
|
4034
|
+
defineSymbol(math, ams, rel, "\ue01b", "\\@varsupsetneq");
|
4037
4035
|
defineSymbol(math, ams, rel, "\u2acc", "\\supsetneqq", true);
|
4038
|
-
defineSymbol(math, ams, rel, "\ue019", "
|
4036
|
+
defineSymbol(math, ams, rel, "\ue019", "\\@varsupsetneqq");
|
4039
4037
|
defineSymbol(math, ams, rel, "\u22ae", "\\nVdash", true);
|
4040
4038
|
defineSymbol(math, ams, rel, "\u2ab5", "\\precneqq", true);
|
4041
4039
|
defineSymbol(math, ams, rel, "\u2ab6", "\\succneqq", true);
|
4042
|
-
defineSymbol(math, ams, rel, "\ue016", "
|
4040
|
+
defineSymbol(math, ams, rel, "\ue016", "\\@nsubseteqq");
|
4043
4041
|
defineSymbol(math, ams, bin, "\u22b4", "\\unlhd");
|
4044
4042
|
defineSymbol(math, ams, bin, "\u22b5", "\\unrhd"); // AMS Negated Arrows
|
4045
4043
|
|
@@ -4062,7 +4060,6 @@ defineSymbol(math, ams, textord, "\u2204", "\\nexists");
|
|
4062
4060
|
defineSymbol(math, ams, textord, "\u2127", "\\mho");
|
4063
4061
|
defineSymbol(math, ams, textord, "\u2132", "\\Finv", true);
|
4064
4062
|
defineSymbol(math, ams, textord, "\u2141", "\\Game", true);
|
4065
|
-
defineSymbol(math, ams, textord, "\u006b", "\\Bbbk");
|
4066
4063
|
defineSymbol(math, ams, textord, "\u2035", "\\backprime");
|
4067
4064
|
defineSymbol(math, ams, textord, "\u25b2", "\\blacktriangle");
|
4068
4065
|
defineSymbol(math, ams, textord, "\u25bc", "\\blacktriangledown");
|
@@ -4345,7 +4342,7 @@ defineSymbol(math, main, rel, "\u2265", "\\geq", true);
|
|
4345
4342
|
defineSymbol(math, main, rel, "\u2190", "\\gets");
|
4346
4343
|
defineSymbol(math, main, rel, ">", "\\gt");
|
4347
4344
|
defineSymbol(math, main, rel, "\u2208", "\\in", true);
|
4348
|
-
defineSymbol(math, main, rel, "\
|
4345
|
+
defineSymbol(math, main, rel, "\ue020", "\\@not");
|
4349
4346
|
defineSymbol(math, main, rel, "\u2282", "\\subset", true);
|
4350
4347
|
defineSymbol(math, main, rel, "\u2283", "\\supset", true);
|
4351
4348
|
defineSymbol(math, main, rel, "\u2286", "\\subseteq", true);
|
@@ -4421,6 +4418,8 @@ defineSymbol(math, main, textord, "\u2225", "\\|");
|
|
4421
4418
|
defineSymbol(math, main, textord, "\u2225", "\\Vert");
|
4422
4419
|
defineSymbol(text$1, main, textord, "\u2225", "\\textbardbl");
|
4423
4420
|
defineSymbol(text$1, main, textord, "~", "\\textasciitilde");
|
4421
|
+
defineSymbol(text$1, main, textord, "\\", "\\textbackslash");
|
4422
|
+
defineSymbol(text$1, main, textord, "^", "\\textasciicircum");
|
4424
4423
|
defineSymbol(math, main, rel, "\u2191", "\\uparrow", true);
|
4425
4424
|
defineSymbol(math, main, rel, "\u21d1", "\\Uparrow", true);
|
4426
4425
|
defineSymbol(math, main, rel, "\u2193", "\\downarrow", true);
|
@@ -4561,13 +4560,32 @@ for (let i = 0; i < letters.length; i++) {
|
|
4561
4560
|
const ch = letters.charAt(i);
|
4562
4561
|
defineSymbol(math, main, mathord, ch, ch);
|
4563
4562
|
defineSymbol(text$1, main, textord, ch, ch);
|
4564
|
-
} //
|
4563
|
+
} // Blackboard bold and script letters in Unicode range
|
4564
|
+
|
4565
|
+
|
4566
|
+
defineSymbol(math, ams, textord, "C", "\u2102"); // blackboard bold
|
4567
|
+
|
4568
|
+
defineSymbol(text$1, ams, textord, "C", "\u2102");
|
4569
|
+
defineSymbol(math, ams, textord, "H", "\u210D");
|
4570
|
+
defineSymbol(text$1, ams, textord, "H", "\u210D");
|
4571
|
+
defineSymbol(math, ams, textord, "N", "\u2115");
|
4572
|
+
defineSymbol(text$1, ams, textord, "N", "\u2115");
|
4573
|
+
defineSymbol(math, ams, textord, "P", "\u2119");
|
4574
|
+
defineSymbol(text$1, ams, textord, "P", "\u2119");
|
4575
|
+
defineSymbol(math, ams, textord, "Q", "\u211A");
|
4576
|
+
defineSymbol(text$1, ams, textord, "Q", "\u211A");
|
4577
|
+
defineSymbol(math, ams, textord, "R", "\u211D");
|
4578
|
+
defineSymbol(text$1, ams, textord, "R", "\u211D");
|
4579
|
+
defineSymbol(math, ams, textord, "Z", "\u2124");
|
4580
|
+
defineSymbol(text$1, ams, textord, "Z", "\u2124");
|
4581
|
+
defineSymbol(math, main, mathord, "h", "\u210E"); // italic h, Planck constant
|
4582
|
+
|
4583
|
+
defineSymbol(text$1, main, mathord, "h", "\u210E"); // The next loop loads wide (surrogate pair) characters.
|
4565
4584
|
// We support some letters in the Unicode range U+1D400 to U+1D7FF,
|
4566
4585
|
// Mathematical Alphanumeric Symbols.
|
4567
4586
|
// Some editors do not deal well with wide characters. So don't write the
|
4568
4587
|
// string into this file. Instead, create the string from the surrogate pair.
|
4569
4588
|
|
4570
|
-
|
4571
4589
|
let wideChar = "";
|
4572
4590
|
|
4573
4591
|
for (let i = 0; i < letters.length; i++) {
|
@@ -4775,7 +4793,8 @@ const sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size index
|
|
4775
4793
|
|
4776
4794
|
const sizeAtStyle = function sizeAtStyle(size, style) {
|
4777
4795
|
return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];
|
4778
|
-
};
|
4796
|
+
}; // In these types, "" (empty string) means "no change".
|
4797
|
+
|
4779
4798
|
|
4780
4799
|
/**
|
4781
4800
|
* This is the main options class. It contains the current style, size, color,
|
@@ -5043,20 +5062,13 @@ class Options {
|
|
5043
5062
|
return this._fontMetrics;
|
5044
5063
|
}
|
5045
5064
|
/**
|
5046
|
-
*
|
5047
|
-
* TODO(emily): Remove this when we have real macros
|
5065
|
+
* Gets the CSS color of the current options object
|
5048
5066
|
*/
|
5049
5067
|
|
5050
5068
|
|
5051
|
-
/**
|
5052
|
-
* Gets the CSS color of the current options object, accounting for the
|
5053
|
-
* `colorMap`.
|
5054
|
-
*/
|
5055
5069
|
getColor() {
|
5056
5070
|
if (this.phantom) {
|
5057
5071
|
return "transparent";
|
5058
|
-
} else if (this.color != null && Options.colorMap.hasOwnProperty(this.color)) {
|
5059
|
-
return Options.colorMap[this.color];
|
5060
5072
|
} else {
|
5061
5073
|
return this.color;
|
5062
5074
|
}
|
@@ -5065,64 +5077,6 @@ class Options {
|
|
5065
5077
|
}
|
5066
5078
|
|
5067
5079
|
Options.BASESIZE = 6;
|
5068
|
-
Options.colorMap = {
|
5069
|
-
"katex-blue": "#6495ed",
|
5070
|
-
"katex-orange": "#ffa500",
|
5071
|
-
"katex-pink": "#ff00af",
|
5072
|
-
"katex-red": "#df0030",
|
5073
|
-
"katex-green": "#28ae7b",
|
5074
|
-
"katex-gray": "gray",
|
5075
|
-
"katex-purple": "#9d38bd",
|
5076
|
-
"katex-blueA": "#ccfaff",
|
5077
|
-
"katex-blueB": "#80f6ff",
|
5078
|
-
"katex-blueC": "#63d9ea",
|
5079
|
-
"katex-blueD": "#11accd",
|
5080
|
-
"katex-blueE": "#0c7f99",
|
5081
|
-
"katex-tealA": "#94fff5",
|
5082
|
-
"katex-tealB": "#26edd5",
|
5083
|
-
"katex-tealC": "#01d1c1",
|
5084
|
-
"katex-tealD": "#01a995",
|
5085
|
-
"katex-tealE": "#208170",
|
5086
|
-
"katex-greenA": "#b6ffb0",
|
5087
|
-
"katex-greenB": "#8af281",
|
5088
|
-
"katex-greenC": "#74cf70",
|
5089
|
-
"katex-greenD": "#1fab54",
|
5090
|
-
"katex-greenE": "#0d923f",
|
5091
|
-
"katex-goldA": "#ffd0a9",
|
5092
|
-
"katex-goldB": "#ffbb71",
|
5093
|
-
"katex-goldC": "#ff9c39",
|
5094
|
-
"katex-goldD": "#e07d10",
|
5095
|
-
"katex-goldE": "#a75a05",
|
5096
|
-
"katex-redA": "#fca9a9",
|
5097
|
-
"katex-redB": "#ff8482",
|
5098
|
-
"katex-redC": "#f9685d",
|
5099
|
-
"katex-redD": "#e84d39",
|
5100
|
-
"katex-redE": "#bc2612",
|
5101
|
-
"katex-maroonA": "#ffbde0",
|
5102
|
-
"katex-maroonB": "#ff92c6",
|
5103
|
-
"katex-maroonC": "#ed5fa6",
|
5104
|
-
"katex-maroonD": "#ca337c",
|
5105
|
-
"katex-maroonE": "#9e034e",
|
5106
|
-
"katex-purpleA": "#ddd7ff",
|
5107
|
-
"katex-purpleB": "#c6b9fc",
|
5108
|
-
"katex-purpleC": "#aa87ff",
|
5109
|
-
"katex-purpleD": "#7854ab",
|
5110
|
-
"katex-purpleE": "#543b78",
|
5111
|
-
"katex-mintA": "#f5f9e8",
|
5112
|
-
"katex-mintB": "#edf2df",
|
5113
|
-
"katex-mintC": "#e0e5cc",
|
5114
|
-
"katex-grayA": "#f6f7f7",
|
5115
|
-
"katex-grayB": "#f0f1f2",
|
5116
|
-
"katex-grayC": "#e3e5e6",
|
5117
|
-
"katex-grayD": "#d6d8da",
|
5118
|
-
"katex-grayE": "#babec2",
|
5119
|
-
"katex-grayF": "#888d93",
|
5120
|
-
"katex-grayG": "#626569",
|
5121
|
-
"katex-grayH": "#3b3e40",
|
5122
|
-
"katex-grayI": "#21242c",
|
5123
|
-
"katex-kaBlue": "#314453",
|
5124
|
-
"katex-kaGreen": "#71B307"
|
5125
|
-
};
|
5126
5080
|
|
5127
5081
|
/**
|
5128
5082
|
* This file does conversion between units. In particular, it provides
|
@@ -5309,7 +5263,11 @@ const makeSymbol = function makeSymbol(value, fontName, mode, options, classes)
|
|
5309
5263
|
*/
|
5310
5264
|
|
5311
5265
|
|
5312
|
-
const mathsym = function mathsym(value, mode, options, classes
|
5266
|
+
const mathsym = function mathsym(value, mode, options, classes) {
|
5267
|
+
if (classes === void 0) {
|
5268
|
+
classes = [];
|
5269
|
+
}
|
5270
|
+
|
5313
5271
|
// Decide what font to render the symbol in by its entry in the symbols
|
5314
5272
|
// table.
|
5315
5273
|
// Have a special case for when the value = \ because the \ is used as a
|
@@ -6138,15 +6096,14 @@ const _htmlGroupBuilders = {};
|
|
6138
6096
|
*/
|
6139
6097
|
|
6140
6098
|
const _mathmlGroupBuilders = {};
|
6141
|
-
function defineFunction({
|
6142
|
-
type,
|
6143
|
-
|
6144
|
-
|
6145
|
-
|
6146
|
-
|
6147
|
-
|
6148
|
-
|
6149
|
-
}) {
|
6099
|
+
function defineFunction(_ref) {
|
6100
|
+
let type = _ref.type,
|
6101
|
+
nodeType = _ref.nodeType,
|
6102
|
+
names = _ref.names,
|
6103
|
+
props = _ref.props,
|
6104
|
+
handler = _ref.handler,
|
6105
|
+
htmlBuilder = _ref.htmlBuilder,
|
6106
|
+
mathmlBuilder = _ref.mathmlBuilder;
|
6150
6107
|
// Set default values of functions
|
6151
6108
|
const data = {
|
6152
6109
|
type,
|
@@ -6185,11 +6142,10 @@ function defineFunction({
|
|
6185
6142
|
* stand-alone handler provided to `defineFunction`).
|
6186
6143
|
*/
|
6187
6144
|
|
6188
|
-
function defineFunctionBuilders({
|
6189
|
-
type,
|
6190
|
-
|
6191
|
-
|
6192
|
-
}) {
|
6145
|
+
function defineFunctionBuilders(_ref2) {
|
6146
|
+
let type = _ref2.type,
|
6147
|
+
htmlBuilder = _ref2.htmlBuilder,
|
6148
|
+
mathmlBuilder = _ref2.mathmlBuilder;
|
6193
6149
|
defineFunction({
|
6194
6150
|
type,
|
6195
6151
|
names: [],
|
@@ -6222,25 +6178,8 @@ const makeSpan$1 = buildCommon.makeSpan; // Binary atoms (first class `mbin`) ch
|
|
6222
6178
|
// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,
|
6223
6179
|
// and the text before Rule 19.
|
6224
6180
|
|
6225
|
-
const
|
6226
|
-
|
6227
|
-
// of its `classes` array. A later cleanup should ensure this, for
|
6228
|
-
// instance by changing the signature of `makeSpan`.
|
6229
|
-
if (node) {
|
6230
|
-
return utils.contains(["mbin", "mopen", "mrel", "mop", "mpunct"], getTypeOfDomTree(node, "right"));
|
6231
|
-
} else {
|
6232
|
-
return isRealGroup;
|
6233
|
-
}
|
6234
|
-
};
|
6235
|
-
|
6236
|
-
const isBinRightCanceller = function isBinRightCanceller(node, isRealGroup) {
|
6237
|
-
if (node) {
|
6238
|
-
return utils.contains(["mrel", "mclose", "mpunct"], getTypeOfDomTree(node, "left"));
|
6239
|
-
} else {
|
6240
|
-
return isRealGroup;
|
6241
|
-
}
|
6242
|
-
};
|
6243
|
-
|
6181
|
+
const binLeftCanceller = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"];
|
6182
|
+
const binRightCanceller = ["rightmost", "mrel", "mclose", "mpunct"];
|
6244
6183
|
const styleMap = {
|
6245
6184
|
"display": Style$1.DISPLAY,
|
6246
6185
|
"text": Style$1.TEXT,
|
@@ -6266,111 +6205,162 @@ const DomEnum = {
|
|
6266
6205
|
* a partial group (e.g. one created by \color). `surrounding` is an array
|
6267
6206
|
* consisting type of nodes that will be added to the left and right.
|
6268
6207
|
*/
|
6269
|
-
const buildExpression = function buildExpression(expression, options, isRealGroup, surrounding
|
6208
|
+
const buildExpression = function buildExpression(expression, options, isRealGroup, surrounding) {
|
6209
|
+
if (surrounding === void 0) {
|
6210
|
+
surrounding = [null, null];
|
6211
|
+
}
|
6212
|
+
|
6270
6213
|
// Parse expressions into `groups`.
|
6271
|
-
const
|
6214
|
+
const groups = [];
|
6272
6215
|
|
6273
6216
|
for (let i = 0; i < expression.length; i++) {
|
6274
6217
|
const output = buildGroup(expression[i], options);
|
6275
6218
|
|
6276
6219
|
if (output instanceof DocumentFragment) {
|
6277
6220
|
const children = output.children;
|
6278
|
-
|
6221
|
+
groups.push(...children);
|
6279
6222
|
} else {
|
6280
|
-
|
6223
|
+
groups.push(output);
|
6224
|
+
}
|
6225
|
+
} // If `expression` is a partial group, let the parent handle spacings
|
6226
|
+
// to avoid processing groups multiple times.
|
6227
|
+
|
6228
|
+
|
6229
|
+
if (!isRealGroup) {
|
6230
|
+
return groups;
|
6231
|
+
}
|
6232
|
+
|
6233
|
+
let glueOptions = options;
|
6234
|
+
|
6235
|
+
if (expression.length === 1) {
|
6236
|
+
const node = checkNodeType(expression[0], "sizing") || checkNodeType(expression[0], "styling");
|
6237
|
+
|
6238
|
+
if (!node) ; else if (node.type === "sizing") {
|
6239
|
+
glueOptions = options.havingSize(node.size);
|
6240
|
+
} else if (node.type === "styling") {
|
6241
|
+
glueOptions = options.havingStyle(styleMap[node.style]);
|
6281
6242
|
}
|
6282
|
-
} //
|
6283
|
-
//
|
6284
|
-
//
|
6285
|
-
// spans for determining spacings between surrounding atoms.
|
6243
|
+
} // Dummy spans for determining spacings between surrounding atoms.
|
6244
|
+
// If `expression` has no atoms on the left or right, class "leftmost"
|
6245
|
+
// or "rightmost", respectively, is used to indicate it.
|
6286
6246
|
|
6287
6247
|
|
6288
|
-
const
|
6248
|
+
const dummyPrev = makeSpan$1([surrounding[0] || "leftmost"], [], options);
|
6249
|
+
const dummyNext = makeSpan$1([surrounding[1] || "rightmost"], [], options); // TODO: These code assumes that a node's math class is the first element
|
6250
|
+
// of its `classes` array. A later cleanup should ensure this, for
|
6251
|
+
// instance by changing the signature of `makeSpan`.
|
6252
|
+
// Before determining what spaces to insert, perform bin cancellation.
|
6289
6253
|
// Binary operators change to ordinary symbols in some contexts.
|
6290
6254
|
|
6291
|
-
|
6292
|
-
const
|
6293
|
-
const
|
6255
|
+
traverseNonSpaceNodes(groups, (node, prev) => {
|
6256
|
+
const prevType = prev.classes[0];
|
6257
|
+
const type = node.classes[0];
|
6294
6258
|
|
6295
|
-
if (
|
6296
|
-
|
6259
|
+
if (prevType === "mbin" && utils.contains(binRightCanceller, type)) {
|
6260
|
+
prev.classes[0] = "mord";
|
6261
|
+
} else if (type === "mbin" && utils.contains(binLeftCanceller, prevType)) {
|
6262
|
+
node.classes[0] = "mord";
|
6297
6263
|
}
|
6264
|
+
}, {
|
6265
|
+
node: dummyPrev
|
6266
|
+
}, dummyNext);
|
6267
|
+
traverseNonSpaceNodes(groups, (node, prev) => {
|
6268
|
+
const prevType = getTypeOfDomTree(prev);
|
6269
|
+
const type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style.
|
6298
6270
|
|
6299
|
-
const
|
6271
|
+
const space = prevType && type ? node.hasClass("mtight") ? tightSpacings[prevType][type] : spacings[prevType][type] : null;
|
6300
6272
|
|
6301
|
-
if (
|
6302
|
-
|
6273
|
+
if (space) {
|
6274
|
+
// Insert glue (spacing) after the `prev`.
|
6275
|
+
return buildCommon.makeGlue(space, glueOptions);
|
6303
6276
|
}
|
6277
|
+
}, {
|
6278
|
+
node: dummyPrev
|
6279
|
+
}, dummyNext);
|
6280
|
+
return groups;
|
6281
|
+
}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and
|
6282
|
+
// previous node as arguments, optionally returning a node to insert after the
|
6283
|
+
// previous node. `prev` is an object with the previous node and `insertAfter`
|
6284
|
+
// function to insert after it. `next` is a node that will be added to the right.
|
6285
|
+
// Used for bin cancellation and inserting spacings.
|
6286
|
+
|
6287
|
+
const traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next) {
|
6288
|
+
if (next) {
|
6289
|
+
// temporarily append the right node, if exists
|
6290
|
+
nodes.push(next);
|
6304
6291
|
}
|
6305
6292
|
|
6306
|
-
|
6307
|
-
let j = 0;
|
6293
|
+
let i = 0;
|
6308
6294
|
|
6309
|
-
for (
|
6310
|
-
|
6311
|
-
|
6312
|
-
// add it to groups.
|
6295
|
+
for (; i < nodes.length; i++) {
|
6296
|
+
const node = nodes[i];
|
6297
|
+
const partialGroup = checkPartialGroup(node);
|
6313
6298
|
|
6314
|
-
if (
|
6315
|
-
//
|
6316
|
-
|
6317
|
-
|
6318
|
-
|
6319
|
-
|
6320
|
-
} // Get the type of the current non-space node. If it's a document
|
6321
|
-
// fragment, get the type of the rightmost node in the fragment.
|
6299
|
+
if (partialGroup) {
|
6300
|
+
// Recursive DFS
|
6301
|
+
traverseNonSpaceNodes(partialGroup.children, callback, prev);
|
6302
|
+
continue;
|
6303
|
+
} // Ignore explicit spaces (e.g., \;, \,) when determining what implicit
|
6304
|
+
// spacing should go between atoms of different classes
|
6322
6305
|
|
6323
6306
|
|
6324
|
-
|
6325
|
-
|
6307
|
+
if (node.classes[0] === "mspace") {
|
6308
|
+
continue;
|
6309
|
+
}
|
6326
6310
|
|
6327
|
-
|
6328
|
-
// document fragment of elements. sizingGroup sets `isRealGroup`
|
6329
|
-
// to false to avoid processing spans multiple times.
|
6311
|
+
const result = callback(node, prev.node);
|
6330
6312
|
|
6331
|
-
|
6332
|
-
|
6333
|
-
|
6313
|
+
if (result) {
|
6314
|
+
if (prev.insertAfter) {
|
6315
|
+
prev.insertAfter(result);
|
6316
|
+
} else {
|
6317
|
+
// insert at front
|
6318
|
+
nodes.unshift(result);
|
6319
|
+
i++;
|
6320
|
+
}
|
6321
|
+
}
|
6334
6322
|
|
6335
|
-
|
6336
|
-
let glueOptions = options;
|
6323
|
+
prev.node = node;
|
6337
6324
|
|
6338
|
-
|
6339
|
-
|
6325
|
+
prev.insertAfter = (index => n => {
|
6326
|
+
nodes.splice(index + 1, 0, n);
|
6327
|
+
i++;
|
6328
|
+
})(i);
|
6329
|
+
}
|
6340
6330
|
|
6341
|
-
|
6342
|
-
|
6343
|
-
|
6344
|
-
|
6345
|
-
}
|
6346
|
-
}
|
6331
|
+
if (next) {
|
6332
|
+
nodes.pop();
|
6333
|
+
}
|
6334
|
+
}; // Check if given node is a partial group, i.e., does not affect spacing around.
|
6347
6335
|
|
6348
|
-
groups.push(buildCommon.makeGlue(space, glueOptions));
|
6349
|
-
}
|
6350
|
-
}
|
6351
6336
|
|
6352
|
-
|
6353
|
-
|
6337
|
+
const checkPartialGroup = function checkPartialGroup(node) {
|
6338
|
+
if (node instanceof DocumentFragment || node instanceof Anchor) {
|
6339
|
+
return node;
|
6354
6340
|
}
|
6355
6341
|
|
6356
|
-
return
|
6342
|
+
return null;
|
6357
6343
|
}; // Return the outermost node of a domTree.
|
6358
6344
|
|
6345
|
+
|
6359
6346
|
const getOutermostNode = function getOutermostNode(node, side) {
|
6360
|
-
|
6361
|
-
|
6347
|
+
const partialGroup = checkPartialGroup(node);
|
6348
|
+
|
6349
|
+
if (partialGroup) {
|
6350
|
+
const children = partialGroup.children;
|
6362
6351
|
|
6363
6352
|
if (children.length) {
|
6364
6353
|
if (side === "right") {
|
6365
6354
|
return getOutermostNode(children[children.length - 1], "right");
|
6366
6355
|
} else if (side === "left") {
|
6367
|
-
return getOutermostNode(children[0], "
|
6356
|
+
return getOutermostNode(children[0], "left");
|
6368
6357
|
}
|
6369
6358
|
}
|
6370
6359
|
}
|
6371
6360
|
|
6372
6361
|
return node;
|
6373
6362
|
}; // Return math atom class (mclass) of a domTree.
|
6363
|
+
// If `side` is given, it will get the type of the outermost node at given side.
|
6374
6364
|
|
6375
6365
|
|
6376
6366
|
const getTypeOfDomTree = function getTypeOfDomTree(node, side) {
|
@@ -6378,18 +6368,13 @@ const getTypeOfDomTree = function getTypeOfDomTree(node, side) {
|
|
6378
6368
|
return null;
|
6379
6369
|
}
|
6380
6370
|
|
6381
|
-
|
6371
|
+
if (side) {
|
6372
|
+
node = getOutermostNode(node, side);
|
6373
|
+
} // This makes a lot of assumptions as to where the type of atom
|
6382
6374
|
// appears. We should do a better job of enforcing this.
|
6383
6375
|
|
6376
|
+
|
6384
6377
|
return DomEnum[node.classes[0]] || null;
|
6385
|
-
}; // If `node` is an atom return whether it's been assigned the mtight class.
|
6386
|
-
// If `node` is a document fragment, return the value of isLeftTight() for the
|
6387
|
-
// leftmost node in the fragment.
|
6388
|
-
// 'mtight' indicates that the node is script or scriptscript style.
|
6389
|
-
|
6390
|
-
const isLeftTight = function isLeftTight(node) {
|
6391
|
-
node = getOutermostNode(node, "left");
|
6392
|
-
return node.hasClass("mtight");
|
6393
6378
|
};
|
6394
6379
|
const makeNullDelimiter = function makeNullDelimiter(options, classes) {
|
6395
6380
|
const moreClasses = ["nulldelimiter"].concat(options.baseSizingClasses());
|
@@ -6477,10 +6462,10 @@ function buildHTML(tree, options) {
|
|
6477
6462
|
|
6478
6463
|
if (expression[i].hasClass("mbin") || expression[i].hasClass("mrel") || expression[i].hasClass("allowbreak")) {
|
6479
6464
|
// Put any post-operator glue on same line as operator.
|
6480
|
-
// Watch for \nobreak along the way.
|
6465
|
+
// Watch for \nobreak along the way, and stop at \newline.
|
6481
6466
|
let nobreak = false;
|
6482
6467
|
|
6483
|
-
while (i < expression.length - 1 && expression[i + 1].hasClass("mspace")) {
|
6468
|
+
while (i < expression.length - 1 && expression[i + 1].hasClass("mspace") && !expression[i + 1].hasClass("newline")) {
|
6484
6469
|
i++;
|
6485
6470
|
parts.push(expression[i]);
|
6486
6471
|
|
@@ -6638,11 +6623,9 @@ class MathNode {
|
|
6638
6623
|
*/
|
6639
6624
|
|
6640
6625
|
class TextNode {
|
6641
|
-
constructor(text
|
6626
|
+
constructor(text) {
|
6642
6627
|
this.text = void 0;
|
6643
|
-
this.needsEscape = void 0;
|
6644
6628
|
this.text = text;
|
6645
|
-
this.needsEscape = needsEscape;
|
6646
6629
|
}
|
6647
6630
|
/**
|
6648
6631
|
* Converts the text node into a DOM text node.
|
@@ -6650,7 +6633,7 @@ class TextNode {
|
|
6650
6633
|
|
6651
6634
|
|
6652
6635
|
toNode() {
|
6653
|
-
return document.createTextNode(this.
|
6636
|
+
return document.createTextNode(this.text);
|
6654
6637
|
}
|
6655
6638
|
/**
|
6656
6639
|
* Converts the text node into escaped HTML markup
|
@@ -6659,16 +6642,16 @@ class TextNode {
|
|
6659
6642
|
|
6660
6643
|
|
6661
6644
|
toMarkup() {
|
6662
|
-
return this.toText();
|
6645
|
+
return utils.escape(this.toText());
|
6663
6646
|
}
|
6664
6647
|
/**
|
6665
|
-
* Converts the text node into
|
6648
|
+
* Converts the text node into a string
|
6666
6649
|
* (representing the text iteself).
|
6667
6650
|
*/
|
6668
6651
|
|
6669
6652
|
|
6670
6653
|
toText() {
|
6671
|
-
return this.
|
6654
|
+
return this.text;
|
6672
6655
|
}
|
6673
6656
|
|
6674
6657
|
}
|
@@ -6685,26 +6668,26 @@ class SpaceNode {
|
|
6685
6668
|
this.width = void 0;
|
6686
6669
|
this.character = void 0;
|
6687
6670
|
this.width = width; // See https://www.w3.org/TR/2000/WD-MathML2-20000328/chapter6.html
|
6688
|
-
// for a table of space-like characters. We
|
6689
|
-
// &LongNames;
|
6690
|
-
//
|
6671
|
+
// for a table of space-like characters. We use Unicode
|
6672
|
+
// representations instead of &LongNames; as it's not clear how to
|
6673
|
+
// make the latter via document.createTextNode.
|
6691
6674
|
|
6692
6675
|
if (width >= 0.05555 && width <= 0.05556) {
|
6693
|
-
this.character = "
|
6676
|
+
this.character = "\u200a"; //  
|
6694
6677
|
} else if (width >= 0.1666 && width <= 0.1667) {
|
6695
|
-
this.character = "
|
6678
|
+
this.character = "\u2009"; //  
|
6696
6679
|
} else if (width >= 0.2222 && width <= 0.2223) {
|
6697
|
-
this.character = "
|
6680
|
+
this.character = "\u2005"; //  
|
6698
6681
|
} else if (width >= 0.2777 && width <= 0.2778) {
|
6699
|
-
this.character = "
|
6682
|
+
this.character = "\u2005\u200a"; //   
|
6700
6683
|
} else if (width >= -0.05556 && width <= -0.05555) {
|
6701
|
-
this.character = "​
|
6684
|
+
this.character = "\u200a\u2063"; // ​
|
6702
6685
|
} else if (width >= -0.1667 && width <= -0.1666) {
|
6703
|
-
this.character = "​
|
6686
|
+
this.character = "\u2009\u2063"; // ​
|
6704
6687
|
} else if (width >= -0.2223 && width <= -0.2222) {
|
6705
|
-
this.character = "​
|
6688
|
+
this.character = "\u205f\u2063"; // ​
|
6706
6689
|
} else if (width >= -0.2778 && width <= -0.2777) {
|
6707
|
-
this.character = "​
|
6690
|
+
this.character = "\u2005\u2063"; // ​
|
6708
6691
|
} else {
|
6709
6692
|
this.character = null;
|
6710
6693
|
}
|
@@ -6874,13 +6857,24 @@ const buildExpression$1 = function buildExpression(expression, options) {
|
|
6874
6857
|
lastGroup.children.push(...group.children);
|
6875
6858
|
continue;
|
6876
6859
|
}
|
6860
|
+
} else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) {
|
6861
|
+
const lastChild = lastGroup.children[0];
|
6862
|
+
|
6863
|
+
if (lastChild instanceof TextNode && lastChild.text === '\u0338' && (group.type === 'mo' || group.type === 'mi' || group.type === 'mn')) {
|
6864
|
+
const child = group.children[0];
|
6865
|
+
|
6866
|
+
if (child instanceof TextNode && child.text.length > 0) {
|
6867
|
+
// Overlay with combining character long solidus
|
6868
|
+
child.text = child.text.slice(0, 1) + "\u0338" + child.text.slice(1);
|
6869
|
+
groups.pop();
|
6870
|
+
}
|
6871
|
+
}
|
6877
6872
|
}
|
6878
6873
|
}
|
6879
6874
|
|
6880
6875
|
groups.push(group);
|
6881
6876
|
lastGroup = group;
|
6882
|
-
}
|
6883
|
-
|
6877
|
+
}
|
6884
6878
|
|
6885
6879
|
return groups;
|
6886
6880
|
};
|
@@ -6951,28 +6945,36 @@ const optionsFromSettings = function optionsFromSettings(settings) {
|
|
6951
6945
|
});
|
6952
6946
|
};
|
6953
6947
|
|
6948
|
+
const displayWrap = function displayWrap(node, settings) {
|
6949
|
+
if (settings.displayMode) {
|
6950
|
+
const classes = ["katex-display"];
|
6951
|
+
|
6952
|
+
if (settings.leqno) {
|
6953
|
+
classes.push("leqno");
|
6954
|
+
}
|
6955
|
+
|
6956
|
+
if (settings.fleqn) {
|
6957
|
+
classes.push("fleqn");
|
6958
|
+
}
|
6959
|
+
|
6960
|
+
node = buildCommon.makeSpan(classes, [node]);
|
6961
|
+
}
|
6962
|
+
|
6963
|
+
return node;
|
6964
|
+
};
|
6965
|
+
|
6954
6966
|
const buildTree = function buildTree(tree, expression, settings) {
|
6955
6967
|
const options = optionsFromSettings(settings);
|
6956
6968
|
const mathMLNode = buildMathML(tree, expression, options);
|
6957
6969
|
const htmlNode = buildHTML(tree, options);
|
6958
6970
|
const katexNode = buildCommon.makeSpan(["katex"], [mathMLNode, htmlNode]);
|
6959
|
-
|
6960
|
-
if (settings.displayMode) {
|
6961
|
-
return buildCommon.makeSpan(["katex-display"], [katexNode]);
|
6962
|
-
} else {
|
6963
|
-
return katexNode;
|
6964
|
-
}
|
6971
|
+
return displayWrap(katexNode, settings);
|
6965
6972
|
};
|
6966
6973
|
const buildHTMLTree = function buildHTMLTree(tree, expression, settings) {
|
6967
6974
|
const options = optionsFromSettings(settings);
|
6968
6975
|
const htmlNode = buildHTML(tree, options);
|
6969
6976
|
const katexNode = buildCommon.makeSpan(["katex"], [htmlNode]);
|
6970
|
-
|
6971
|
-
if (settings.displayMode) {
|
6972
|
-
return buildCommon.makeSpan(["katex-display"], [katexNode]);
|
6973
|
-
} else {
|
6974
|
-
return katexNode;
|
6975
|
-
}
|
6977
|
+
return displayWrap(katexNode, settings);
|
6976
6978
|
};
|
6977
6979
|
|
6978
6980
|
/**
|
@@ -6991,8 +6993,10 @@ const stretchyCodePoint = {
|
|
6991
6993
|
overrightarrow: "\u2192",
|
6992
6994
|
underrightarrow: "\u2192",
|
6993
6995
|
xrightarrow: "\u2192",
|
6994
|
-
underbrace: "\
|
6996
|
+
underbrace: "\u23df",
|
6995
6997
|
overbrace: "\u23de",
|
6998
|
+
overgroup: "\u23e0",
|
6999
|
+
undergroup: "\u23e1",
|
6996
7000
|
overleftrightarrow: "\u2194",
|
6997
7001
|
underleftrightarrow: "\u2194",
|
6998
7002
|
xleftrightarrow: "\u2194",
|
@@ -7529,10 +7533,9 @@ defineFunction({
|
|
7529
7533
|
props: {
|
7530
7534
|
numArgs: 1
|
7531
7535
|
},
|
7532
|
-
handler: ({
|
7533
|
-
parser,
|
7534
|
-
|
7535
|
-
}, args) => {
|
7536
|
+
handler: (_ref, args) => {
|
7537
|
+
let parser = _ref.parser,
|
7538
|
+
funcName = _ref.funcName;
|
7536
7539
|
const base = args[0];
|
7537
7540
|
return {
|
7538
7541
|
type: "accentUnder",
|
@@ -7572,7 +7575,15 @@ defineFunction({
|
|
7572
7575
|
}
|
7573
7576
|
});
|
7574
7577
|
|
7575
|
-
//
|
7578
|
+
// Helper function
|
7579
|
+
const paddedNode = group => {
|
7580
|
+
const node = new mathMLTree.MathNode("mpadded", group ? [group] : []);
|
7581
|
+
node.setAttribute("width", "+0.6em");
|
7582
|
+
node.setAttribute("lspace", "0.3em");
|
7583
|
+
return node;
|
7584
|
+
}; // Stretchy arrows with an optional argument
|
7585
|
+
|
7586
|
+
|
7576
7587
|
defineFunction({
|
7577
7588
|
type: "xArrow",
|
7578
7589
|
names: ["\\xleftarrow", "\\xrightarrow", "\\xLeftarrow", "\\xRightarrow", "\\xleftrightarrow", "\\xLeftrightarrow", "\\xhookleftarrow", "\\xhookrightarrow", "\\xmapsto", "\\xrightharpoondown", "\\xrightharpoonup", "\\xleftharpoondown", "\\xleftharpoonup", "\\xrightleftharpoons", "\\xleftrightharpoons", "\\xlongequal", "\\xtwoheadrightarrow", "\\xtwoheadleftarrow", "\\xtofrom", // The next 3 functions are here to support the mhchem extension.
|
@@ -7583,10 +7594,9 @@ defineFunction({
|
|
7583
7594
|
numOptionalArgs: 1
|
7584
7595
|
},
|
7585
7596
|
|
7586
|
-
handler({
|
7587
|
-
parser,
|
7588
|
-
|
7589
|
-
}, args, optArgs) {
|
7597
|
+
handler(_ref, args, optArgs) {
|
7598
|
+
let parser = _ref.parser,
|
7599
|
+
funcName = _ref.funcName;
|
7590
7600
|
return {
|
7591
7601
|
type: "xArrow",
|
7592
7602
|
mode: parser.mode,
|
@@ -7671,22 +7681,24 @@ defineFunction({
|
|
7671
7681
|
mathmlBuilder(group, options) {
|
7672
7682
|
const arrowNode = stretchy.mathMLnode(group.label);
|
7673
7683
|
let node;
|
7674
|
-
let lowerNode;
|
7675
7684
|
|
7676
7685
|
if (group.body) {
|
7677
|
-
const upperNode = buildGroup$1(group.body, options);
|
7686
|
+
const upperNode = paddedNode(buildGroup$1(group.body, options));
|
7678
7687
|
|
7679
7688
|
if (group.below) {
|
7680
|
-
lowerNode = buildGroup$1(group.below, options);
|
7689
|
+
const lowerNode = paddedNode(buildGroup$1(group.below, options));
|
7681
7690
|
node = new mathMLTree.MathNode("munderover", [arrowNode, lowerNode, upperNode]);
|
7682
7691
|
} else {
|
7683
7692
|
node = new mathMLTree.MathNode("mover", [arrowNode, upperNode]);
|
7684
7693
|
}
|
7685
7694
|
} else if (group.below) {
|
7686
|
-
lowerNode = buildGroup$1(group.below, options);
|
7695
|
+
const lowerNode = paddedNode(buildGroup$1(group.below, options));
|
7687
7696
|
node = new mathMLTree.MathNode("munder", [arrowNode, lowerNode]);
|
7688
7697
|
} else {
|
7689
|
-
|
7698
|
+
// This should never happen.
|
7699
|
+
// Parser.js throws an error if there is no argument.
|
7700
|
+
node = paddedNode();
|
7701
|
+
node = new mathMLTree.MathNode("mover", [arrowNode, node]);
|
7690
7702
|
}
|
7691
7703
|
|
7692
7704
|
return node;
|
@@ -7705,9 +7717,8 @@ defineFunction({
|
|
7705
7717
|
allowedInText: true
|
7706
7718
|
},
|
7707
7719
|
|
7708
|
-
handler({
|
7709
|
-
parser
|
7710
|
-
}, args) {
|
7720
|
+
handler(_ref, args) {
|
7721
|
+
let parser = _ref.parser;
|
7711
7722
|
const arg = assertNodeType(args[0], "ordgroup");
|
7712
7723
|
const group = arg.body;
|
7713
7724
|
let number = "";
|
@@ -7742,7 +7753,7 @@ const htmlBuilder$1 = (group, options) => {
|
|
7742
7753
|
};
|
7743
7754
|
|
7744
7755
|
const mathmlBuilder$1 = (group, options) => {
|
7745
|
-
const inner = buildExpression$1(group.body, options);
|
7756
|
+
const inner = buildExpression$1(group.body, options.withColor(group.color));
|
7746
7757
|
const node = new mathMLTree.MathNode("mstyle", inner);
|
7747
7758
|
node.setAttribute("mathcolor", group.color);
|
7748
7759
|
return node;
|
@@ -7758,9 +7769,8 @@ defineFunction({
|
|
7758
7769
|
argTypes: ["color", "original"]
|
7759
7770
|
},
|
7760
7771
|
|
7761
|
-
handler({
|
7762
|
-
parser
|
7763
|
-
}, args) {
|
7772
|
+
handler(_ref, args) {
|
7773
|
+
let parser = _ref.parser;
|
7764
7774
|
const color = assertNodeType(args[0], "color-token").color;
|
7765
7775
|
const body = args[1];
|
7766
7776
|
return {
|
@@ -7771,32 +7781,6 @@ defineFunction({
|
|
7771
7781
|
};
|
7772
7782
|
},
|
7773
7783
|
|
7774
|
-
htmlBuilder: htmlBuilder$1,
|
7775
|
-
mathmlBuilder: mathmlBuilder$1
|
7776
|
-
}); // TODO(kevinb): define these using macros
|
7777
|
-
|
7778
|
-
defineFunction({
|
7779
|
-
type: "color",
|
7780
|
-
names: ["\\blue", "\\orange", "\\pink", "\\red", "\\green", "\\gray", "\\purple", "\\blueA", "\\blueB", "\\blueC", "\\blueD", "\\blueE", "\\tealA", "\\tealB", "\\tealC", "\\tealD", "\\tealE", "\\greenA", "\\greenB", "\\greenC", "\\greenD", "\\greenE", "\\goldA", "\\goldB", "\\goldC", "\\goldD", "\\goldE", "\\redA", "\\redB", "\\redC", "\\redD", "\\redE", "\\maroonA", "\\maroonB", "\\maroonC", "\\maroonD", "\\maroonE", "\\purpleA", "\\purpleB", "\\purpleC", "\\purpleD", "\\purpleE", "\\mintA", "\\mintB", "\\mintC", "\\grayA", "\\grayB", "\\grayC", "\\grayD", "\\grayE", "\\grayF", "\\grayG", "\\grayH", "\\grayI", "\\kaBlue", "\\kaGreen"],
|
7781
|
-
props: {
|
7782
|
-
numArgs: 1,
|
7783
|
-
allowedInText: true,
|
7784
|
-
greediness: 3
|
7785
|
-
},
|
7786
|
-
|
7787
|
-
handler({
|
7788
|
-
parser,
|
7789
|
-
funcName
|
7790
|
-
}, args) {
|
7791
|
-
const body = args[0];
|
7792
|
-
return {
|
7793
|
-
type: "color",
|
7794
|
-
mode: parser.mode,
|
7795
|
-
color: "katex-" + funcName.slice(1),
|
7796
|
-
body: ordargument(body)
|
7797
|
-
};
|
7798
|
-
},
|
7799
|
-
|
7800
7784
|
htmlBuilder: htmlBuilder$1,
|
7801
7785
|
mathmlBuilder: mathmlBuilder$1
|
7802
7786
|
});
|
@@ -7810,10 +7794,9 @@ defineFunction({
|
|
7810
7794
|
argTypes: ["color"]
|
7811
7795
|
},
|
7812
7796
|
|
7813
|
-
handler({
|
7814
|
-
parser,
|
7815
|
-
|
7816
|
-
}, args) {
|
7797
|
+
handler(_ref2, args) {
|
7798
|
+
let parser = _ref2.parser,
|
7799
|
+
breakOnTokenText = _ref2.breakOnTokenText;
|
7817
7800
|
const color = assertNodeType(args[0], "color-token").color; // If we see a styling function, parse out the implicit body
|
7818
7801
|
|
7819
7802
|
const body = parser.parseExpression(true, breakOnTokenText);
|
@@ -7844,10 +7827,9 @@ defineFunction({
|
|
7844
7827
|
allowedInText: true
|
7845
7828
|
},
|
7846
7829
|
|
7847
|
-
handler({
|
7848
|
-
parser,
|
7849
|
-
|
7850
|
-
}, args, optArgs) {
|
7830
|
+
handler(_ref, args, optArgs) {
|
7831
|
+
let parser = _ref.parser,
|
7832
|
+
funcName = _ref.funcName;
|
7851
7833
|
const size = optArgs[0];
|
7852
7834
|
const newRow = funcName === "\\cr";
|
7853
7835
|
let newLine = false;
|
@@ -8725,7 +8707,7 @@ defineFunction({
|
|
8725
8707
|
htmlBuilder: (group, options) => {
|
8726
8708
|
assertParsed(group); // Build the inner expression
|
8727
8709
|
|
8728
|
-
const inner = buildExpression(group.body, options, true, [
|
8710
|
+
const inner = buildExpression(group.body, options, true, ["mopen", "mclose"]);
|
8729
8711
|
let innerHeight = 0;
|
8730
8712
|
let innerDepth = 0;
|
8731
8713
|
let hadMiddle = false; // Calculate its height and depth
|
@@ -8848,8 +8830,17 @@ defineFunction({
|
|
8848
8830
|
return middleDelim;
|
8849
8831
|
},
|
8850
8832
|
mathmlBuilder: (group, options) => {
|
8851
|
-
|
8852
|
-
|
8833
|
+
// A Firefox \middle will strech a character vertically only if it
|
8834
|
+
// is in the fence part of the operator dictionary at:
|
8835
|
+
// https://www.w3.org/TR/MathML3/appendixc.html.
|
8836
|
+
// So we need to avoid U+2223 and use plain "|" instead.
|
8837
|
+
const textNode = group.delim === "\\vert" || group.delim === "|" ? makeText("|", "text") : makeText(group.delim, group.mode);
|
8838
|
+
const middleNode = new mathMLTree.MathNode("mo", [textNode]);
|
8839
|
+
middleNode.setAttribute("fence", "true"); // MathML gives 5/18em spacing to each <mo> element.
|
8840
|
+
// \middle should get delimiter spacing instead.
|
8841
|
+
|
8842
|
+
middleNode.setAttribute("lspace", "0.05em");
|
8843
|
+
middleNode.setAttribute("rspace", "0.05em");
|
8853
8844
|
return middleNode;
|
8854
8845
|
}
|
8855
8846
|
});
|
@@ -8955,7 +8946,7 @@ const htmlBuilder$2 = (group, options) => {
|
|
8955
8946
|
};
|
8956
8947
|
|
8957
8948
|
const mathmlBuilder$2 = (group, options) => {
|
8958
|
-
const node = new mathMLTree.MathNode("menclose", [buildGroup$1(group.body, options)]);
|
8949
|
+
const node = new mathMLTree.MathNode(group.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [buildGroup$1(group.body, options)]);
|
8959
8950
|
|
8960
8951
|
switch (group.label) {
|
8961
8952
|
case "\\cancel":
|
@@ -8975,8 +8966,20 @@ const mathmlBuilder$2 = (group, options) => {
|
|
8975
8966
|
break;
|
8976
8967
|
|
8977
8968
|
case "\\fcolorbox":
|
8978
|
-
|
8979
|
-
|
8969
|
+
case "\\colorbox":
|
8970
|
+
// <menclose> doesn't have a good notation option. So use <mpadded>
|
8971
|
+
// instead. Set some attributes that come included with <menclose>.
|
8972
|
+
node.setAttribute("width", "+6pt");
|
8973
|
+
node.setAttribute("height", "+6pt");
|
8974
|
+
node.setAttribute("lspace", "3pt"); // LaTeX source2e: \fboxsep = 3pt
|
8975
|
+
|
8976
|
+
node.setAttribute("voffset", "3pt");
|
8977
|
+
|
8978
|
+
if (group.label === "\\fcolorbox") {
|
8979
|
+
const thk = options.fontMetrics().defaultRuleThickness;
|
8980
|
+
node.setAttribute("style", "border: " + thk + "em solid " + String(group.borderColor));
|
8981
|
+
}
|
8982
|
+
|
8980
8983
|
break;
|
8981
8984
|
|
8982
8985
|
case "\\xcancel":
|
@@ -9001,10 +9004,9 @@ defineFunction({
|
|
9001
9004
|
argTypes: ["color", "text"]
|
9002
9005
|
},
|
9003
9006
|
|
9004
|
-
handler({
|
9005
|
-
parser,
|
9006
|
-
|
9007
|
-
}, args, optArgs) {
|
9007
|
+
handler(_ref, args, optArgs) {
|
9008
|
+
let parser = _ref.parser,
|
9009
|
+
funcName = _ref.funcName;
|
9008
9010
|
const color = assertNodeType(args[0], "color-token").color;
|
9009
9011
|
const body = args[1];
|
9010
9012
|
return {
|
@@ -9029,10 +9031,9 @@ defineFunction({
|
|
9029
9031
|
argTypes: ["color", "color", "text"]
|
9030
9032
|
},
|
9031
9033
|
|
9032
|
-
handler({
|
9033
|
-
parser,
|
9034
|
-
|
9035
|
-
}, args, optArgs) {
|
9034
|
+
handler(_ref2, args, optArgs) {
|
9035
|
+
let parser = _ref2.parser,
|
9036
|
+
funcName = _ref2.funcName;
|
9036
9037
|
const borderColor = assertNodeType(args[0], "color-token").color;
|
9037
9038
|
const backgroundColor = assertNodeType(args[1], "color-token").color;
|
9038
9039
|
const body = args[2];
|
@@ -9058,9 +9059,8 @@ defineFunction({
|
|
9058
9059
|
allowedInText: true
|
9059
9060
|
},
|
9060
9061
|
|
9061
|
-
handler({
|
9062
|
-
parser
|
9063
|
-
}, args) {
|
9062
|
+
handler(_ref3, args) {
|
9063
|
+
let parser = _ref3.parser;
|
9064
9064
|
return {
|
9065
9065
|
type: "enclose",
|
9066
9066
|
mode: parser.mode,
|
@@ -9077,10 +9077,9 @@ defineFunction({
|
|
9077
9077
|
numArgs: 1
|
9078
9078
|
},
|
9079
9079
|
|
9080
|
-
handler({
|
9081
|
-
parser,
|
9082
|
-
|
9083
|
-
}, args, optArgs) {
|
9080
|
+
handler(_ref4, args, optArgs) {
|
9081
|
+
let parser = _ref4.parser,
|
9082
|
+
funcName = _ref4.funcName;
|
9084
9083
|
const body = args[0];
|
9085
9084
|
return {
|
9086
9085
|
type: "enclose",
|
@@ -9100,14 +9099,13 @@ defineFunction({
|
|
9100
9099
|
* `Parser.js` requires this dictionary via `environments.js`.
|
9101
9100
|
*/
|
9102
9101
|
const _environments = {};
|
9103
|
-
function defineEnvironment({
|
9104
|
-
type,
|
9105
|
-
|
9106
|
-
|
9107
|
-
|
9108
|
-
|
9109
|
-
|
9110
|
-
}) {
|
9102
|
+
function defineEnvironment(_ref) {
|
9103
|
+
let type = _ref.type,
|
9104
|
+
names = _ref.names,
|
9105
|
+
props = _ref.props,
|
9106
|
+
handler = _ref.handler,
|
9107
|
+
htmlBuilder = _ref.htmlBuilder,
|
9108
|
+
mathmlBuilder = _ref.mathmlBuilder;
|
9111
9109
|
// Set default values of environments.
|
9112
9110
|
const data = {
|
9113
9111
|
type,
|
@@ -9159,12 +9157,12 @@ function getHLines(parser) {
|
|
9159
9157
|
*/
|
9160
9158
|
|
9161
9159
|
|
9162
|
-
function parseArray(parser, {
|
9163
|
-
hskipBeforeAndAfter,
|
9164
|
-
|
9165
|
-
|
9166
|
-
|
9167
|
-
|
9160
|
+
function parseArray(parser, _ref, style) {
|
9161
|
+
let hskipBeforeAndAfter = _ref.hskipBeforeAndAfter,
|
9162
|
+
addJot = _ref.addJot,
|
9163
|
+
cols = _ref.cols,
|
9164
|
+
arraystretch = _ref.arraystretch,
|
9165
|
+
colSeparationType = _ref.colSeparationType;
|
9168
9166
|
// Parse body of array with \\ temporarily mapped to \cr
|
9169
9167
|
parser.gullet.beginGroup();
|
9170
9168
|
parser.gullet.macros.set("\\\\", "\\cr"); // Get current arraystretch if it's not set by the environment
|
@@ -9249,7 +9247,8 @@ function parseArray(parser, {
|
|
9249
9247
|
cols,
|
9250
9248
|
rowGaps,
|
9251
9249
|
hskipBeforeAndAfter,
|
9252
|
-
hLinesBeforeRow
|
9250
|
+
hLinesBeforeRow,
|
9251
|
+
colSeparationType
|
9253
9252
|
};
|
9254
9253
|
} // Decides on a style for cells in an array according to whether the given
|
9255
9254
|
// environment name starts with the letter 'd'.
|
@@ -9498,12 +9497,117 @@ const htmlBuilder$3 = function htmlBuilder(group, options) {
|
|
9498
9497
|
return buildCommon.makeSpan(["mord"], [body], options);
|
9499
9498
|
};
|
9500
9499
|
|
9500
|
+
const alignMap = {
|
9501
|
+
c: "center ",
|
9502
|
+
l: "left ",
|
9503
|
+
r: "right "
|
9504
|
+
};
|
9505
|
+
|
9501
9506
|
const mathmlBuilder$3 = function mathmlBuilder(group, options) {
|
9502
|
-
|
9507
|
+
const table = new mathMLTree.MathNode("mtable", group.body.map(function (row) {
|
9503
9508
|
return new mathMLTree.MathNode("mtr", row.map(function (cell) {
|
9504
9509
|
return new mathMLTree.MathNode("mtd", [buildGroup$1(cell, options)]);
|
9505
9510
|
}));
|
9506
|
-
}));
|
9511
|
+
})); // Set column alignment, row spacing, column spacing, and
|
9512
|
+
// array lines by setting attributes on the table element.
|
9513
|
+
// Set the row spacing. In MathML, we specify a gap distance.
|
9514
|
+
// We do not use rowGap[] because MathML automatically increases
|
9515
|
+
// cell height with the height/depth of the element content.
|
9516
|
+
// LaTeX \arraystretch multiplies the row baseline-to-baseline distance.
|
9517
|
+
// We simulate this by adding (arraystretch - 1)em to the gap. This
|
9518
|
+
// does a reasonable job of adjusting arrays containing 1 em tall content.
|
9519
|
+
// The 0.16 and 0.09 values are found emprically. They produce an array
|
9520
|
+
// similar to LaTeX and in which content does not interfere with \hines.
|
9521
|
+
|
9522
|
+
const gap = 0.16 + group.arraystretch - 1 + (group.addJot ? 0.09 : 0);
|
9523
|
+
table.setAttribute("rowspacing", gap + "em"); // MathML table lines go only between cells.
|
9524
|
+
// To place a line on an edge we'll use <menclose>, if necessary.
|
9525
|
+
|
9526
|
+
let menclose = "";
|
9527
|
+
let align = "";
|
9528
|
+
|
9529
|
+
if (group.cols) {
|
9530
|
+
// Find column alignment, column spacing, and vertical lines.
|
9531
|
+
const cols = group.cols;
|
9532
|
+
let columnLines = "";
|
9533
|
+
let prevTypeWasAlign = false;
|
9534
|
+
let iStart = 0;
|
9535
|
+
let iEnd = cols.length;
|
9536
|
+
|
9537
|
+
if (cols[0].type === "separator") {
|
9538
|
+
menclose += "top ";
|
9539
|
+
iStart = 1;
|
9540
|
+
}
|
9541
|
+
|
9542
|
+
if (cols[cols.length - 1].type === "separator") {
|
9543
|
+
menclose += "bottom ";
|
9544
|
+
iEnd -= 1;
|
9545
|
+
}
|
9546
|
+
|
9547
|
+
for (let i = iStart; i < iEnd; i++) {
|
9548
|
+
if (cols[i].type === "align") {
|
9549
|
+
align += alignMap[cols[i].align];
|
9550
|
+
|
9551
|
+
if (prevTypeWasAlign) {
|
9552
|
+
columnLines += "none ";
|
9553
|
+
}
|
9554
|
+
|
9555
|
+
prevTypeWasAlign = true;
|
9556
|
+
} else if (cols[i].type === "separator") {
|
9557
|
+
// MathML accepts only single lines between cells.
|
9558
|
+
// So we read only the first of consecutive separators.
|
9559
|
+
if (prevTypeWasAlign) {
|
9560
|
+
columnLines += cols[i].separator === "|" ? "solid " : "dashed ";
|
9561
|
+
prevTypeWasAlign = false;
|
9562
|
+
}
|
9563
|
+
}
|
9564
|
+
}
|
9565
|
+
|
9566
|
+
table.setAttribute("columnalign", align.trim());
|
9567
|
+
|
9568
|
+
if (/[sd]/.test(columnLines)) {
|
9569
|
+
table.setAttribute("columnlines", columnLines.trim());
|
9570
|
+
}
|
9571
|
+
} // Set column spacing.
|
9572
|
+
|
9573
|
+
|
9574
|
+
if (group.colSeparationType === "align") {
|
9575
|
+
const cols = group.cols || [];
|
9576
|
+
let spacing = "";
|
9577
|
+
|
9578
|
+
for (let i = 1; i < cols.length; i++) {
|
9579
|
+
spacing += i % 2 ? "0em " : "1em ";
|
9580
|
+
}
|
9581
|
+
|
9582
|
+
table.setAttribute("columnspacing", spacing.trim());
|
9583
|
+
} else if (group.colSeparationType === "alignat") {
|
9584
|
+
table.setAttribute("columnspacing", "0em");
|
9585
|
+
} else {
|
9586
|
+
table.setAttribute("columnspacing", "1em");
|
9587
|
+
} // Address \hline and \hdashline
|
9588
|
+
|
9589
|
+
|
9590
|
+
let rowLines = "";
|
9591
|
+
const hlines = group.hLinesBeforeRow;
|
9592
|
+
menclose += hlines[0].length > 0 ? "left " : "";
|
9593
|
+
menclose += hlines[hlines.length - 1].length > 0 ? "right " : "";
|
9594
|
+
|
9595
|
+
for (let i = 1; i < hlines.length - 1; i++) {
|
9596
|
+
rowLines += hlines[i].length === 0 ? "none " // MathML accepts only a single line between rows. Read one element.
|
9597
|
+
: hlines[i][0] ? "dashed " : "solid ";
|
9598
|
+
}
|
9599
|
+
|
9600
|
+
if (/[sd]/.test(rowLines)) {
|
9601
|
+
table.setAttribute("rowlines", rowLines.trim());
|
9602
|
+
}
|
9603
|
+
|
9604
|
+
if (menclose === "") {
|
9605
|
+
return table;
|
9606
|
+
} else {
|
9607
|
+
const wrapper = new mathMLTree.MathNode("menclose", [table]);
|
9608
|
+
wrapper.setAttribute("notation", menclose.trim());
|
9609
|
+
return wrapper;
|
9610
|
+
}
|
9507
9611
|
}; // Convenience function for aligned and alignedat environments.
|
9508
9612
|
|
9509
9613
|
|
@@ -9586,6 +9690,7 @@ const alignedHandler = function alignedHandler(context, args) {
|
|
9586
9690
|
};
|
9587
9691
|
}
|
9588
9692
|
|
9693
|
+
res.colSeparationType = isAligned ? "align" : "alignat";
|
9589
9694
|
return res;
|
9590
9695
|
}; // Arrays are part of LaTeX, defined in lttab.dtx so its documentation
|
9591
9696
|
// is part of the source2e.pdf file of LaTeX2e source documentation.
|
@@ -9806,10 +9911,9 @@ defineFunction({
|
|
9806
9911
|
argTypes: ["text"]
|
9807
9912
|
},
|
9808
9913
|
|
9809
|
-
handler({
|
9810
|
-
parser,
|
9811
|
-
|
9812
|
-
}, args) {
|
9914
|
+
handler(_ref, args) {
|
9915
|
+
let parser = _ref.parser,
|
9916
|
+
funcName = _ref.funcName;
|
9813
9917
|
const nameGroup = args[0];
|
9814
9918
|
|
9815
9919
|
if (nameGroup.type !== "ordgroup") {
|
@@ -9883,10 +9987,9 @@ defineFunction({
|
|
9883
9987
|
numArgs: 1
|
9884
9988
|
},
|
9885
9989
|
|
9886
|
-
handler({
|
9887
|
-
parser,
|
9888
|
-
|
9889
|
-
}, args) {
|
9990
|
+
handler(_ref, args) {
|
9991
|
+
let parser = _ref.parser,
|
9992
|
+
funcName = _ref.funcName;
|
9890
9993
|
const body = args[0];
|
9891
9994
|
return {
|
9892
9995
|
type: "mclass",
|
@@ -9921,9 +10024,8 @@ defineFunction({
|
|
9921
10024
|
numArgs: 2
|
9922
10025
|
},
|
9923
10026
|
|
9924
|
-
handler({
|
9925
|
-
parser
|
9926
|
-
}, args) {
|
10027
|
+
handler(_ref2, args) {
|
10028
|
+
let parser = _ref2.parser;
|
9927
10029
|
return {
|
9928
10030
|
type: "mclass",
|
9929
10031
|
mode: parser.mode,
|
@@ -9941,10 +10043,9 @@ defineFunction({
|
|
9941
10043
|
numArgs: 2
|
9942
10044
|
},
|
9943
10045
|
|
9944
|
-
handler({
|
9945
|
-
parser,
|
9946
|
-
|
9947
|
-
}, args) {
|
10046
|
+
handler(_ref3, args) {
|
10047
|
+
let parser = _ref3.parser,
|
10048
|
+
funcName = _ref3.funcName;
|
9948
10049
|
const baseArg = args[1];
|
9949
10050
|
const shiftedArg = args[0];
|
9950
10051
|
let mclass;
|
@@ -9961,6 +10062,7 @@ defineFunction({
|
|
9961
10062
|
mode: baseArg.mode,
|
9962
10063
|
limits: true,
|
9963
10064
|
alwaysHandleSupSub: true,
|
10065
|
+
parentIsSupSub: false,
|
9964
10066
|
symbol: false,
|
9965
10067
|
suppressBaseShift: funcName !== "\\stackrel",
|
9966
10068
|
body: ordargument(baseArg)
|
@@ -10014,10 +10116,9 @@ defineFunction({
|
|
10014
10116
|
numArgs: 1,
|
10015
10117
|
greediness: 2
|
10016
10118
|
},
|
10017
|
-
handler: ({
|
10018
|
-
parser,
|
10019
|
-
|
10020
|
-
}, args) => {
|
10119
|
+
handler: (_ref, args) => {
|
10120
|
+
let parser = _ref.parser,
|
10121
|
+
funcName = _ref.funcName;
|
10021
10122
|
const body = args[0];
|
10022
10123
|
let func = funcName;
|
10023
10124
|
|
@@ -10042,9 +10143,8 @@ defineFunction({
|
|
10042
10143
|
numArgs: 1,
|
10043
10144
|
greediness: 2
|
10044
10145
|
},
|
10045
|
-
handler: ({
|
10046
|
-
parser
|
10047
|
-
}, args) => {
|
10146
|
+
handler: (_ref2, args) => {
|
10147
|
+
let parser = _ref2.parser;
|
10048
10148
|
const body = args[0]; // amsbsy.sty's \boldsymbol uses \binrel spacing to inherit the
|
10049
10149
|
// argument's bin|rel|ord status
|
10050
10150
|
|
@@ -10069,13 +10169,11 @@ defineFunction({
|
|
10069
10169
|
numArgs: 0,
|
10070
10170
|
allowedInText: true
|
10071
10171
|
},
|
10072
|
-
handler: ({
|
10073
|
-
parser,
|
10074
|
-
|
10075
|
-
|
10076
|
-
}, args) => {
|
10172
|
+
handler: (_ref3, args) => {
|
10173
|
+
let parser = _ref3.parser,
|
10174
|
+
funcName = _ref3.funcName,
|
10175
|
+
breakOnTokenText = _ref3.breakOnTokenText;
|
10077
10176
|
const mode = parser.mode;
|
10078
|
-
parser.consumeSpaces();
|
10079
10177
|
const body = parser.parseExpression(true, breakOnTokenText);
|
10080
10178
|
const style = `math${funcName.slice(1)}`;
|
10081
10179
|
return {
|
@@ -10093,23 +10191,30 @@ defineFunction({
|
|
10093
10191
|
mathmlBuilder: mathmlBuilder$5
|
10094
10192
|
});
|
10095
10193
|
|
10096
|
-
const
|
10097
|
-
// Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).
|
10194
|
+
const adjustStyle = (size, originalStyle) => {
|
10098
10195
|
// Figure out what style this fraction should be in based on the
|
10099
10196
|
// function used
|
10100
|
-
let style =
|
10197
|
+
let style = originalStyle;
|
10101
10198
|
|
10102
|
-
if (
|
10103
|
-
style
|
10104
|
-
|
10199
|
+
if (size === "display") {
|
10200
|
+
// Get display style as a default.
|
10201
|
+
// If incoming style is sub/sup, use style.text() to get correct size.
|
10202
|
+
style = style.id >= Style$1.SCRIPT.id ? style.text() : Style$1.DISPLAY;
|
10203
|
+
} else if (size === "text" && style.size === Style$1.DISPLAY.size) {
|
10105
10204
|
// We're in a \tfrac but incoming style is displaystyle, so:
|
10106
10205
|
style = Style$1.TEXT;
|
10107
|
-
} else if (
|
10206
|
+
} else if (size === "script") {
|
10108
10207
|
style = Style$1.SCRIPT;
|
10109
|
-
} else if (
|
10208
|
+
} else if (size === "scriptscript") {
|
10110
10209
|
style = Style$1.SCRIPTSCRIPT;
|
10111
10210
|
}
|
10112
10211
|
|
10212
|
+
return style;
|
10213
|
+
};
|
10214
|
+
|
10215
|
+
const htmlBuilder$6 = (group, options) => {
|
10216
|
+
// Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).
|
10217
|
+
const style = adjustStyle(group.size, options.style);
|
10113
10218
|
const nstyle = style.fracNum();
|
10114
10219
|
const dstyle = style.fracDen();
|
10115
10220
|
let newOptions;
|
@@ -10152,7 +10257,7 @@ const htmlBuilder$6 = (group, options) => {
|
|
10152
10257
|
let clearance;
|
10153
10258
|
let denomShift;
|
10154
10259
|
|
10155
|
-
if (style.size === Style$1.DISPLAY.size) {
|
10260
|
+
if (style.size === Style$1.DISPLAY.size || group.size === "display") {
|
10156
10261
|
numShift = options.fontMetrics().num1;
|
10157
10262
|
|
10158
10263
|
if (ruleWidth > 0) {
|
@@ -10263,7 +10368,7 @@ const htmlBuilder$6 = (group, options) => {
|
|
10263
10368
|
};
|
10264
10369
|
|
10265
10370
|
const mathmlBuilder$6 = (group, options) => {
|
10266
|
-
|
10371
|
+
let node = new mathMLTree.MathNode("mfrac", [buildGroup$1(group.numer, options), buildGroup$1(group.denom, options)]);
|
10267
10372
|
|
10268
10373
|
if (!group.hasBarLine) {
|
10269
10374
|
node.setAttribute("linethickness", "0px");
|
@@ -10272,11 +10377,20 @@ const mathmlBuilder$6 = (group, options) => {
|
|
10272
10377
|
node.setAttribute("linethickness", ruleWidth + "em");
|
10273
10378
|
}
|
10274
10379
|
|
10380
|
+
const style = adjustStyle(group.size, options.style);
|
10381
|
+
|
10382
|
+
if (style.size !== options.style.size) {
|
10383
|
+
node = new mathMLTree.MathNode("mstyle", [node]);
|
10384
|
+
const isDisplay = style.size === Style$1.DISPLAY.size ? "true" : "false";
|
10385
|
+
node.setAttribute("displaystyle", isDisplay);
|
10386
|
+
node.setAttribute("scriptlevel", "0");
|
10387
|
+
}
|
10388
|
+
|
10275
10389
|
if (group.leftDelim != null || group.rightDelim != null) {
|
10276
10390
|
const withDelims = [];
|
10277
10391
|
|
10278
10392
|
if (group.leftDelim != null) {
|
10279
|
-
const leftOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.leftDelim)]);
|
10393
|
+
const leftOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.leftDelim.replace("\\", ""))]);
|
10280
10394
|
leftOp.setAttribute("fence", "true");
|
10281
10395
|
withDelims.push(leftOp);
|
10282
10396
|
}
|
@@ -10284,7 +10398,7 @@ const mathmlBuilder$6 = (group, options) => {
|
|
10284
10398
|
withDelims.push(node);
|
10285
10399
|
|
10286
10400
|
if (group.rightDelim != null) {
|
10287
|
-
const rightOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.rightDelim)]);
|
10401
|
+
const rightOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.rightDelim.replace("\\", ""))]);
|
10288
10402
|
rightOp.setAttribute("fence", "true");
|
10289
10403
|
withDelims.push(rightOp);
|
10290
10404
|
}
|
@@ -10303,10 +10417,9 @@ defineFunction({
|
|
10303
10417
|
numArgs: 2,
|
10304
10418
|
greediness: 2
|
10305
10419
|
},
|
10306
|
-
handler: ({
|
10307
|
-
parser,
|
10308
|
-
|
10309
|
-
}, args) => {
|
10420
|
+
handler: (_ref, args) => {
|
10421
|
+
let parser = _ref.parser,
|
10422
|
+
funcName = _ref.funcName;
|
10310
10423
|
const numer = args[0];
|
10311
10424
|
const denom = args[1];
|
10312
10425
|
let hasBarLine;
|
@@ -10389,11 +10502,10 @@ defineFunction({
|
|
10389
10502
|
infix: true
|
10390
10503
|
},
|
10391
10504
|
|
10392
|
-
handler({
|
10393
|
-
parser,
|
10394
|
-
|
10395
|
-
|
10396
|
-
}) {
|
10505
|
+
handler(_ref2) {
|
10506
|
+
let parser = _ref2.parser,
|
10507
|
+
funcName = _ref2.funcName,
|
10508
|
+
token = _ref2.token;
|
10397
10509
|
let replaceWith;
|
10398
10510
|
|
10399
10511
|
switch (funcName) {
|
@@ -10452,30 +10564,25 @@ defineFunction({
|
|
10452
10564
|
argTypes: ["math", "math", "size", "text", "math", "math"]
|
10453
10565
|
},
|
10454
10566
|
|
10455
|
-
handler({
|
10456
|
-
parser
|
10457
|
-
}, args) {
|
10567
|
+
handler(_ref3, args) {
|
10568
|
+
let parser = _ref3.parser;
|
10458
10569
|
const numer = args[4];
|
10459
10570
|
const denom = args[5]; // Look into the parse nodes to get the desired delimiters.
|
10460
10571
|
|
10461
|
-
let leftNode = checkNodeType(args[0], "
|
10572
|
+
let leftNode = checkNodeType(args[0], "atom");
|
10462
10573
|
|
10463
10574
|
if (leftNode) {
|
10464
|
-
leftNode = assertAtomFamily(leftNode.body[0], "open");
|
10465
|
-
} else {
|
10466
10575
|
leftNode = assertAtomFamily(args[0], "open");
|
10467
10576
|
}
|
10468
10577
|
|
10469
|
-
const leftDelim = delimFromValue(leftNode.text);
|
10470
|
-
let rightNode = checkNodeType(args[1], "
|
10578
|
+
const leftDelim = leftNode ? delimFromValue(leftNode.text) : null;
|
10579
|
+
let rightNode = checkNodeType(args[1], "atom");
|
10471
10580
|
|
10472
10581
|
if (rightNode) {
|
10473
|
-
rightNode = assertAtomFamily(rightNode.body[0], "close");
|
10474
|
-
} else {
|
10475
10582
|
rightNode = assertAtomFamily(args[1], "close");
|
10476
10583
|
}
|
10477
10584
|
|
10478
|
-
const rightDelim = delimFromValue(rightNode.text);
|
10585
|
+
const rightDelim = rightNode ? delimFromValue(rightNode.text) : null;
|
10479
10586
|
const barNode = assertNodeType(args[2], "size");
|
10480
10587
|
let hasBarLine;
|
10481
10588
|
let barSize = null;
|
@@ -10531,11 +10638,10 @@ defineFunction({
|
|
10531
10638
|
infix: true
|
10532
10639
|
},
|
10533
10640
|
|
10534
|
-
handler({
|
10535
|
-
parser,
|
10536
|
-
|
10537
|
-
|
10538
|
-
}, args) {
|
10641
|
+
handler(_ref4, args) {
|
10642
|
+
let parser = _ref4.parser,
|
10643
|
+
funcName = _ref4.funcName,
|
10644
|
+
token = _ref4.token;
|
10539
10645
|
return {
|
10540
10646
|
type: "infix",
|
10541
10647
|
mode: parser.mode,
|
@@ -10553,10 +10659,9 @@ defineFunction({
|
|
10553
10659
|
numArgs: 3,
|
10554
10660
|
argTypes: ["math", "size", "math"]
|
10555
10661
|
},
|
10556
|
-
handler: ({
|
10557
|
-
parser,
|
10558
|
-
|
10559
|
-
}, args) => {
|
10662
|
+
handler: (_ref5, args) => {
|
10663
|
+
let parser = _ref5.parser,
|
10664
|
+
funcName = _ref5.funcName;
|
10560
10665
|
const numer = args[0];
|
10561
10666
|
const barSize = assert(assertNodeType(args[1], "infix").size);
|
10562
10667
|
const denom = args[2];
|
@@ -10697,10 +10802,9 @@ defineFunction({
|
|
10697
10802
|
numArgs: 1
|
10698
10803
|
},
|
10699
10804
|
|
10700
|
-
handler({
|
10701
|
-
parser,
|
10702
|
-
|
10703
|
-
}, args) {
|
10805
|
+
handler(_ref, args) {
|
10806
|
+
let parser = _ref.parser,
|
10807
|
+
funcName = _ref.funcName;
|
10704
10808
|
return {
|
10705
10809
|
type: "horizBrace",
|
10706
10810
|
mode: parser.mode,
|
@@ -10722,9 +10826,8 @@ defineFunction({
|
|
10722
10826
|
argTypes: ["url", "original"],
|
10723
10827
|
allowedInText: true
|
10724
10828
|
},
|
10725
|
-
handler: ({
|
10726
|
-
parser
|
10727
|
-
}, args) => {
|
10829
|
+
handler: (_ref, args) => {
|
10830
|
+
let parser = _ref.parser;
|
10728
10831
|
const body = args[1];
|
10729
10832
|
const href = assertNodeType(args[0], "url").url;
|
10730
10833
|
return {
|
@@ -10757,9 +10860,8 @@ defineFunction({
|
|
10757
10860
|
argTypes: ["url"],
|
10758
10861
|
allowedInText: true
|
10759
10862
|
},
|
10760
|
-
handler: ({
|
10761
|
-
parser
|
10762
|
-
}, args) => {
|
10863
|
+
handler: (_ref2, args) => {
|
10864
|
+
let parser = _ref2.parser;
|
10763
10865
|
const href = assertNodeType(args[0], "url").url;
|
10764
10866
|
const chars = [];
|
10765
10867
|
|
@@ -10799,9 +10901,8 @@ defineFunction({
|
|
10799
10901
|
numArgs: 2,
|
10800
10902
|
allowedInText: true
|
10801
10903
|
},
|
10802
|
-
handler: ({
|
10803
|
-
parser
|
10804
|
-
}, args) => {
|
10904
|
+
handler: (_ref, args) => {
|
10905
|
+
let parser = _ref.parser;
|
10805
10906
|
return {
|
10806
10907
|
type: "htmlmathml",
|
10807
10908
|
mode: parser.mode,
|
@@ -10829,10 +10930,9 @@ defineFunction({
|
|
10829
10930
|
allowedInText: true
|
10830
10931
|
},
|
10831
10932
|
|
10832
|
-
handler({
|
10833
|
-
parser,
|
10834
|
-
|
10835
|
-
}, args) {
|
10933
|
+
handler(_ref, args) {
|
10934
|
+
let parser = _ref.parser,
|
10935
|
+
funcName = _ref.funcName;
|
10836
10936
|
const size = assertNodeType(args[0], "size");
|
10837
10937
|
|
10838
10938
|
if (parser.settings.strict) {
|
@@ -10882,10 +10982,9 @@ defineFunction({
|
|
10882
10982
|
numArgs: 1,
|
10883
10983
|
allowedInText: true
|
10884
10984
|
},
|
10885
|
-
handler: ({
|
10886
|
-
parser,
|
10887
|
-
|
10888
|
-
}, args) => {
|
10985
|
+
handler: (_ref, args) => {
|
10986
|
+
let parser = _ref.parser,
|
10987
|
+
funcName = _ref.funcName;
|
10889
10988
|
const body = args[0];
|
10890
10989
|
return {
|
10891
10990
|
type: "lap",
|
@@ -10952,10 +11051,9 @@ defineFunction({
|
|
10952
11051
|
consumeMode: "math"
|
10953
11052
|
},
|
10954
11053
|
|
10955
|
-
handler({
|
10956
|
-
funcName,
|
10957
|
-
|
10958
|
-
}, args) {
|
11054
|
+
handler(_ref, args) {
|
11055
|
+
let funcName = _ref.funcName,
|
11056
|
+
parser = _ref.parser;
|
10959
11057
|
const outerMode = parser.mode;
|
10960
11058
|
parser.switchMode("math");
|
10961
11059
|
const close = funcName === "\\(" ? "\\)" : "$";
|
@@ -11016,9 +11114,8 @@ defineFunction({
|
|
11016
11114
|
props: {
|
11017
11115
|
numArgs: 4
|
11018
11116
|
},
|
11019
|
-
handler: ({
|
11020
|
-
parser
|
11021
|
-
}, args) => {
|
11117
|
+
handler: (_ref, args) => {
|
11118
|
+
let parser = _ref.parser;
|
11022
11119
|
return {
|
11023
11120
|
type: "mathchoice",
|
11024
11121
|
mode: parser.mode,
|
@@ -11040,7 +11137,10 @@ defineFunction({
|
|
11040
11137
|
});
|
11041
11138
|
|
11042
11139
|
// Limits, symbols
|
11043
|
-
//
|
11140
|
+
// Most operators have a large successor symbol, but these don't.
|
11141
|
+
const noSuccessor = ["\\smallint"]; // NOTE: Unlike most `htmlBuilder`s, this one handles not only "op", but also
|
11142
|
+
// "supsub" since some of them (like \int) can affect super/subscripting.
|
11143
|
+
|
11044
11144
|
const htmlBuilder$8 = (grp, options) => {
|
11045
11145
|
// Operators are handled in the TeXbook pg. 443-444, rule 13(a).
|
11046
11146
|
let supGroup;
|
@@ -11061,9 +11161,7 @@ const htmlBuilder$8 = (grp, options) => {
|
|
11061
11161
|
group = assertNodeType(grp, "op");
|
11062
11162
|
}
|
11063
11163
|
|
11064
|
-
const style = options.style;
|
11065
|
-
|
11066
|
-
const noSuccessor = ["\\smallint"];
|
11164
|
+
const style = options.style;
|
11067
11165
|
let large = false;
|
11068
11166
|
|
11069
11167
|
if (style.size === Style$1.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) {
|
@@ -11273,11 +11371,15 @@ const htmlBuilder$8 = (grp, options) => {
|
|
11273
11371
|
};
|
11274
11372
|
|
11275
11373
|
const mathmlBuilder$8 = (group, options) => {
|
11276
|
-
let node;
|
11374
|
+
let node;
|
11277
11375
|
|
11278
11376
|
if (group.symbol) {
|
11279
11377
|
// This is a symbol. Just add the symbol.
|
11280
11378
|
node = new MathNode("mo", [makeText(group.name, group.mode)]);
|
11379
|
+
|
11380
|
+
if (utils.contains(noSuccessor, group.name)) {
|
11381
|
+
node.setAttribute("largeop", "false");
|
11382
|
+
}
|
11281
11383
|
} else if (group.body) {
|
11282
11384
|
// This is an operator with children. Add them.
|
11283
11385
|
node = new MathNode("mo", buildExpression$1(group.body, options));
|
@@ -11290,7 +11392,12 @@ const mathmlBuilder$8 = (group, options) => {
|
|
11290
11392
|
// ref: https://www.w3.org/TR/REC-MathML/chap3_2.html#sec3.2.4
|
11291
11393
|
|
11292
11394
|
const operator = new MathNode("mo", [makeText("\u2061", "text")]);
|
11293
|
-
|
11395
|
+
|
11396
|
+
if (group.parentIsSupSub) {
|
11397
|
+
node = new MathNode("mo", [node, operator]);
|
11398
|
+
} else {
|
11399
|
+
node = newDocumentFragment([node, operator]);
|
11400
|
+
}
|
11294
11401
|
}
|
11295
11402
|
|
11296
11403
|
return node;
|
@@ -11303,7 +11410,7 @@ const singleCharBigOps = {
|
|
11303
11410
|
"\u22c0": "\\bigwedge",
|
11304
11411
|
"\u22c1": "\\bigvee",
|
11305
11412
|
"\u22c2": "\\bigcap",
|
11306
|
-
"\u22c3": "\\
|
11413
|
+
"\u22c3": "\\bigcup",
|
11307
11414
|
"\u2a00": "\\bigodot",
|
11308
11415
|
"\u2a01": "\\bigoplus",
|
11309
11416
|
"\u2a02": "\\bigotimes",
|
@@ -11316,10 +11423,9 @@ defineFunction({
|
|
11316
11423
|
props: {
|
11317
11424
|
numArgs: 0
|
11318
11425
|
},
|
11319
|
-
handler: ({
|
11320
|
-
parser,
|
11321
|
-
|
11322
|
-
}, args) => {
|
11426
|
+
handler: (_ref, args) => {
|
11427
|
+
let parser = _ref.parser,
|
11428
|
+
funcName = _ref.funcName;
|
11323
11429
|
let fName = funcName;
|
11324
11430
|
|
11325
11431
|
if (fName.length === 1) {
|
@@ -11330,6 +11436,7 @@ defineFunction({
|
|
11330
11436
|
type: "op",
|
11331
11437
|
mode: parser.mode,
|
11332
11438
|
limits: true,
|
11439
|
+
parentIsSupSub: false,
|
11333
11440
|
symbol: true,
|
11334
11441
|
name: fName
|
11335
11442
|
};
|
@@ -11345,14 +11452,14 @@ defineFunction({
|
|
11345
11452
|
props: {
|
11346
11453
|
numArgs: 1
|
11347
11454
|
},
|
11348
|
-
handler: ({
|
11349
|
-
parser
|
11350
|
-
}, args) => {
|
11455
|
+
handler: (_ref2, args) => {
|
11456
|
+
let parser = _ref2.parser;
|
11351
11457
|
const body = args[0];
|
11352
11458
|
return {
|
11353
11459
|
type: "op",
|
11354
11460
|
mode: parser.mode,
|
11355
11461
|
limits: false,
|
11462
|
+
parentIsSupSub: false,
|
11356
11463
|
symbol: false,
|
11357
11464
|
body: ordargument(body)
|
11358
11465
|
};
|
@@ -11379,14 +11486,14 @@ defineFunction({
|
|
11379
11486
|
numArgs: 0
|
11380
11487
|
},
|
11381
11488
|
|
11382
|
-
handler({
|
11383
|
-
parser,
|
11384
|
-
|
11385
|
-
}) {
|
11489
|
+
handler(_ref3) {
|
11490
|
+
let parser = _ref3.parser,
|
11491
|
+
funcName = _ref3.funcName;
|
11386
11492
|
return {
|
11387
11493
|
type: "op",
|
11388
11494
|
mode: parser.mode,
|
11389
11495
|
limits: false,
|
11496
|
+
parentIsSupSub: false,
|
11390
11497
|
symbol: false,
|
11391
11498
|
name: funcName
|
11392
11499
|
};
|
@@ -11403,14 +11510,14 @@ defineFunction({
|
|
11403
11510
|
numArgs: 0
|
11404
11511
|
},
|
11405
11512
|
|
11406
|
-
handler({
|
11407
|
-
parser,
|
11408
|
-
|
11409
|
-
}) {
|
11513
|
+
handler(_ref4) {
|
11514
|
+
let parser = _ref4.parser,
|
11515
|
+
funcName = _ref4.funcName;
|
11410
11516
|
return {
|
11411
11517
|
type: "op",
|
11412
11518
|
mode: parser.mode,
|
11413
11519
|
limits: true,
|
11520
|
+
parentIsSupSub: false,
|
11414
11521
|
symbol: false,
|
11415
11522
|
name: funcName
|
11416
11523
|
};
|
@@ -11427,10 +11534,9 @@ defineFunction({
|
|
11427
11534
|
numArgs: 0
|
11428
11535
|
},
|
11429
11536
|
|
11430
|
-
handler({
|
11431
|
-
parser,
|
11432
|
-
|
11433
|
-
}) {
|
11537
|
+
handler(_ref5) {
|
11538
|
+
let parser = _ref5.parser,
|
11539
|
+
funcName = _ref5.funcName;
|
11434
11540
|
let fName = funcName;
|
11435
11541
|
|
11436
11542
|
if (fName.length === 1) {
|
@@ -11441,6 +11547,7 @@ defineFunction({
|
|
11441
11547
|
type: "op",
|
11442
11548
|
mode: parser.mode,
|
11443
11549
|
limits: false,
|
11550
|
+
parentIsSupSub: false,
|
11444
11551
|
symbol: true,
|
11445
11552
|
name: fName
|
11446
11553
|
};
|
@@ -11458,9 +11565,8 @@ defineFunction({
|
|
11458
11565
|
props: {
|
11459
11566
|
numArgs: 1
|
11460
11567
|
},
|
11461
|
-
handler: ({
|
11462
|
-
parser
|
11463
|
-
}, args) => {
|
11568
|
+
handler: (_ref, args) => {
|
11569
|
+
let parser = _ref.parser;
|
11464
11570
|
const body = args[0];
|
11465
11571
|
return {
|
11466
11572
|
type: "operatorname",
|
@@ -11544,9 +11650,8 @@ defineFunction({
|
|
11544
11650
|
|
11545
11651
|
if (isAllString) {
|
11546
11652
|
// Write a single TextNode instead of multiple nested tags.
|
11547
|
-
const word = expression.map(node => node.toText()).join("");
|
11548
|
-
|
11549
|
-
expression = [new mathMLTree.TextNode(word, false)];
|
11653
|
+
const word = expression.map(node => node.toText()).join("");
|
11654
|
+
expression = [new mathMLTree.TextNode(word)];
|
11550
11655
|
}
|
11551
11656
|
|
11552
11657
|
const identifier = new mathMLTree.MathNode("mi", expression);
|
@@ -11562,6 +11667,10 @@ defineFunctionBuilders({
|
|
11562
11667
|
type: "ordgroup",
|
11563
11668
|
|
11564
11669
|
htmlBuilder(group, options) {
|
11670
|
+
if (group.semisimple) {
|
11671
|
+
return buildCommon.makeFragment(buildExpression(group.body, options, false));
|
11672
|
+
}
|
11673
|
+
|
11565
11674
|
return buildCommon.makeSpan(["mord"], buildExpression(group.body, options, true), options);
|
11566
11675
|
},
|
11567
11676
|
|
@@ -11578,9 +11687,8 @@ defineFunction({
|
|
11578
11687
|
numArgs: 1
|
11579
11688
|
},
|
11580
11689
|
|
11581
|
-
handler({
|
11582
|
-
parser
|
11583
|
-
}, args) {
|
11690
|
+
handler(_ref, args) {
|
11691
|
+
let parser = _ref.parser;
|
11584
11692
|
const body = args[0];
|
11585
11693
|
return {
|
11586
11694
|
type: "overline",
|
@@ -11632,9 +11740,8 @@ defineFunction({
|
|
11632
11740
|
numArgs: 1,
|
11633
11741
|
allowedInText: true
|
11634
11742
|
},
|
11635
|
-
handler: ({
|
11636
|
-
parser
|
11637
|
-
}, args) => {
|
11743
|
+
handler: (_ref, args) => {
|
11744
|
+
let parser = _ref.parser;
|
11638
11745
|
const body = args[0];
|
11639
11746
|
return {
|
11640
11747
|
type: "phantom",
|
@@ -11660,9 +11767,8 @@ defineFunction({
|
|
11660
11767
|
numArgs: 1,
|
11661
11768
|
allowedInText: true
|
11662
11769
|
},
|
11663
|
-
handler: ({
|
11664
|
-
parser
|
11665
|
-
}, args) => {
|
11770
|
+
handler: (_ref2, args) => {
|
11771
|
+
let parser = _ref2.parser;
|
11666
11772
|
const body = args[0];
|
11667
11773
|
return {
|
11668
11774
|
type: "hphantom",
|
@@ -11689,13 +11795,16 @@ defineFunction({
|
|
11689
11795
|
type: "elem",
|
11690
11796
|
elem: node
|
11691
11797
|
}]
|
11692
|
-
}, options);
|
11693
|
-
|
11798
|
+
}, options); // For spacing, TeX treats \smash as a math group (same spacing as ord).
|
11799
|
+
|
11800
|
+
return buildCommon.makeSpan(["mord"], [node], options);
|
11694
11801
|
},
|
11695
11802
|
mathmlBuilder: (group, options) => {
|
11696
11803
|
const inner = buildExpression$1(ordargument(group.body), options);
|
11697
|
-
const
|
11804
|
+
const phantom = new mathMLTree.MathNode("mphantom", inner);
|
11805
|
+
const node = new mathMLTree.MathNode("mpadded", [phantom]);
|
11698
11806
|
node.setAttribute("height", "0px");
|
11807
|
+
node.setAttribute("depth", "0px");
|
11699
11808
|
return node;
|
11700
11809
|
}
|
11701
11810
|
});
|
@@ -11706,9 +11815,8 @@ defineFunction({
|
|
11706
11815
|
numArgs: 1,
|
11707
11816
|
allowedInText: true
|
11708
11817
|
},
|
11709
|
-
handler: ({
|
11710
|
-
parser
|
11711
|
-
}, args) => {
|
11818
|
+
handler: (_ref3, args) => {
|
11819
|
+
let parser = _ref3.parser;
|
11712
11820
|
const body = args[0];
|
11713
11821
|
return {
|
11714
11822
|
type: "vphantom",
|
@@ -11723,7 +11831,8 @@ defineFunction({
|
|
11723
11831
|
},
|
11724
11832
|
mathmlBuilder: (group, options) => {
|
11725
11833
|
const inner = buildExpression$1(ordargument(group.body), options);
|
11726
|
-
const
|
11834
|
+
const phantom = new mathMLTree.MathNode("mphantom", inner);
|
11835
|
+
const node = new mathMLTree.MathNode("mpadded", [phantom]);
|
11727
11836
|
node.setAttribute("width", "0px");
|
11728
11837
|
return node;
|
11729
11838
|
}
|
@@ -11767,12 +11876,10 @@ defineFunction({
|
|
11767
11876
|
numArgs: 0,
|
11768
11877
|
allowedInText: true
|
11769
11878
|
},
|
11770
|
-
handler: ({
|
11771
|
-
breakOnTokenText,
|
11772
|
-
|
11773
|
-
|
11774
|
-
}, args) => {
|
11775
|
-
parser.consumeSpaces();
|
11879
|
+
handler: (_ref, args) => {
|
11880
|
+
let breakOnTokenText = _ref.breakOnTokenText,
|
11881
|
+
funcName = _ref.funcName,
|
11882
|
+
parser = _ref.parser;
|
11776
11883
|
const body = parser.parseExpression(false, breakOnTokenText);
|
11777
11884
|
return {
|
11778
11885
|
type: "sizing",
|
@@ -11806,9 +11913,8 @@ defineFunction({
|
|
11806
11913
|
allowedInText: true
|
11807
11914
|
},
|
11808
11915
|
|
11809
|
-
handler({
|
11810
|
-
parser
|
11811
|
-
}, args) {
|
11916
|
+
handler(_ref, args) {
|
11917
|
+
let parser = _ref.parser;
|
11812
11918
|
const amount = assertNodeType(args[0], "size").value;
|
11813
11919
|
const body = args[1];
|
11814
11920
|
return {
|
@@ -11864,9 +11970,8 @@ defineFunction({
|
|
11864
11970
|
argTypes: ["size", "size", "size"]
|
11865
11971
|
},
|
11866
11972
|
|
11867
|
-
handler({
|
11868
|
-
parser
|
11869
|
-
}, args, optArgs) {
|
11973
|
+
handler(_ref, args, optArgs) {
|
11974
|
+
let parser = _ref.parser;
|
11870
11975
|
const shift = optArgs[0];
|
11871
11976
|
const width = assertNodeType(args[0], "size");
|
11872
11977
|
const height = assertNodeType(args[1], "size");
|
@@ -11883,14 +11988,9 @@ defineFunction({
|
|
11883
11988
|
// Make an empty span for the rule
|
11884
11989
|
const rule = buildCommon.makeSpan(["mord", "rule"], [], options); // Calculate the shift, width, and height of the rule, and account for units
|
11885
11990
|
|
11886
|
-
let shift = 0;
|
11887
|
-
|
11888
|
-
if (group.shift) {
|
11889
|
-
shift = calculateSize(group.shift, options);
|
11890
|
-
}
|
11891
|
-
|
11892
11991
|
const width = calculateSize(group.width, options);
|
11893
|
-
const height = calculateSize(group.height, options);
|
11992
|
+
const height = calculateSize(group.height, options);
|
11993
|
+
const shift = group.shift ? calculateSize(group.shift, options) : 0; // Style the rule to the right size
|
11894
11994
|
|
11895
11995
|
rule.style.borderRightWidth = width + "em";
|
11896
11996
|
rule.style.borderTopWidth = height + "em";
|
@@ -11907,10 +12007,25 @@ defineFunction({
|
|
11907
12007
|
},
|
11908
12008
|
|
11909
12009
|
mathmlBuilder(group, options) {
|
11910
|
-
|
11911
|
-
|
11912
|
-
const
|
11913
|
-
|
12010
|
+
const width = calculateSize(group.width, options);
|
12011
|
+
const height = calculateSize(group.height, options);
|
12012
|
+
const shift = group.shift ? calculateSize(group.shift, options) : 0;
|
12013
|
+
const color = options.color && options.getColor() || "black";
|
12014
|
+
const rule = new mathMLTree.MathNode("mspace");
|
12015
|
+
rule.setAttribute("mathbackground", color);
|
12016
|
+
rule.setAttribute("width", width + "em");
|
12017
|
+
rule.setAttribute("height", height + "em");
|
12018
|
+
const wrapper = new mathMLTree.MathNode("mpadded", [rule]);
|
12019
|
+
|
12020
|
+
if (shift >= 0) {
|
12021
|
+
wrapper.setAttribute("height", "+" + shift + "em");
|
12022
|
+
} else {
|
12023
|
+
wrapper.setAttribute("height", shift + "em");
|
12024
|
+
wrapper.setAttribute("depth", "+" + -shift + "em");
|
12025
|
+
}
|
12026
|
+
|
12027
|
+
wrapper.setAttribute("voffset", shift + "em");
|
12028
|
+
return wrapper;
|
11914
12029
|
}
|
11915
12030
|
|
11916
12031
|
});
|
@@ -11924,9 +12039,8 @@ defineFunction({
|
|
11924
12039
|
numOptionalArgs: 1,
|
11925
12040
|
allowedInText: true
|
11926
12041
|
},
|
11927
|
-
handler: ({
|
11928
|
-
parser
|
11929
|
-
}, args, optArgs) => {
|
12042
|
+
handler: (_ref, args, optArgs) => {
|
12043
|
+
let parser = _ref.parser;
|
11930
12044
|
let smashHeight = false;
|
11931
12045
|
let smashDepth = false;
|
11932
12046
|
const tbArg = optArgs[0] && assertNodeType(optArgs[0], "ordgroup");
|
@@ -11967,7 +12081,7 @@ defineFunction({
|
|
11967
12081
|
};
|
11968
12082
|
},
|
11969
12083
|
htmlBuilder: (group, options) => {
|
11970
|
-
const node = buildCommon.makeSpan([
|
12084
|
+
const node = buildCommon.makeSpan([], [buildGroup(group.body, options)]);
|
11971
12085
|
|
11972
12086
|
if (!group.smashHeight && !group.smashDepth) {
|
11973
12087
|
return node;
|
@@ -11997,13 +12111,15 @@ defineFunction({
|
|
11997
12111
|
// from acting on that line height. So we'll call makeVList now.
|
11998
12112
|
|
11999
12113
|
|
12000
|
-
|
12114
|
+
const smashedNode = buildCommon.makeVList({
|
12001
12115
|
positionType: "firstBaseline",
|
12002
12116
|
children: [{
|
12003
12117
|
type: "elem",
|
12004
12118
|
elem: node
|
12005
12119
|
}]
|
12006
|
-
}, options);
|
12120
|
+
}, options); // For spacing, TeX treats \hphantom as a math group (same spacing as ord).
|
12121
|
+
|
12122
|
+
return buildCommon.makeSpan(["mord"], [smashedNode], options);
|
12007
12123
|
},
|
12008
12124
|
mathmlBuilder: (group, options) => {
|
12009
12125
|
const node = new mathMLTree.MathNode("mpadded", [buildGroup$1(group.body, options)]);
|
@@ -12028,9 +12144,8 @@ defineFunction({
|
|
12028
12144
|
numOptionalArgs: 1
|
12029
12145
|
},
|
12030
12146
|
|
12031
|
-
handler({
|
12032
|
-
parser
|
12033
|
-
}, args, optArgs) {
|
12147
|
+
handler(_ref, args, optArgs) {
|
12148
|
+
let parser = _ref.parser;
|
12034
12149
|
const index = optArgs[0];
|
12035
12150
|
const body = args[0];
|
12036
12151
|
return {
|
@@ -12149,13 +12264,11 @@ defineFunction({
|
|
12149
12264
|
allowedInText: true
|
12150
12265
|
},
|
12151
12266
|
|
12152
|
-
handler({
|
12153
|
-
breakOnTokenText,
|
12154
|
-
|
12155
|
-
|
12156
|
-
}, args) {
|
12267
|
+
handler(_ref, args) {
|
12268
|
+
let breakOnTokenText = _ref.breakOnTokenText,
|
12269
|
+
funcName = _ref.funcName,
|
12270
|
+
parser = _ref.parser;
|
12157
12271
|
// parse out the implicit body
|
12158
|
-
parser.consumeSpaces();
|
12159
12272
|
const body = parser.parseExpression(true, breakOnTokenText); // TODO: Refactor to avoid duplicating styleMap in multiple places (e.g.
|
12160
12273
|
// here and in buildHTML and de-dupe the enumeration of all the styles).
|
12161
12274
|
// $FlowFixMe: The names above exactly match the styles.
|
@@ -12394,6 +12507,10 @@ defineFunctionBuilders({
|
|
12394
12507
|
}
|
12395
12508
|
}
|
12396
12509
|
|
12510
|
+
if (group.base && group.base.type === "op") {
|
12511
|
+
group.base.parentIsSupSub = true;
|
12512
|
+
}
|
12513
|
+
|
12397
12514
|
const children = [buildGroup$1(group.base, options)];
|
12398
12515
|
|
12399
12516
|
if (group.sub) {
|
@@ -12411,7 +12528,7 @@ defineFunctionBuilders({
|
|
12411
12528
|
} else if (!group.sub) {
|
12412
12529
|
const base = group.base;
|
12413
12530
|
|
12414
|
-
if (base && base.type === "op" && base.limits && options.style === Style$1.DISPLAY) {
|
12531
|
+
if (base && base.type === "op" && base.limits && (options.style === Style$1.DISPLAY || base.alwaysHandleSupSub)) {
|
12415
12532
|
nodeType = "mover";
|
12416
12533
|
} else {
|
12417
12534
|
nodeType = "msup";
|
@@ -12419,7 +12536,7 @@ defineFunctionBuilders({
|
|
12419
12536
|
} else if (!group.sup) {
|
12420
12537
|
const base = group.base;
|
12421
12538
|
|
12422
|
-
if (base && base.type === "op" && base.limits && options.style === Style$1.DISPLAY) {
|
12539
|
+
if (base && base.type === "op" && base.limits && (options.style === Style$1.DISPLAY || base.alwaysHandleSupSub)) {
|
12423
12540
|
nodeType = "munder";
|
12424
12541
|
} else {
|
12425
12542
|
nodeType = "msub";
|
@@ -12458,6 +12575,10 @@ defineFunctionBuilders({
|
|
12458
12575
|
}
|
12459
12576
|
} else if (group.family === "punct") {
|
12460
12577
|
node.setAttribute("separator", "true");
|
12578
|
+
} else if (group.family === "open" || group.family === "close") {
|
12579
|
+
// Delims built here should not stretch vertically.
|
12580
|
+
// See delimsizing.js for stretchy delims.
|
12581
|
+
node.setAttribute("stretchy", "false");
|
12461
12582
|
}
|
12462
12583
|
|
12463
12584
|
return node;
|
@@ -12586,13 +12707,25 @@ defineFunctionBuilders({
|
|
12586
12707
|
|
12587
12708
|
});
|
12588
12709
|
|
12710
|
+
const pad = () => {
|
12711
|
+
const padNode = new mathMLTree.MathNode("mtd", []);
|
12712
|
+
padNode.setAttribute("width", "50%");
|
12713
|
+
return padNode;
|
12714
|
+
};
|
12715
|
+
|
12589
12716
|
defineFunctionBuilders({
|
12590
12717
|
type: "tag",
|
12591
12718
|
|
12592
12719
|
mathmlBuilder(group, options) {
|
12593
|
-
const table = new mathMLTree.MathNode("mtable", [new mathMLTree.MathNode("
|
12594
|
-
table.setAttribute("
|
12595
|
-
return table;
|
12720
|
+
const table = new mathMLTree.MathNode("mtable", [new mathMLTree.MathNode("mtr", [pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.body, options)]), pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.tag, options)])])]);
|
12721
|
+
table.setAttribute("width", "100%");
|
12722
|
+
return table; // TODO: Left-aligned tags.
|
12723
|
+
// Currently, the group and options passed here do not contain
|
12724
|
+
// enough info to set tag alignment. `leqno` is in Settings but it is
|
12725
|
+
// not passed to Options. On the HTML side, leqno is
|
12726
|
+
// set by a CSS class applied in buildTree.js. That would have worked
|
12727
|
+
// in MathML if browsers supported <mlabeledtr>. Since they don't, we
|
12728
|
+
// need to rewrite the way this function is called.
|
12596
12729
|
}
|
12597
12730
|
|
12598
12731
|
});
|
@@ -12605,10 +12738,12 @@ const textFontFamilies = {
|
|
12605
12738
|
"\\textnormal": "textrm"
|
12606
12739
|
};
|
12607
12740
|
const textFontWeights = {
|
12608
|
-
"\\textbf": "textbf"
|
12741
|
+
"\\textbf": "textbf",
|
12742
|
+
"\\textmd": "textmd"
|
12609
12743
|
};
|
12610
12744
|
const textFontShapes = {
|
12611
|
-
"\\textit": "textit"
|
12745
|
+
"\\textit": "textit",
|
12746
|
+
"\\textup": "textup"
|
12612
12747
|
};
|
12613
12748
|
|
12614
12749
|
const optionsWithFont = (group, options) => {
|
@@ -12629,8 +12764,8 @@ defineFunction({
|
|
12629
12764
|
type: "text",
|
12630
12765
|
names: [// Font families
|
12631
12766
|
"\\text", "\\textrm", "\\textsf", "\\texttt", "\\textnormal", // Font weights
|
12632
|
-
"\\textbf", // Font Shapes
|
12633
|
-
"\\textit"],
|
12767
|
+
"\\textbf", "\\textmd", // Font Shapes
|
12768
|
+
"\\textit", "\\textup"],
|
12634
12769
|
props: {
|
12635
12770
|
numArgs: 1,
|
12636
12771
|
argTypes: ["text"],
|
@@ -12639,10 +12774,9 @@ defineFunction({
|
|
12639
12774
|
consumeMode: "text"
|
12640
12775
|
},
|
12641
12776
|
|
12642
|
-
handler({
|
12643
|
-
parser,
|
12644
|
-
|
12645
|
-
}, args) {
|
12777
|
+
handler(_ref, args) {
|
12778
|
+
let parser = _ref.parser,
|
12779
|
+
funcName = _ref.funcName;
|
12646
12780
|
const body = args[0];
|
12647
12781
|
return {
|
12648
12782
|
type: "text",
|
@@ -12673,9 +12807,8 @@ defineFunction({
|
|
12673
12807
|
allowedInText: true
|
12674
12808
|
},
|
12675
12809
|
|
12676
|
-
handler({
|
12677
|
-
parser
|
12678
|
-
}, args) {
|
12810
|
+
handler(_ref, args) {
|
12811
|
+
let parser = _ref.parser;
|
12679
12812
|
return {
|
12680
12813
|
type: "underline",
|
12681
12814
|
mode: parser.mode,
|
@@ -12819,15 +12952,28 @@ const tokenRegexString = `(${spaceRegexString}+)|` + // whitespace
|
|
12819
12952
|
"|\\\\verb([^*a-zA-Z]).*?\\4" + // \verb unstarred
|
12820
12953
|
`|${controlWordWhitespaceRegexString}` + // \macroName + spaces
|
12821
12954
|
`|${controlSymbolRegexString})`; // \\, \', etc.
|
12955
|
+
|
12822
12956
|
/** Main Lexer class */
|
12823
12957
|
|
12824
12958
|
class Lexer {
|
12825
|
-
|
12959
|
+
// category codes, only supports comment characters (14) for now
|
12960
|
+
constructor(input, settings) {
|
12826
12961
|
this.input = void 0;
|
12962
|
+
this.settings = void 0;
|
12827
12963
|
this.tokenRegex = void 0;
|
12964
|
+
this.catcodes = void 0;
|
12828
12965
|
// Separate accents from characters
|
12829
12966
|
this.input = input;
|
12967
|
+
this.settings = settings;
|
12830
12968
|
this.tokenRegex = new RegExp(tokenRegexString, 'g');
|
12969
|
+
this.catcodes = {
|
12970
|
+
"%": 14 // comment character
|
12971
|
+
|
12972
|
+
};
|
12973
|
+
}
|
12974
|
+
|
12975
|
+
setCatcode(char, code) {
|
12976
|
+
this.catcodes[char] = code;
|
12831
12977
|
}
|
12832
12978
|
/**
|
12833
12979
|
* This function lexes a single token.
|
@@ -12848,7 +12994,23 @@ class Lexer {
|
|
12848
12994
|
throw new ParseError(`Unexpected character: '${input[pos]}'`, new Token(input[pos], new SourceLocation(this, pos, pos + 1)));
|
12849
12995
|
}
|
12850
12996
|
|
12851
|
-
let text = match[2] || " ";
|
12997
|
+
let text = match[2] || " ";
|
12998
|
+
|
12999
|
+
if (this.catcodes[text] === 14) {
|
13000
|
+
// comment character
|
13001
|
+
const nlIndex = input.indexOf('\n', this.tokenRegex.lastIndex);
|
13002
|
+
|
13003
|
+
if (nlIndex === -1) {
|
13004
|
+
this.tokenRegex.lastIndex = input.length; // EOF
|
13005
|
+
|
13006
|
+
this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would " + "fail because of commenting the end of math mode (e.g. $)");
|
13007
|
+
} else {
|
13008
|
+
this.tokenRegex.lastIndex = nlIndex + 1;
|
13009
|
+
}
|
13010
|
+
|
13011
|
+
return this.lex();
|
13012
|
+
} // Trim any trailing whitespace from control word match
|
13013
|
+
|
12852
13014
|
|
12853
13015
|
const controlMatch = text.match(controlWordWhitespaceRegex);
|
12854
13016
|
|
@@ -12875,7 +13037,15 @@ class Namespace {
|
|
12875
13037
|
* of initial (global-level) mappings, which will constantly change
|
12876
13038
|
* according to any global/top-level `set`s done.
|
12877
13039
|
*/
|
12878
|
-
constructor(builtins
|
13040
|
+
constructor(builtins, globalMacros) {
|
13041
|
+
if (builtins === void 0) {
|
13042
|
+
builtins = {};
|
13043
|
+
}
|
13044
|
+
|
13045
|
+
if (globalMacros === void 0) {
|
13046
|
+
globalMacros = {};
|
13047
|
+
}
|
13048
|
+
|
12879
13049
|
this.current = void 0;
|
12880
13050
|
this.builtins = void 0;
|
12881
13051
|
this.undefStack = void 0;
|
@@ -12947,7 +13117,11 @@ class Namespace {
|
|
12947
13117
|
*/
|
12948
13118
|
|
12949
13119
|
|
12950
|
-
set(name, value, global
|
13120
|
+
set(name, value, global) {
|
13121
|
+
if (global === void 0) {
|
13122
|
+
global = false;
|
13123
|
+
}
|
13124
|
+
|
12951
13125
|
if (global) {
|
12952
13126
|
// Global set is equivalent to setting in all groups. Simulate this
|
12953
13127
|
// by destroying any undos currently scheduled for this name,
|
@@ -13245,9 +13419,7 @@ defineMacro("\\providecommand", context => newcommand(context, true, true)); ///
|
|
13245
13419
|
// \let\bgroup={ \let\egroup=}
|
13246
13420
|
|
13247
13421
|
defineMacro("\\bgroup", "{");
|
13248
|
-
defineMacro("\\egroup", "}");
|
13249
|
-
defineMacro("\\begingroup", "{");
|
13250
|
-
defineMacro("\\endgroup", "}"); // Symbols from latex.ltx:
|
13422
|
+
defineMacro("\\egroup", "}"); // Symbols from latex.ltx:
|
13251
13423
|
// \def\lq{`}
|
13252
13424
|
// \def\rq{'}
|
13253
13425
|
// \def \aa {\r a}
|
@@ -13265,17 +13437,7 @@ defineMacro("\\AA", "\\r A"); // Copyright (C) and registered (R) symbols. Use r
|
|
13265
13437
|
|
13266
13438
|
defineMacro("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}");
|
13267
13439
|
defineMacro("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");
|
13268
|
-
defineMacro("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"); // Unicode
|
13269
|
-
|
13270
|
-
defineMacro("\u2102", "\\mathbb{C}");
|
13271
|
-
defineMacro("\u210D", "\\mathbb{H}");
|
13272
|
-
defineMacro("\u2115", "\\mathbb{N}");
|
13273
|
-
defineMacro("\u2119", "\\mathbb{P}");
|
13274
|
-
defineMacro("\u211A", "\\mathbb{Q}");
|
13275
|
-
defineMacro("\u211D", "\\mathbb{R}");
|
13276
|
-
defineMacro("\u2124", "\\mathbb{Z}");
|
13277
|
-
defineMacro("\u210E", "\\mathit{h}"); // Planck constant
|
13278
|
-
// Characters omitted from Unicode range 1D400–1D7FF
|
13440
|
+
defineMacro("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"); // Characters omitted from Unicode range 1D400–1D7FF
|
13279
13441
|
|
13280
13442
|
defineMacro("\u212C", "\\mathscr{B}"); // script
|
13281
13443
|
|
@@ -13289,7 +13451,9 @@ defineMacro("\u211B", "\\mathscr{R}");
|
|
13289
13451
|
defineMacro("\u212D", "\\mathfrak{C}"); // Fraktur
|
13290
13452
|
|
13291
13453
|
defineMacro("\u210C", "\\mathfrak{H}");
|
13292
|
-
defineMacro("\u2128", "\\mathfrak{Z}"); //
|
13454
|
+
defineMacro("\u2128", "\\mathfrak{Z}"); // Define \Bbbk with a macro that works in both HTML and MathML.
|
13455
|
+
|
13456
|
+
defineMacro("\\Bbbk", "\\Bbb{k}"); // Unicode middle dot
|
13293
13457
|
// The KaTeX fonts do not contain U+00B7. Instead, \cdotp displays
|
13294
13458
|
// the dot at U+22C5 and gives it punct spacing.
|
13295
13459
|
|
@@ -13301,8 +13465,9 @@ defineMacro("\\clap", "\\mathclap{\\textrm{#1}}"); // \not is defined by base/fo
|
|
13301
13465
|
// \DeclareMathSymbol{\not}{\mathrel}{symbols}{"36}
|
13302
13466
|
// It's thus treated like a \mathrel, but defined by a symbol that has zero
|
13303
13467
|
// width but extends to the right. We use \rlap to get that spacing.
|
13468
|
+
// For MathML we write U+0338 here. buildMathML.js will then do the overlay.
|
13304
13469
|
|
13305
|
-
defineMacro("\\not", '\\mathrel{\\mathrlap\\@not}'); // Negated symbols from base/fontmath.ltx:
|
13470
|
+
defineMacro("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'); // Negated symbols from base/fontmath.ltx:
|
13306
13471
|
// \def\neq{\not=} \let\ne=\neq
|
13307
13472
|
// \DeclareRobustCommand
|
13308
13473
|
// \notin{\mathrel{\m@th\mathpalette\c@ncel\in}}
|
@@ -13618,31 +13783,37 @@ defineMacro("\\ordinarycolon", ":"); //\def\vcentcolon{\mathrel{\mathop\ordinary
|
|
13618
13783
|
|
13619
13784
|
defineMacro("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"); // \providecommand*\dblcolon{\vcentcolon\mathrel{\mkern-.9mu}\vcentcolon}
|
13620
13785
|
|
13621
|
-
defineMacro("\\dblcolon", "\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}"); // \providecommand*\coloneqq{\vcentcolon\mathrel{\mkern-1.2mu}=}
|
13786
|
+
defineMacro("\\dblcolon", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}" + "{\\mathop{\\char\"2237}}"); // \providecommand*\coloneqq{\vcentcolon\mathrel{\mkern-1.2mu}=}
|
13787
|
+
|
13788
|
+
defineMacro("\\coloneqq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2254}}"); // ≔
|
13789
|
+
// \providecommand*\Coloneqq{\dblcolon\mathrel{\mkern-1.2mu}=}
|
13622
13790
|
|
13623
|
-
defineMacro("\\
|
13791
|
+
defineMacro("\\Coloneqq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2237\\char\"3d}}"); // \providecommand*\coloneq{\vcentcolon\mathrel{\mkern-1.2mu}\mathrel{-}}
|
13624
13792
|
|
13625
|
-
defineMacro("\\
|
13793
|
+
defineMacro("\\coloneq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"3a\\char\"2212}}"); // \providecommand*\Coloneq{\dblcolon\mathrel{\mkern-1.2mu}\mathrel{-}}
|
13626
13794
|
|
13627
|
-
defineMacro("\\
|
13795
|
+
defineMacro("\\Coloneq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"2237\\char\"2212}}"); // \providecommand*\eqqcolon{=\mathrel{\mkern-1.2mu}\vcentcolon}
|
13628
13796
|
|
13629
|
-
defineMacro("\\
|
13797
|
+
defineMacro("\\eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2255}}"); // ≕
|
13798
|
+
// \providecommand*\Eqqcolon{=\mathrel{\mkern-1.2mu}\dblcolon}
|
13630
13799
|
|
13631
|
-
defineMacro("\\
|
13800
|
+
defineMacro("\\Eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"3d\\char\"2237}}"); // \providecommand*\eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\vcentcolon}
|
13632
13801
|
|
13633
|
-
defineMacro("\\
|
13802
|
+
defineMacro("\\eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2239}}"); // \providecommand*\Eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\dblcolon}
|
13634
13803
|
|
13635
|
-
defineMacro("\\
|
13804
|
+
defineMacro("\\Eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"2212\\char\"2237}}"); // \providecommand*\colonapprox{\vcentcolon\mathrel{\mkern-1.2mu}\approx}
|
13636
13805
|
|
13637
|
-
defineMacro("\\
|
13806
|
+
defineMacro("\\colonapprox", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"3a\\char\"2248}}"); // \providecommand*\Colonapprox{\dblcolon\mathrel{\mkern-1.2mu}\approx}
|
13638
13807
|
|
13639
|
-
defineMacro("\\
|
13808
|
+
defineMacro("\\Colonapprox", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"2237\\char\"2248}}"); // \providecommand*\colonsim{\vcentcolon\mathrel{\mkern-1.2mu}\sim}
|
13640
13809
|
|
13641
|
-
defineMacro("\\
|
13810
|
+
defineMacro("\\colonsim", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"3a\\char\"223c}}"); // \providecommand*\Colonsim{\dblcolon\mathrel{\mkern-1.2mu}\sim}
|
13642
13811
|
|
13643
|
-
defineMacro("\\
|
13812
|
+
defineMacro("\\Colonsim", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"2237\\char\"223c}}"); // Some Unicode characters are implemented with macros to mathtools functions.
|
13644
13813
|
|
13645
|
-
defineMacro("
|
13814
|
+
defineMacro("\u2237", "\\dblcolon"); // ::
|
13815
|
+
|
13816
|
+
defineMacro("\u2239", "\\eqcolon"); // -:
|
13646
13817
|
|
13647
13818
|
defineMacro("\u2254", "\\coloneqq"); // :=
|
13648
13819
|
|
@@ -13676,13 +13847,37 @@ defineMacro("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\d
|
|
13676
13847
|
defineMacro("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");
|
13677
13848
|
defineMacro("\\limsup", "\\DOTSB\\mathop{\\operatorname{lim\\,sup}}\\limits");
|
13678
13849
|
defineMacro("\\liminf", "\\DOTSB\\mathop{\\operatorname{lim\\,inf}}\\limits"); //////////////////////////////////////////////////////////////////////
|
13679
|
-
//
|
13680
|
-
|
13681
|
-
|
13682
|
-
|
13683
|
-
defineMacro("
|
13684
|
-
|
13685
|
-
defineMacro("
|
13850
|
+
// MathML alternates for KaTeX glyphs in the Unicode private area
|
13851
|
+
|
13852
|
+
defineMacro("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{\u2269}");
|
13853
|
+
defineMacro("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{\u2268}");
|
13854
|
+
defineMacro("\\ngeqq", "\\html@mathml{\\@ngeqq}{\u2271}");
|
13855
|
+
defineMacro("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{\u2271}");
|
13856
|
+
defineMacro("\\nleqq", "\\html@mathml{\\@nleqq}{\u2270}");
|
13857
|
+
defineMacro("\\nleqslant", "\\html@mathml{\\@nleqslant}{\u2270}");
|
13858
|
+
defineMacro("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}");
|
13859
|
+
defineMacro("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}");
|
13860
|
+
defineMacro("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{\u2288}");
|
13861
|
+
defineMacro("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{\u2289}");
|
13862
|
+
defineMacro("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}");
|
13863
|
+
defineMacro("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}");
|
13864
|
+
defineMacro("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}");
|
13865
|
+
defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"); //////////////////////////////////////////////////////////////////////
|
13866
|
+
// stmaryrd and semantic
|
13867
|
+
// The stmaryrd and semantic packages render the next four items by calling a
|
13868
|
+
// glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros.
|
13869
|
+
|
13870
|
+
defineMacro("\\llbracket", "\\html@mathml{" + "\\mathopen{[\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u27e6}}");
|
13871
|
+
defineMacro("\\rrbracket", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu]}}" + "{\\mathclose{\\char`\u27e7}}");
|
13872
|
+
defineMacro("\u27e6", "\\llbracket"); // blackboard bold [
|
13873
|
+
|
13874
|
+
defineMacro("\u27e7", "\\rrbracket"); // blackboard bold ]
|
13875
|
+
|
13876
|
+
defineMacro("\\lBrace", "\\html@mathml{" + "\\mathopen{\\{\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u2983}}");
|
13877
|
+
defineMacro("\\rBrace", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu\\}}}" + "{\\mathclose{\\char`\u2984}}");
|
13878
|
+
defineMacro("\u2983", "\\lBrace"); // blackboard bold {
|
13879
|
+
|
13880
|
+
defineMacro("\u2984", "\\rBrace"); // blackboard bold }
|
13686
13881
|
// TODO: Create variable sized versions of the last two items. I believe that
|
13687
13882
|
// will require new font glyphs.
|
13688
13883
|
//////////////////////////////////////////////////////////////////////
|
@@ -13744,7 +13939,7 @@ defineMacro("\\Rarr", "\\Rightarrow");
|
|
13744
13939
|
defineMacro("\\real", "\\Re");
|
13745
13940
|
defineMacro("\\reals", "\\mathbb{R}");
|
13746
13941
|
defineMacro("\\Reals", "\\mathbb{R}");
|
13747
|
-
defineMacro("\\Rho", "\\mathrm{
|
13942
|
+
defineMacro("\\Rho", "\\mathrm{P}");
|
13748
13943
|
defineMacro("\\sdot", "\\cdot");
|
13749
13944
|
defineMacro("\\sect", "\\S");
|
13750
13945
|
defineMacro("\\spades", "\\spadesuit");
|
@@ -13755,7 +13950,69 @@ defineMacro("\\Tau", "\\mathrm{T}");
|
|
13755
13950
|
defineMacro("\\thetasym", "\\vartheta"); // TODO: defineMacro("\\varcoppa", "\\\mbox{\\coppa}");
|
13756
13951
|
|
13757
13952
|
defineMacro("\\weierp", "\\wp");
|
13758
|
-
defineMacro("\\Zeta", "\\mathrm{Z}");
|
13953
|
+
defineMacro("\\Zeta", "\\mathrm{Z}"); //////////////////////////////////////////////////////////////////////
|
13954
|
+
// statmath.sty
|
13955
|
+
// https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf
|
13956
|
+
|
13957
|
+
defineMacro("\\argmin", "\\DOTSB\\mathop{\\operatorname{arg\\,min}}\\limits");
|
13958
|
+
defineMacro("\\argmax", "\\DOTSB\\mathop{\\operatorname{arg\\,max}}\\limits"); // Custom Khan Academy colors, should be moved to an optional package
|
13959
|
+
|
13960
|
+
defineMacro("\\blue", "\\textcolor{##6495ed}{#1}");
|
13961
|
+
defineMacro("\\orange", "\\textcolor{##ffa500}{#1}");
|
13962
|
+
defineMacro("\\pink", "\\textcolor{##ff00af}{#1}");
|
13963
|
+
defineMacro("\\red", "\\textcolor{##df0030}{#1}");
|
13964
|
+
defineMacro("\\green", "\\textcolor{##28ae7b}{#1}");
|
13965
|
+
defineMacro("\\gray", "\\textcolor{gray}{##1}");
|
13966
|
+
defineMacro("\\purple", "\\textcolor{##9d38bd}{#1}");
|
13967
|
+
defineMacro("\\blueA", "\\textcolor{##ccfaff}{#1}");
|
13968
|
+
defineMacro("\\blueB", "\\textcolor{##80f6ff}{#1}");
|
13969
|
+
defineMacro("\\blueC", "\\textcolor{##63d9ea}{#1}");
|
13970
|
+
defineMacro("\\blueD", "\\textcolor{##11accd}{#1}");
|
13971
|
+
defineMacro("\\blueE", "\\textcolor{##0c7f99}{#1}");
|
13972
|
+
defineMacro("\\tealA", "\\textcolor{##94fff5}{#1}");
|
13973
|
+
defineMacro("\\tealB", "\\textcolor{##26edd5}{#1}");
|
13974
|
+
defineMacro("\\tealC", "\\textcolor{##01d1c1}{#1}");
|
13975
|
+
defineMacro("\\tealD", "\\textcolor{##01a995}{#1}");
|
13976
|
+
defineMacro("\\tealE", "\\textcolor{##208170}{#1}");
|
13977
|
+
defineMacro("\\greenA", "\\textcolor{##b6ffb0}{#1}");
|
13978
|
+
defineMacro("\\greenB", "\\textcolor{##8af281}{#1}");
|
13979
|
+
defineMacro("\\greenC", "\\textcolor{##74cf70}{#1}");
|
13980
|
+
defineMacro("\\greenD", "\\textcolor{##1fab54}{#1}");
|
13981
|
+
defineMacro("\\greenE", "\\textcolor{##0d923f}{#1}");
|
13982
|
+
defineMacro("\\goldA", "\\textcolor{##ffd0a9}{#1}");
|
13983
|
+
defineMacro("\\goldB", "\\textcolor{##ffbb71}{#1}");
|
13984
|
+
defineMacro("\\goldC", "\\textcolor{##ff9c39}{#1}");
|
13985
|
+
defineMacro("\\goldD", "\\textcolor{##e07d10}{#1}");
|
13986
|
+
defineMacro("\\goldE", "\\textcolor{##a75a05}{#1}");
|
13987
|
+
defineMacro("\\redA", "\\textcolor{##fca9a9}{#1}");
|
13988
|
+
defineMacro("\\redB", "\\textcolor{##ff8482}{#1}");
|
13989
|
+
defineMacro("\\redC", "\\textcolor{##f9685d}{#1}");
|
13990
|
+
defineMacro("\\redD", "\\textcolor{##e84d39}{#1}");
|
13991
|
+
defineMacro("\\redE", "\\textcolor{##bc2612}{#1}");
|
13992
|
+
defineMacro("\\maroonA", "\\textcolor{##ffbde0}{#1}");
|
13993
|
+
defineMacro("\\maroonB", "\\textcolor{##ff92c6}{#1}");
|
13994
|
+
defineMacro("\\maroonC", "\\textcolor{##ed5fa6}{#1}");
|
13995
|
+
defineMacro("\\maroonD", "\\textcolor{##ca337c}{#1}");
|
13996
|
+
defineMacro("\\maroonE", "\\textcolor{##9e034e}{#1}");
|
13997
|
+
defineMacro("\\purpleA", "\\textcolor{##ddd7ff}{#1}");
|
13998
|
+
defineMacro("\\purpleB", "\\textcolor{##c6b9fc}{#1}");
|
13999
|
+
defineMacro("\\purpleC", "\\textcolor{##aa87ff}{#1}");
|
14000
|
+
defineMacro("\\purpleD", "\\textcolor{##7854ab}{#1}");
|
14001
|
+
defineMacro("\\purpleE", "\\textcolor{##543b78}{#1}");
|
14002
|
+
defineMacro("\\mintA", "\\textcolor{##f5f9e8}{#1}");
|
14003
|
+
defineMacro("\\mintB", "\\textcolor{##edf2df}{#1}");
|
14004
|
+
defineMacro("\\mintC", "\\textcolor{##e0e5cc}{#1}");
|
14005
|
+
defineMacro("\\grayA", "\\textcolor{##f6f7f7}{#1}");
|
14006
|
+
defineMacro("\\grayB", "\\textcolor{##f0f1f2}{#1}");
|
14007
|
+
defineMacro("\\grayC", "\\textcolor{##e3e5e6}{#1}");
|
14008
|
+
defineMacro("\\grayD", "\\textcolor{##d6d8da}{#1}");
|
14009
|
+
defineMacro("\\grayE", "\\textcolor{##babec2}{#1}");
|
14010
|
+
defineMacro("\\grayF", "\\textcolor{##888d93}{#1}");
|
14011
|
+
defineMacro("\\grayG", "\\textcolor{##626569}{#1}");
|
14012
|
+
defineMacro("\\grayH", "\\textcolor{##3b3e40}{#1}");
|
14013
|
+
defineMacro("\\grayI", "\\textcolor{##21242c}{#1}");
|
14014
|
+
defineMacro("\\kaBlue", "\\textcolor{##314453}{#1}");
|
14015
|
+
defineMacro("\\kaGreen", "\\textcolor{##71B307}{#1}");
|
13759
14016
|
|
13760
14017
|
/**
|
13761
14018
|
* This file contains the “gullet” where macros are expanded
|
@@ -13798,7 +14055,7 @@ class MacroExpander {
|
|
13798
14055
|
|
13799
14056
|
|
13800
14057
|
feed(input) {
|
13801
|
-
this.lexer = new Lexer(input);
|
14058
|
+
this.lexer = new Lexer(input, this.settings);
|
13802
14059
|
}
|
13803
14060
|
/**
|
13804
14061
|
* Switches between "text" and "math" modes.
|
@@ -14103,7 +14360,7 @@ class MacroExpander {
|
|
14103
14360
|
}
|
14104
14361
|
}
|
14105
14362
|
|
14106
|
-
const bodyLexer = new Lexer(expansion);
|
14363
|
+
const bodyLexer = new Lexer(expansion, this.settings);
|
14107
14364
|
const tokens = [];
|
14108
14365
|
let tok = bodyLexer.lex();
|
14109
14366
|
|
@@ -14879,7 +15136,11 @@ class Parser {
|
|
14879
15136
|
*/
|
14880
15137
|
|
14881
15138
|
|
14882
|
-
expect(text, consume
|
15139
|
+
expect(text, consume) {
|
15140
|
+
if (consume === void 0) {
|
15141
|
+
consume = true;
|
15142
|
+
}
|
15143
|
+
|
14883
15144
|
if (this.nextToken.text !== text) {
|
14884
15145
|
throw new ParseError("Expected '" + text + "', got '" + this.nextToken.text + "'", this.nextToken);
|
14885
15146
|
}
|
@@ -14932,17 +15193,6 @@ class Parser {
|
|
14932
15193
|
return parse;
|
14933
15194
|
}
|
14934
15195
|
|
14935
|
-
/**
|
14936
|
-
* Parses an "expression", which is a list of atoms.
|
14937
|
-
*
|
14938
|
-
* `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
|
14939
|
-
* happens when functions have higher precendence han infix
|
14940
|
-
* nodes in implicit parses.
|
14941
|
-
*
|
14942
|
-
* `breakOnTokenText`: The text of the token that the expression should end
|
14943
|
-
* with, or `null` if something else should end the
|
14944
|
-
* expression.
|
14945
|
-
*/
|
14946
15196
|
parseExpression(breakOnInfix, breakOnTokenText) {
|
14947
15197
|
const body = []; // Keep adding atoms to the body until we can't parse any more atoms (either
|
14948
15198
|
// we reached the end, a }, or a \right)
|
@@ -15182,8 +15432,6 @@ class Parser {
|
|
15182
15432
|
mode: this.mode,
|
15183
15433
|
body: primes
|
15184
15434
|
};
|
15185
|
-
} else if (lex.text === "%") {
|
15186
|
-
this.consumeComment();
|
15187
15435
|
} else {
|
15188
15436
|
// If it wasn't ^, _, or ', stop parsing super/subscripts
|
15189
15437
|
break;
|
@@ -15227,6 +15475,11 @@ class Parser {
|
|
15227
15475
|
throw new ParseError("Can't use function '" + func + "' in text mode", token);
|
15228
15476
|
} else if (this.mode === "math" && funcData.allowedInMath === false) {
|
15229
15477
|
throw new ParseError("Can't use function '" + func + "' in math mode", token);
|
15478
|
+
} // hyperref package sets the catcode of % as an active character
|
15479
|
+
|
15480
|
+
|
15481
|
+
if (funcData.argTypes && funcData.argTypes[0] === "url") {
|
15482
|
+
this.gullet.lexer.setCatcode("%", 13);
|
15230
15483
|
} // Consume the command token after possibly switching to the
|
15231
15484
|
// mode specified by the function (for instant mode switching),
|
15232
15485
|
// and then immediately switch back.
|
@@ -15348,6 +15601,25 @@ class Parser {
|
|
15348
15601
|
case "text":
|
15349
15602
|
return this.parseGroup(name, optional, greediness, undefined, type);
|
15350
15603
|
|
15604
|
+
case "raw":
|
15605
|
+
{
|
15606
|
+
if (optional && this.nextToken.text === "{") {
|
15607
|
+
return null;
|
15608
|
+
}
|
15609
|
+
|
15610
|
+
const token = this.parseStringGroup("raw", optional, true);
|
15611
|
+
|
15612
|
+
if (token) {
|
15613
|
+
return {
|
15614
|
+
type: "raw",
|
15615
|
+
mode: "text",
|
15616
|
+
string: token.text
|
15617
|
+
};
|
15618
|
+
} else {
|
15619
|
+
throw new ParseError("Expected raw group", this.nextToken);
|
15620
|
+
}
|
15621
|
+
}
|
15622
|
+
|
15351
15623
|
case "original":
|
15352
15624
|
case null:
|
15353
15625
|
case undefined:
|
@@ -15363,28 +15635,6 @@ class Parser {
|
|
15363
15635
|
this.consume();
|
15364
15636
|
}
|
15365
15637
|
}
|
15366
|
-
|
15367
|
-
consumeComment() {
|
15368
|
-
// the newline character is normalized in Lexer, check original source
|
15369
|
-
while (this.nextToken.text !== "EOF" && this.nextToken.loc && this.nextToken.loc.getSource().indexOf("\n") === -1) {
|
15370
|
-
this.consume();
|
15371
|
-
}
|
15372
|
-
|
15373
|
-
if (this.nextToken.text === "EOF") {
|
15374
|
-
this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would " + "fail because of commenting the end of math mode (e.g. $)");
|
15375
|
-
}
|
15376
|
-
|
15377
|
-
if (this.mode === "math") {
|
15378
|
-
this.consumeSpaces(); // ignore spaces in math mode
|
15379
|
-
} else if (this.nextToken.loc) {
|
15380
|
-
// text mode
|
15381
|
-
const source = this.nextToken.loc.getSource();
|
15382
|
-
|
15383
|
-
if (source.indexOf("\n") === source.length - 1) {
|
15384
|
-
this.consumeSpaces(); // if no space after the first newline
|
15385
|
-
}
|
15386
|
-
}
|
15387
|
-
}
|
15388
15638
|
/**
|
15389
15639
|
* Parses a group, essentially returning the string formed by the
|
15390
15640
|
* brace-enclosed tokens plus some position information.
|
@@ -15402,6 +15652,8 @@ class Parser {
|
|
15402
15652
|
return null;
|
15403
15653
|
} else if (raw && nextToken.text !== "EOF" && /[^{}[\]]/.test(nextToken.text)) {
|
15404
15654
|
// allow a single character in raw string group
|
15655
|
+
this.gullet.lexer.setCatcode("%", 14); // reset the catcode of %
|
15656
|
+
|
15405
15657
|
this.consume();
|
15406
15658
|
return nextToken;
|
15407
15659
|
}
|
@@ -15421,15 +15673,6 @@ class Parser {
|
|
15421
15673
|
case "EOF":
|
15422
15674
|
throw new ParseError("Unexpected end of input in " + modeName, firstToken.range(lastToken, str));
|
15423
15675
|
|
15424
|
-
case "%":
|
15425
|
-
if (!raw) {
|
15426
|
-
// allow % in raw string group
|
15427
|
-
this.consumeComment();
|
15428
|
-
continue;
|
15429
|
-
}
|
15430
|
-
|
15431
|
-
break;
|
15432
|
-
|
15433
15676
|
case groupBegin:
|
15434
15677
|
nested++;
|
15435
15678
|
break;
|
@@ -15445,6 +15688,8 @@ class Parser {
|
|
15445
15688
|
}
|
15446
15689
|
|
15447
15690
|
this.mode = outerMode;
|
15691
|
+
this.gullet.lexer.setCatcode("%", 14); // reset the catcode of %
|
15692
|
+
|
15448
15693
|
this.expect(groupEnd);
|
15449
15694
|
return firstToken.range(lastToken, str);
|
15450
15695
|
}
|
@@ -15462,12 +15707,7 @@ class Parser {
|
|
15462
15707
|
let lastToken = firstToken;
|
15463
15708
|
let str = "";
|
15464
15709
|
|
15465
|
-
while (this.nextToken.text !== "EOF" &&
|
15466
|
-
if (this.nextToken.text === "%") {
|
15467
|
-
this.consumeComment();
|
15468
|
-
continue;
|
15469
|
-
}
|
15470
|
-
|
15710
|
+
while (this.nextToken.text !== "EOF" && regex.test(str + this.nextToken.text)) {
|
15471
15711
|
lastToken = this.nextToken;
|
15472
15712
|
str += lastToken.text;
|
15473
15713
|
this.consume();
|
@@ -15619,29 +15859,29 @@ class Parser {
|
|
15619
15859
|
this.switchMode(mode);
|
15620
15860
|
}
|
15621
15861
|
|
15622
|
-
let
|
15862
|
+
let groupEnd;
|
15863
|
+
let result; // Try to parse an open brace or \begingroup
|
15864
|
+
|
15865
|
+
if (optional ? text === "[" : text === "{" || text === "\\begingroup") {
|
15866
|
+
groupEnd = Parser.endOfGroup[text]; // Start a new group namespace
|
15623
15867
|
|
15624
|
-
if (text === (optional ? "[" : "{")) {
|
15625
|
-
// Start a new group namespace
|
15626
15868
|
this.gullet.beginGroup(); // If we get a brace, parse an expression
|
15627
15869
|
|
15628
15870
|
this.consume();
|
15629
|
-
const expression = this.parseExpression(false,
|
15630
|
-
const lastToken = this.nextToken; //
|
15631
|
-
|
15632
|
-
if (mode) {
|
15633
|
-
this.switchMode(outerMode);
|
15634
|
-
} // End group namespace before consuming symbol after close brace
|
15635
|
-
|
15871
|
+
const expression = this.parseExpression(false, groupEnd);
|
15872
|
+
const lastToken = this.nextToken; // End group namespace before consuming symbol after close brace
|
15636
15873
|
|
15637
|
-
this.gullet.endGroup();
|
15638
|
-
|
15639
|
-
this.expect(optional ? "]" : "}");
|
15640
|
-
return {
|
15874
|
+
this.gullet.endGroup();
|
15875
|
+
result = {
|
15641
15876
|
type: "ordgroup",
|
15642
15877
|
mode: this.mode,
|
15643
15878
|
loc: SourceLocation.range(firstToken, lastToken),
|
15644
|
-
body: expression
|
15879
|
+
body: expression,
|
15880
|
+
// A group formed by \begingroup...\endgroup is a semi-simple group
|
15881
|
+
// which doesn't affect spacing in math mode, i.e., is transparent.
|
15882
|
+
// https://tex.stackexchange.com/questions/1930/when-should-one-
|
15883
|
+
// use-begingroup-instead-of-bgroup
|
15884
|
+
semisimple: text === "\\begingroup" || undefined
|
15645
15885
|
};
|
15646
15886
|
} else if (optional) {
|
15647
15887
|
// Return nothing for an optional group
|
@@ -15663,6 +15903,11 @@ class Parser {
|
|
15663
15903
|
|
15664
15904
|
if (mode) {
|
15665
15905
|
this.switchMode(outerMode);
|
15906
|
+
} // Make sure we got a close brace
|
15907
|
+
|
15908
|
+
|
15909
|
+
if (groupEnd) {
|
15910
|
+
this.expect(groupEnd);
|
15666
15911
|
}
|
15667
15912
|
|
15668
15913
|
return result;
|
@@ -15750,9 +15995,6 @@ class Parser {
|
|
15750
15995
|
body: arg,
|
15751
15996
|
star
|
15752
15997
|
};
|
15753
|
-
} else if (text === "%") {
|
15754
|
-
this.consumeComment();
|
15755
|
-
return this.parseSymbol();
|
15756
15998
|
} // At this point, we should have a symbol, possibly with accents.
|
15757
15999
|
// First expand any accented base symbol according to unicodeSymbols.
|
15758
16000
|
|
@@ -15864,7 +16106,24 @@ class Parser {
|
|
15864
16106
|
}
|
15865
16107
|
|
15866
16108
|
}
|
15867
|
-
Parser.endOfExpression = ["}", "\\end", "\\right", "&"];
|
16109
|
+
Parser.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"];
|
16110
|
+
Parser.endOfGroup = {
|
16111
|
+
"[": "]",
|
16112
|
+
"{": "}",
|
16113
|
+
"\\begingroup": "\\endgroup"
|
16114
|
+
/**
|
16115
|
+
* Parses an "expression", which is a list of atoms.
|
16116
|
+
*
|
16117
|
+
* `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
|
16118
|
+
* happens when functions have higher precendence han infix
|
16119
|
+
* nodes in implicit parses.
|
16120
|
+
*
|
16121
|
+
* `breakOnTokenText`: The text of the token that the expression should end
|
16122
|
+
* with, or `null` if something else should end the
|
16123
|
+
* expression.
|
16124
|
+
*/
|
16125
|
+
|
16126
|
+
};
|
15868
16127
|
Parser.SUPSUB_GREEDINESS = 1;
|
15869
16128
|
|
15870
16129
|
/**
|
@@ -15998,7 +16257,7 @@ var katex = {
|
|
15998
16257
|
/**
|
15999
16258
|
* Current KaTeX version
|
16000
16259
|
*/
|
16001
|
-
version: "0.10.
|
16260
|
+
version: "0.10.2",
|
16002
16261
|
|
16003
16262
|
/**
|
16004
16263
|
* Renders the given LaTeX into an HTML+MathML combination, and adds
|