├── firestore.indexes.json ├── .firebaserc ├── public ├── assets │ ├── image │ │ └── fav.png │ ├── lib │ │ ├── katex │ │ │ ├── contrib │ │ │ │ ├── copy-tex.min.css │ │ │ │ ├── copy-tex.css │ │ │ │ ├── mathtex-script-type.mjs │ │ │ │ ├── mathtex-script-type.min.js │ │ │ │ ├── copy-tex.min.js │ │ │ │ ├── copy-tex.mjs │ │ │ │ ├── auto-render.min.js │ │ │ │ ├── mathtex-script-type.js │ │ │ │ ├── auto-render.mjs │ │ │ │ ├── copy-tex.js │ │ │ │ ├── auto-render.js │ │ │ │ └── mhchem.min.js │ │ │ ├── fonts │ │ │ │ ├── KaTeX_Main-Bold.ttf │ │ │ │ ├── KaTeX_AMS-Regular.ttf │ │ │ │ ├── KaTeX_Main-Bold.woff │ │ │ │ ├── KaTeX_Main-Bold.woff2 │ │ │ │ ├── KaTeX_Main-Italic.ttf │ │ │ │ ├── KaTeX_Math-Italic.ttf │ │ │ │ ├── KaTeX_AMS-Regular.woff │ │ │ │ ├── KaTeX_AMS-Regular.woff2 │ │ │ │ ├── KaTeX_Fraktur-Bold.ttf │ │ │ │ ├── KaTeX_Fraktur-Bold.woff │ │ │ │ ├── KaTeX_Fraktur-Bold.woff2 │ │ │ │ ├── KaTeX_Main-Italic.woff │ │ │ │ ├── KaTeX_Main-Italic.woff2 │ │ │ │ ├── KaTeX_Main-Regular.ttf │ │ │ │ ├── KaTeX_Main-Regular.woff │ │ │ │ ├── KaTeX_Main-Regular.woff2 │ │ │ │ ├── KaTeX_Math-Italic.woff │ │ │ │ ├── KaTeX_Math-Italic.woff2 │ │ │ │ ├── KaTeX_SansSerif-Bold.ttf │ │ │ │ ├── KaTeX_Script-Regular.ttf │ │ │ │ ├── KaTeX_Size1-Regular.ttf │ │ │ │ ├── KaTeX_Size1-Regular.woff │ │ │ │ ├── KaTeX_Size2-Regular.ttf │ │ │ │ ├── KaTeX_Size2-Regular.woff │ │ │ │ ├── KaTeX_Size3-Regular.ttf │ │ │ │ ├── KaTeX_Size3-Regular.woff │ │ │ │ ├── KaTeX_Size4-Regular.ttf │ │ │ │ ├── KaTeX_Size4-Regular.woff │ │ │ │ ├── KaTeX_Caligraphic-Bold.ttf │ │ │ │ ├── KaTeX_Fraktur-Regular.ttf │ │ │ │ ├── KaTeX_Fraktur-Regular.woff │ │ │ │ ├── KaTeX_Main-BoldItalic.ttf │ │ │ │ ├── KaTeX_Main-BoldItalic.woff │ │ │ │ ├── KaTeX_Math-BoldItalic.ttf │ │ │ │ ├── KaTeX_Math-BoldItalic.woff │ │ │ │ ├── KaTeX_SansSerif-Bold.woff │ │ │ │ ├── KaTeX_SansSerif-Bold.woff2 │ │ │ │ ├── KaTeX_SansSerif-Italic.ttf │ │ │ │ ├── KaTeX_Script-Regular.woff │ │ │ │ ├── KaTeX_Script-Regular.woff2 │ │ │ │ ├── KaTeX_Size1-Regular.woff2 │ │ │ │ ├── KaTeX_Size2-Regular.woff2 │ │ │ │ ├── KaTeX_Size3-Regular.woff2 │ │ │ │ ├── KaTeX_Size4-Regular.woff2 │ │ │ │ ├── KaTeX_Caligraphic-Bold.woff │ │ │ │ ├── KaTeX_Caligraphic-Bold.woff2 │ │ │ │ ├── KaTeX_Caligraphic-Regular.ttf │ │ │ │ ├── KaTeX_Fraktur-Regular.woff2 │ │ │ │ ├── KaTeX_Main-BoldItalic.woff2 │ │ │ │ ├── KaTeX_Math-BoldItalic.woff2 │ │ │ │ ├── KaTeX_SansSerif-Italic.woff │ │ │ │ ├── KaTeX_SansSerif-Italic.woff2 │ │ │ │ ├── KaTeX_SansSerif-Regular.ttf │ │ │ │ ├── KaTeX_SansSerif-Regular.woff │ │ │ │ ├── KaTeX_SansSerif-Regular.woff2 │ │ │ │ ├── KaTeX_Typewriter-Regular.ttf │ │ │ │ ├── KaTeX_Typewriter-Regular.woff │ │ │ │ ├── KaTeX_Caligraphic-Regular.woff │ │ │ │ ├── KaTeX_Caligraphic-Regular.woff2 │ │ │ │ └── KaTeX_Typewriter-Regular.woff2 │ │ │ ├── README.md │ │ │ ├── katex.min.css │ │ │ └── katex.css │ │ └── pixelmatch.js │ ├── js │ │ ├── firebase-config.js │ │ ├── normalizations.js │ │ └── index.js │ └── style │ │ └── style.css └── index.html ├── firestore.rules ├── firebase.json ├── README.md ├── LICENSE └── .gitignore /firestore.indexes.json: -------------------------------------------------------------------------------- 1 | { 2 | "indexes": [], 3 | "fieldOverrides": [] 4 | } 5 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "texnique-b1956" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /public/assets/image/fav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/image/fav.png -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/copy-tex.min.css: -------------------------------------------------------------------------------- 1 | .katex,.katex-display{user-select:all;-moz-user-select:all;-webkit-user-select:all;-ms-user-select:all} 2 | -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /public/assets/lib/katex/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayravikumar/TeXnique/HEAD/public/assets/lib/katex/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /firestore.rules: -------------------------------------------------------------------------------- 1 | rules_version = '2'; 2 | service cloud.firestore { 3 | match /databases/{database}/documents { 4 | match /{document=**} { 5 | allow read, write; 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "firestore": { 3 | "rules": "firestore.rules", 4 | "indexes": "firestore.indexes.json" 5 | }, 6 | "hosting": { 7 | "public": "public", 8 | "ignore": [ 9 | "firebase.json", 10 | "**/.*", 11 | "**/node_modules/**" 12 | ], 13 | "rewrites": [ 14 | { 15 | "source": "**", 16 | "destination": "/index.html" 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/copy-tex.css: -------------------------------------------------------------------------------- 1 | /* Force selection of entire .katex/.katex-display blocks, so that we can 2 | * copy/paste the entire source code. If you omit this CSS, partial 3 | * selections of a formula will work, but will copy the ugly HTML 4 | * representation instead of the LaTeX source code. (Full selections will 5 | * still produce the LaTeX source code.) 6 | */ 7 | .katex, 8 | .katex-display { 9 | user-select: all; 10 | -moz-user-select: all; 11 | -webkit-user-select: all; 12 | -ms-user-select: all; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /public/assets/js/firebase-config.js: -------------------------------------------------------------------------------- 1 | // Your web app's Firebase configuration 2 | // For Firebase JS SDK v7.20.0 and later, measurementId is optional 3 | const firebaseConfig = { 4 | apiKey: "AIzaSyDYHw9oVZ84207EQYobb7DcxYHJAeazov8", 5 | authDomain: "texnique-v3.firebaseapp.com", 6 | projectId: "texnique-v3", 7 | storageBucket: "texnique-v3.firebasestorage.app", 8 | messagingSenderId: "59805088347", 9 | appId: "1:59805088347:web:f780a0440e4e78d0c1dd7e", 10 | measurementId: "G-B052LGHXCW" 11 | }; 12 | 13 | // Initialize Firebase 14 | const app = firebase.initializeApp(firebaseConfig); 15 | const db = firebase.firestore(); 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TeXnique 2 | 3 | A LaTeX speed-typesetting game. How many formulas can you recreate in three minutes? 4 | 5 | "Here’s a game that puts the fun in ‘underfilled hbox’" --[The Aperiodical](https://aperiodical.com/2019/09/texnique-a-latex-typesetting-game/) 6 | 7 | [HackerNews discussion](https://news.ycombinator.com/item?id=20814774) 8 | 9 | [Reddit discussion](https://www.reddit.com/r/math/comments/czwusd/texnique_a_latex_typesetting_game/) 10 | 11 | ## Contribution 12 | 13 | Contributors are welcome! If you'd like to contribute a problem, you can do so via [this form](https://forms.gle/DXjPeTL5DbJBhKRv8) or submit a pull request to this repository directly. 14 | -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/mathtex-script-type.mjs: -------------------------------------------------------------------------------- 1 | import katex from '../katex.mjs'; 2 | 3 | let scripts = document.body.getElementsByTagName("script"); 4 | scripts = Array.prototype.slice.call(scripts); 5 | scripts.forEach(function (script) { 6 | if (!script.type || !script.type.match(/math\/tex/i)) { 7 | return -1; 8 | } 9 | 10 | const display = script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null; 11 | const katexElement = document.createElement(display ? "div" : "span"); 12 | katexElement.setAttribute("class", display ? "equation" : "inline-equation"); 13 | 14 | try { 15 | katex.render(script.text, katexElement, { 16 | displayMode: display 17 | }); 18 | } catch (err) { 19 | //console.error(err); linter doesn't like this 20 | katexElement.textContent = script.text; 21 | } 22 | 23 | script.parentNode.replaceChild(katexElement, script); 24 | }); 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Akshay Ravikumar, Rahul Sridhar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | firebase-debug.log* 8 | 9 | # Firebase cache 10 | .firebase/ 11 | 12 | # Firebase config 13 | 14 | # Uncomment this if you'd like others to create their own Firebase project. 15 | # For a team working on the same Firebase project(s), it is recommended to leave 16 | # it commented so all members can deploy to the same project(s) in .firebaserc. 17 | # .firebaserc 18 | 19 | # Runtime data 20 | pids 21 | *.pid 22 | *.seed 23 | *.pid.lock 24 | 25 | # Directory for instrumented libs generated by jscoverage/JSCover 26 | lib-cov 27 | 28 | # Coverage directory used by tools like istanbul 29 | coverage 30 | 31 | # nyc test coverage 32 | .nyc_output 33 | 34 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 35 | .grunt 36 | 37 | # Bower dependency directory (https://bower.io/) 38 | bower_components 39 | 40 | # node-waf configuration 41 | .lock-wscript 42 | 43 | # Compiled binary addons (http://nodejs.org/api/addons.html) 44 | build/Release 45 | 46 | # Dependency directories 47 | node_modules/ 48 | 49 | # Optional npm cache directory 50 | .npm 51 | 52 | # Optional eslint cache 53 | .eslintcache 54 | 55 | # Optional REPL history 56 | .node_repl_history 57 | 58 | # Output of 'npm pack' 59 | *.tgz 60 | 61 | # Yarn Integrity file 62 | .yarn-integrity 63 | 64 | # dotenv environment variables file 65 | .env 66 | -------------------------------------------------------------------------------- /public/assets/js/normalizations.js: -------------------------------------------------------------------------------- 1 | /* Regex rules to apply to an inputted latex formula to correct for minor 2 | rendering differences. In order to qualify, a normalization must: 3 | - produce a nearly visually identical result 4 | - for example: \not \exists and \nexists don't look very similar, so this 5 | wouldn't count 6 | - be equivalently "correct" in some sense 7 | - for example: replacing \binom with \begin{pmatrix} doesn't qualify 8 | 9 | These calls are inherently subjective. For example, arguably \mid is more 10 | correct in some contexts than | but the symbols are so similar, and the 11 | correct practice so little known, that we'll count them all as the same. 12 | 13 | As a rule of thumb, if the only difference between two commands is the spacing 14 | they produce, we'll allow a rule to replace them. 15 | */ 16 | 17 | let normalizations = [ 18 | { 19 | "rule": /\\not\s*\\in(?!\w)/g, 20 | "replacement": String.raw`\notin` 21 | }, 22 | { 23 | "rule": /\\not\s*=/g, 24 | "replacement": String.raw`\neq` 25 | }, 26 | { 27 | "rule": /\\mid(?!\w)/g, 28 | "replacement": String.raw`|` 29 | }, 30 | { 31 | "rule": /\\Longleftrightarrow(?!\w)/g, 32 | "replacement": String.raw`\iff ` 33 | }, 34 | { 35 | "rule": /\\Longrightarrow(?!\w)/g, 36 | "replacement": String.raw`\implies` 37 | } 38 | ]; 39 | 40 | try { 41 | let space_rule = new RegExp("(?c?a.includeAA||!antialiased(t,o,l,r,i,e)&&!antialiased(e,o,l,r,i,t)?(n&&drawPixel(n,f,g,x,y),u++):n&&drawPixel(n,f,h,d,b):n&&drawGrayPixel(t,f,a.alpha,n)}return u}function isPixelData(t){return ArrayBuffer.isView(t)&&1===t.constructor.BYTES_PER_ELEMENT}function antialiased(t,e,n,r,i,a){const l=Math.max(e-1,0),o=Math.max(n-1,0),f=Math.min(e+1,r-1),s=Math.min(n+1,i-1),c=4*(n*r+e);let u,h,d,b,g=e===l||e===f||n===o||n===s?1:0,x=0,y=0;for(let i=l;i<=f;i++)for(let a=o;a<=s;a++){if(i===e&&a===n)continue;const l=colorDelta(t,t,c,4*(a*r+i),!0);if(0===l){if(++g>2)return!1}else ly&&(y=l,d=i,b=a)}return 0!==x&&0!==y&&(hasManySiblings(t,u,h,r,i)&&hasManySiblings(a,u,h,r,i)||hasManySiblings(t,d,b,r,i)&&hasManySiblings(a,d,b,r,i))}function hasManySiblings(t,e,n,r,i){const a=Math.max(e-1,0),l=Math.max(n-1,0),o=Math.min(e+1,r-1),f=Math.min(n+1,i-1),s=4*(n*r+e);let c=e===a||e===o||n===l||n===f?1:0;for(let i=a;i<=o;i++)for(let a=l;a<=f;a++){if(i===e&&a===n)continue;const l=4*(a*r+i);if(t[s]===t[l]&&t[s+1]===t[l+1]&&t[s+2]===t[l+2]&&t[s+3]===t[l+3]&&c++,c>2)return!0}return!1}function colorDelta(t,e,n,r,i){let a=t[n+0],l=t[n+1],o=t[n+2],f=t[n+3],s=e[r+0],c=e[r+1],u=e[r+2],h=e[r+3];if(f===h&&a===s&&l===c&&o===u)return 0;f<255&&(a=blend(a,f/=255),l=blend(l,f),o=blend(o,f)),h<255&&(s=blend(s,h/=255),c=blend(c,h),u=blend(u,h));const d=rgb2y(a,l,o)-rgb2y(s,c,u);if(i)return d;const b=rgb2i(a,l,o)-rgb2i(s,c,u),g=rgb2q(a,l,o)-rgb2q(s,c,u);return.5053*d*d+.299*b*b+.1957*g*g}function rgb2y(t,e,n){return.29889531*t+.58662247*e+.11448223*n}function rgb2i(t,e,n){return.59597799*t-.2741761*e-.32180189*n}function rgb2q(t,e,n){return.21147017*t-.52261711*e+.31114694*n}function blend(t,e){return 255+(t-255)*e}function drawPixel(t,e,n,r,i){t[e+0]=n,t[e+1]=r,t[e+2]=i,t[e+3]=255}function drawGrayPixel(t,e,n,r){const i=blend(rgb2y(t[e+0],t[e+1],t[e+2]),n*t[e+3]/255);drawPixel(r,e,i,i,i)} 8 | //# sourceMappingURL=/sm/1bc043df263da0529d56337549c65db0ba51288fae37c5284367bb35d6639780.map -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/copy-tex.mjs: -------------------------------------------------------------------------------- 1 | // Set these to how you want inline and display math to be delimited. 2 | const defaultCopyDelimiters = { 3 | inline: ['$', '$'], 4 | // alternative: ['\(', '\)'] 5 | display: ['$$', '$$'] // alternative: ['\[', '\]'] 6 | 7 | }; // Replace .katex elements with their TeX source ( element). 8 | // Modifies fragment in-place. Useful for writing your own 'copy' handler, 9 | // as in copy-tex.js. 10 | 11 | const katexReplaceWithTex = function katexReplaceWithTex(fragment, copyDelimiters) { 12 | if (copyDelimiters === void 0) { 13 | copyDelimiters = defaultCopyDelimiters; 14 | } 15 | 16 | // Remove .katex-html blocks that are preceded by .katex-mathml blocks 17 | // (which will get replaced below). 18 | const katexHtml = fragment.querySelectorAll('.katex-mathml + .katex-html'); 19 | 20 | for (let i = 0; i < katexHtml.length; i++) { 21 | const element = katexHtml[i]; 22 | 23 | if (element.remove) { 24 | element.remove(null); 25 | } else { 26 | element.parentNode.removeChild(element); 27 | } 28 | } // Replace .katex-mathml elements with their annotation (TeX source) 29 | // descendant, with inline delimiters. 30 | 31 | 32 | const katexMathml = fragment.querySelectorAll('.katex-mathml'); 33 | 34 | for (let i = 0; i < katexMathml.length; i++) { 35 | const element = katexMathml[i]; 36 | const texSource = element.querySelector('annotation'); 37 | 38 | if (texSource) { 39 | if (element.replaceWith) { 40 | element.replaceWith(texSource); 41 | } else { 42 | element.parentNode.replaceChild(texSource, element); 43 | } 44 | 45 | texSource.innerHTML = copyDelimiters.inline[0] + texSource.innerHTML + copyDelimiters.inline[1]; 46 | } 47 | } // Switch display math to display delimiters. 48 | 49 | 50 | const displays = fragment.querySelectorAll('.katex-display annotation'); 51 | 52 | for (let i = 0; i < displays.length; i++) { 53 | const element = displays[i]; 54 | element.innerHTML = copyDelimiters.display[0] + element.innerHTML.substr(copyDelimiters.inline[0].length, element.innerHTML.length - copyDelimiters.inline[0].length - copyDelimiters.inline[1].length) + copyDelimiters.display[1]; 55 | } 56 | 57 | return fragment; 58 | }; 59 | 60 | document.addEventListener('copy', function (event) { 61 | const selection = window.getSelection(); 62 | 63 | if (selection.isCollapsed) { 64 | return; // default action OK if selection is empty 65 | } 66 | 67 | const fragment = selection.getRangeAt(0).cloneContents(); 68 | 69 | if (!fragment.querySelector('.katex-mathml')) { 70 | return; // default action OK if no .katex-mathml elements 71 | } // Preserve usual HTML copy/paste behavior. 72 | 73 | 74 | const html = []; 75 | 76 | for (let i = 0; i < fragment.childNodes.length; i++) { 77 | html.push(fragment.childNodes[i].outerHTML); 78 | } 79 | 80 | event.clipboardData.setData('text/html', html.join('')); // Rewrite plain-text version. 81 | 82 | event.clipboardData.setData('text/plain', katexReplaceWithTex(fragment).textContent); // Prevent normal copy handling. 83 | 84 | event.preventDefault(); 85 | }); 86 | -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/auto-render.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),a=function(e,t,r){for(var n=r,o=0,a=e.length;n](https://khan.github.io/KaTeX/) [![Build Status](https://travis-ci.org/Khan/KaTeX.svg?branch=master)](https://travis-ci.org/Khan/KaTeX) 2 | 3 | [![Join the chat at https://gitter.im/Khan/KaTeX](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Khan/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. 6 | 7 | * **Fast:** KaTeX renders its math synchronously and doesn't need to reflow the page. See how it compares to a competitor in [this speed test](http://jsperf.com/katex-vs-mathjax/). 8 | * **Print quality:** KaTeX’s layout is based on Donald Knuth’s TeX, the gold standard for math typesetting. 9 | * **Self contained:** KaTeX has no dependencies and can easily be bundled with your website resources. 10 | * **Server side rendering:** KaTeX produces the same output regardless of browser or environment, so you can pre-render expressions using Node.js and send them as plain HTML. 11 | 12 | KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, and IE 8 - IE 11. A list of supported commands can be on the [wiki](https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX). 13 | 14 | ## Usage 15 | 16 | You can [download KaTeX](https://github.com/khan/katex/releases) and host it on your server or include the `katex.min.js` and `katex.min.css` files on your page directly from a CDN: 17 | 18 | ```html 19 | 20 | 21 | ``` 22 | 23 | #### In-browser rendering 24 | 25 | Call `katex.render` with a TeX expression and a DOM element to render into: 26 | 27 | ```js 28 | katex.render("c = \\pm\\sqrt{a^2 + b^2}", element); 29 | ``` 30 | 31 | If KaTeX can't parse the expression, it throws a `katex.ParseError` error. 32 | 33 | #### Server side rendering or rendering to a string 34 | 35 | To generate HTML on the server or to generate an HTML string of the rendered math, you can use `katex.renderToString`: 36 | 37 | ```js 38 | var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}"); 39 | // '...' 40 | ``` 41 | 42 | Make sure to include the CSS and font files, but there is no need to include the JavaScript. Like `render`, `renderToString` throws if it can't parse the expression. 43 | 44 | #### Rendering options 45 | 46 | You can provide an object of options as the last argument to `katex.render` and `katex.renderToString`. Available options are: 47 | 48 | - `displayMode`: `boolean`. If `true` the math will be rendered in display mode, which will put the math in display style (so `\int` and `\sum` are large, for example), and will center the math on the page on its own line. If `false` the math will be rendered in inline mode. (default: `false`) 49 | - `throwOnError`: `boolean`. If `true`, KaTeX will throw a `ParseError` when it encounters an unsupported command. If `false`, KaTeX will render the unsupported command as text in the color given by `errorColor`. (default: `true`) 50 | - `errorColor`: `string`. A color string given in the format `"#XXX"` or `"#XXXXXX"`. This option determines the color which unsupported commands are rendered in. (default: `#cc0000`) 51 | 52 | For example: 53 | 54 | ```js 55 | katex.render("c = \\pm\\sqrt{a^2 + b^2}", element, { displayMode: true }); 56 | ``` 57 | 58 | #### Automatic rendering of math on a page 59 | 60 | Math on the page can be automatically rendered using the auto-render extension. See [the Auto-render README](contrib/auto-render/README.md) for more information. 61 | 62 | ## Contributing 63 | 64 | See [CONTRIBUTING.md](CONTRIBUTING.md) 65 | 66 | ## License 67 | 68 | KaTeX is licensed under the [MIT License](http://opensource.org/licenses/MIT). 69 | -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/mathtex-script-type.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(require("katex")); 4 | else if(typeof define === 'function' && define.amd) 5 | define(["katex"], factory); 6 | else { 7 | var a = typeof exports === 'object' ? factory(require("katex")) : factory(root["katex"]); 8 | for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; 9 | } 10 | })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__0__) { 11 | return /******/ (function(modules) { // webpackBootstrap 12 | /******/ // The module cache 13 | /******/ var installedModules = {}; 14 | /******/ 15 | /******/ // The require function 16 | /******/ function __webpack_require__(moduleId) { 17 | /******/ 18 | /******/ // Check if module is in cache 19 | /******/ if(installedModules[moduleId]) { 20 | /******/ return installedModules[moduleId].exports; 21 | /******/ } 22 | /******/ // Create a new module (and put it into the cache) 23 | /******/ var module = installedModules[moduleId] = { 24 | /******/ i: moduleId, 25 | /******/ l: false, 26 | /******/ exports: {} 27 | /******/ }; 28 | /******/ 29 | /******/ // Execute the module function 30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 31 | /******/ 32 | /******/ // Flag the module as loaded 33 | /******/ module.l = true; 34 | /******/ 35 | /******/ // Return the exports of the module 36 | /******/ return module.exports; 37 | /******/ } 38 | /******/ 39 | /******/ 40 | /******/ // expose the modules object (__webpack_modules__) 41 | /******/ __webpack_require__.m = modules; 42 | /******/ 43 | /******/ // expose the module cache 44 | /******/ __webpack_require__.c = installedModules; 45 | /******/ 46 | /******/ // define getter function for harmony exports 47 | /******/ __webpack_require__.d = function(exports, name, getter) { 48 | /******/ if(!__webpack_require__.o(exports, name)) { 49 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 50 | /******/ } 51 | /******/ }; 52 | /******/ 53 | /******/ // define __esModule on exports 54 | /******/ __webpack_require__.r = function(exports) { 55 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 56 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 57 | /******/ } 58 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 59 | /******/ }; 60 | /******/ 61 | /******/ // create a fake namespace object 62 | /******/ // mode & 1: value is a module id, require it 63 | /******/ // mode & 2: merge all properties of value into the ns 64 | /******/ // mode & 4: return value when already ns object 65 | /******/ // mode & 8|1: behave like require 66 | /******/ __webpack_require__.t = function(value, mode) { 67 | /******/ if(mode & 1) value = __webpack_require__(value); 68 | /******/ if(mode & 8) return value; 69 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 70 | /******/ var ns = Object.create(null); 71 | /******/ __webpack_require__.r(ns); 72 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 73 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 74 | /******/ return ns; 75 | /******/ }; 76 | /******/ 77 | /******/ // getDefaultExport function for compatibility with non-harmony modules 78 | /******/ __webpack_require__.n = function(module) { 79 | /******/ var getter = module && module.__esModule ? 80 | /******/ function getDefault() { return module['default']; } : 81 | /******/ function getModuleExports() { return module; }; 82 | /******/ __webpack_require__.d(getter, 'a', getter); 83 | /******/ return getter; 84 | /******/ }; 85 | /******/ 86 | /******/ // Object.prototype.hasOwnProperty.call 87 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 88 | /******/ 89 | /******/ // __webpack_public_path__ 90 | /******/ __webpack_require__.p = ""; 91 | /******/ 92 | /******/ 93 | /******/ // Load entry module and return exports 94 | /******/ return __webpack_require__(__webpack_require__.s = 1); 95 | /******/ }) 96 | /************************************************************************/ 97 | /******/ ([ 98 | /* 0 */ 99 | /***/ (function(module, exports) { 100 | 101 | module.exports = __WEBPACK_EXTERNAL_MODULE__0__; 102 | 103 | /***/ }), 104 | /* 1 */ 105 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 106 | 107 | "use strict"; 108 | __webpack_require__.r(__webpack_exports__); 109 | /* harmony import */ var katex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 110 | /* harmony import */ var katex__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(katex__WEBPACK_IMPORTED_MODULE_0__); 111 | 112 | var scripts = document.body.getElementsByTagName("script"); 113 | scripts = Array.prototype.slice.call(scripts); 114 | scripts.forEach(function (script) { 115 | if (!script.type || !script.type.match(/math\/tex/i)) { 116 | return -1; 117 | } 118 | 119 | var display = script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null; 120 | var katexElement = document.createElement(display ? "div" : "span"); 121 | katexElement.setAttribute("class", display ? "equation" : "inline-equation"); 122 | 123 | try { 124 | katex__WEBPACK_IMPORTED_MODULE_0___default.a.render(script.text, katexElement, { 125 | displayMode: display 126 | }); 127 | } catch (err) { 128 | //console.error(err); linter doesn't like this 129 | katexElement.textContent = script.text; 130 | } 131 | 132 | script.parentNode.replaceChild(katexElement, script); 133 | }); 134 | 135 | /***/ }) 136 | /******/ ])["default"]; 137 | }); -------------------------------------------------------------------------------- /public/assets/style/style.css: -------------------------------------------------------------------------------- 1 | @font-face{ 2 | font-family: KaTeX_Main; 3 | src: url('../lib/katex/fonts/KaTeX_Main-Regular.woff2') format('woff'); 4 | font-weight: 400; 5 | font-style: normal; 6 | } 7 | 8 | main { 9 | font-family: Katex_Main, serif; 10 | } 11 | 12 | .katex { 13 | font-size: 1.1em; 14 | } 15 | 16 | .centered-text { 17 | margin: auto; 18 | text-align: center; 19 | } 20 | 21 | #intro-window, #ending-window { 22 | text-align: center; 23 | } 24 | 25 | #reset-button { 26 | margin: auto; 27 | } 28 | 29 | #start-button { 30 | margin-left: auto; 31 | margin-right: auto; 32 | } 33 | 34 | #title { 35 | font-size: 2.4em; 36 | margin-top: 5px; 37 | margin-bottom: 15px; 38 | } 39 | 40 | #subtitle { 41 | font-size: 1.4em; 42 | } 43 | 44 | #hint-text { 45 | width: fit-content; 46 | width: -moz-fit-content; 47 | text-align: left; 48 | margin-left: auto; 49 | margin-right: auto; 50 | } 51 | 52 | #hint-list { 53 | padding-inline-start: 30px; 54 | margin-top: 6px; 55 | } 56 | 57 | #hint-list li { 58 | margin-top: 7px; 59 | } 60 | 61 | .latex-button { 62 | font-family: Katex_Main, serif; 63 | font-size: 1em; 64 | background-color: white; 65 | border: solid 2px black; 66 | padding: 10px; 67 | margin-left: 5px; 68 | margin-right: 5px; 69 | } 70 | 71 | .latex-button:hover { 72 | cursor: pointer; 73 | background-color: #eee; 74 | } 75 | 76 | .latex-button:focus { 77 | outline: none; 78 | background-color: #eee; 79 | } 80 | 81 | .latex-button:active { 82 | outline: none; 83 | background-color: #ccc; 84 | } 85 | 86 | 87 | #left-buttons { 88 | float: left; 89 | display: inline-block; 90 | } 91 | 92 | #skip-button, #end-game-button { 93 | margin-top: -10px; 94 | } 95 | 96 | #top-row { 97 | } 98 | 99 | #score-wrapper { 100 | display: inline-block; 101 | width: 80px; 102 | margin-left: calc(50% - 315px); 103 | } 104 | 105 | #timer-wrapper { 106 | display: inline-block; 107 | float: right; 108 | } 109 | 110 | #score { 111 | font-family: KaTeX_Main, serif; 112 | } 113 | 114 | #timer { 115 | font-family: KaTeX_Main, serif; 116 | } 117 | 118 | .latex { 119 | height: 100px; 120 | margin-left: auto; 121 | margin-right: auto; 122 | border: solid 2px black; 123 | display: flex; 124 | justify-content: center; 125 | flex-direction: column; 126 | overflow-x: auto; 127 | padding-left: 10px; 128 | padding-right: 10px; 129 | } 130 | 131 | .correct { 132 | border-color: #0d0; 133 | } 134 | 135 | .done { 136 | color: #d00; 137 | } 138 | 139 | #target { 140 | margin-left: auto; 141 | margin-right: auto; 142 | } 143 | 144 | @media only screen and (max-width : 992px) { 145 | #container { 146 | width: 85%; 147 | margin-left: auto; 148 | margin-right: auto; 149 | } 150 | } 151 | 152 | #container { 153 | width: 70%; 154 | margin-top: 50px; 155 | margin-left: auto; 156 | margin-right: auto; 157 | display: none; 158 | } 159 | 160 | #out { 161 | margin-left: auto; 162 | margin-right: auto; 163 | } 164 | 165 | #user-input { 166 | height: 100px; 167 | } 168 | 169 | .answer { 170 | user-select: none; 171 | text-align: left; 172 | padding: 2px; 173 | } 174 | 175 | .latex-source { 176 | font-family: 'Roboto Mono', monospace; 177 | resize: none; 178 | background-color: black; 179 | font-size: 20px; 180 | color: white; 181 | width: 100%; 182 | } 183 | 184 | #result { 185 | height: 20px; 186 | } 187 | 188 | .problem-header { 189 | font-size: 1.5em; 190 | } 191 | 192 | .title { 193 | font-weight: bold; 194 | } 195 | 196 | .out-container { 197 | position: relative; 198 | } 199 | #shadow-target { 200 | opacity: 1; 201 | z-index: 0; 202 | color: #ccc; 203 | display: none; 204 | } 205 | .latex.out { 206 | position: absolute; 207 | left: 0; 208 | top: 0; 209 | width: 100%; 210 | } 211 | .latex { 212 | box-sizing: border-box; 213 | } 214 | 215 | #toggle-shadow-desc { 216 | display: inline; 217 | margin-left: 10px; 218 | margin-top: auto; 219 | margin-bottom: auto; 220 | } 221 | 222 | #options-container { 223 | display: flex; 224 | align-items: center; 225 | } 226 | 227 | .checkbox { 228 | display: none; 229 | } 230 | 231 | label { 232 | display: inline; 233 | } 234 | 235 | .checkbox + label, .checkbox:checked + label { 236 | background-color: white; 237 | border: 2px solid black; 238 | padding: 8px; 239 | display: inline-block; 240 | position: relative; 241 | } 242 | 243 | .checkbox + label:active, .checkbox:checked + label:active { 244 | background-color: #eee; 245 | } 246 | 247 | .checkbox + label:focus, .checkbox:checked + label:focus { 248 | background-color: #eee; 249 | outline: 0; 250 | } 251 | 252 | .checkbox:checked + label:after { 253 | content: '\2714'; 254 | font-size: 14px; 255 | position: absolute; 256 | top: 0px; 257 | left: 3px; 258 | color: black; 259 | } 260 | 261 | #skipped-problems { 262 | display: none; 263 | } 264 | 265 | /* Leaderboard styles */ 266 | #leaderboard-section { 267 | max-width: 600px; 268 | margin: 20px auto; 269 | font-family: KaTeX_Main, serif; 270 | } 271 | 272 | .leaderboard-controls { 273 | display: flex; 274 | justify-content: center; 275 | gap: 10px; 276 | margin: 15px 0; 277 | } 278 | 279 | .leaderboard-controls .latex-button.active { 280 | background-color: #eee; 281 | } 282 | 283 | #leaderboard-list { 284 | margin: 20px auto; 285 | max-width: 500px; 286 | } 287 | 288 | .leaderboard-entry { 289 | display: flex; 290 | justify-content: space-between; 291 | align-items: center; 292 | padding: 8px 16px; 293 | background: #fff; 294 | border: 1px solid #ddd; 295 | margin: 5px 0; 296 | font-family: KaTeX_Main, serif; 297 | text-align: left; 298 | } 299 | 300 | .leaderboard-entry .rank { 301 | font-weight: bold; 302 | width: 40px; 303 | flex-shrink: 0; 304 | } 305 | 306 | .leaderboard-entry .name { 307 | flex: 1; 308 | margin: 0 20px; 309 | white-space: nowrap; 310 | overflow: hidden; 311 | text-overflow: ellipsis; 312 | max-width: 200px; 313 | } 314 | 315 | .leaderboard-entry .score { 316 | font-weight: bold; 317 | flex-shrink: 0; 318 | } 319 | 320 | #player-name { 321 | padding: 8px; 322 | font-size: 1em; 323 | border: solid 2px black; 324 | font-family: KaTeX_Main, serif; 325 | width: 200px; 326 | } 327 | 328 | #player-name:focus { 329 | outline: none; 330 | border-color: #666; 331 | } 332 | 333 | #submit-score { 334 | padding: 8px 16px; 335 | font-size: 16px; 336 | cursor: pointer; 337 | } 338 | -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/auto-render.mjs: -------------------------------------------------------------------------------- 1 | import katex from '../katex.mjs'; 2 | 3 | /* eslint no-constant-condition:0 */ 4 | const findEndOfMath = function findEndOfMath(delimiter, text, startIndex) { 5 | // Adapted from 6 | // https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx 7 | let index = startIndex; 8 | let braceLevel = 0; 9 | const delimLength = delimiter.length; 10 | 11 | while (index < text.length) { 12 | const character = text[index]; 13 | 14 | if (braceLevel <= 0 && text.slice(index, index + delimLength) === delimiter) { 15 | return index; 16 | } else if (character === "\\") { 17 | index++; 18 | } else if (character === "{") { 19 | braceLevel++; 20 | } else if (character === "}") { 21 | braceLevel--; 22 | } 23 | 24 | index++; 25 | } 26 | 27 | return -1; 28 | }; 29 | 30 | const splitAtDelimiters = function splitAtDelimiters(startData, leftDelim, rightDelim, display) { 31 | const finalData = []; 32 | 33 | for (let i = 0; i < startData.length; i++) { 34 | if (startData[i].type === "text") { 35 | const text = startData[i].data; 36 | let lookingForLeft = true; 37 | let currIndex = 0; 38 | let nextIndex; 39 | nextIndex = text.indexOf(leftDelim); 40 | 41 | if (nextIndex !== -1) { 42 | currIndex = nextIndex; 43 | finalData.push({ 44 | type: "text", 45 | data: text.slice(0, currIndex) 46 | }); 47 | lookingForLeft = false; 48 | } 49 | 50 | while (true) { 51 | if (lookingForLeft) { 52 | nextIndex = text.indexOf(leftDelim, currIndex); 53 | 54 | if (nextIndex === -1) { 55 | break; 56 | } 57 | 58 | finalData.push({ 59 | type: "text", 60 | data: text.slice(currIndex, nextIndex) 61 | }); 62 | currIndex = nextIndex; 63 | } else { 64 | nextIndex = findEndOfMath(rightDelim, text, currIndex + leftDelim.length); 65 | 66 | if (nextIndex === -1) { 67 | break; 68 | } 69 | 70 | finalData.push({ 71 | type: "math", 72 | data: text.slice(currIndex + leftDelim.length, nextIndex), 73 | rawData: text.slice(currIndex, nextIndex + rightDelim.length), 74 | display: display 75 | }); 76 | currIndex = nextIndex + rightDelim.length; 77 | } 78 | 79 | lookingForLeft = !lookingForLeft; 80 | } 81 | 82 | finalData.push({ 83 | type: "text", 84 | data: text.slice(currIndex) 85 | }); 86 | } else { 87 | finalData.push(startData[i]); 88 | } 89 | } 90 | 91 | return finalData; 92 | }; 93 | 94 | /* eslint no-console:0 */ 95 | 96 | const splitWithDelimiters = function splitWithDelimiters(text, delimiters) { 97 | let data = [{ 98 | type: "text", 99 | data: text 100 | }]; 101 | 102 | for (let i = 0; i < delimiters.length; i++) { 103 | const delimiter = delimiters[i]; 104 | data = splitAtDelimiters(data, delimiter.left, delimiter.right, delimiter.display || false); 105 | } 106 | 107 | return data; 108 | }; 109 | /* Note: optionsCopy is mutated by this method. If it is ever exposed in the 110 | * API, we should copy it before mutating. 111 | */ 112 | 113 | 114 | const renderMathInText = function renderMathInText(text, optionsCopy) { 115 | const data = splitWithDelimiters(text, optionsCopy.delimiters); 116 | const fragment = document.createDocumentFragment(); 117 | 118 | for (let i = 0; i < data.length; i++) { 119 | if (data[i].type === "text") { 120 | fragment.appendChild(document.createTextNode(data[i].data)); 121 | } else { 122 | const span = document.createElement("span"); 123 | let math = data[i].data; // Override any display mode defined in the settings with that 124 | // defined by the text itself 125 | 126 | optionsCopy.displayMode = data[i].display; 127 | 128 | try { 129 | if (optionsCopy.preProcess) { 130 | math = optionsCopy.preProcess(math); 131 | } 132 | 133 | katex.render(math, span, optionsCopy); 134 | } catch (e) { 135 | if (!(e instanceof katex.ParseError)) { 136 | throw e; 137 | } 138 | 139 | optionsCopy.errorCallback("KaTeX auto-render: Failed to parse `" + data[i].data + "` with ", e); 140 | fragment.appendChild(document.createTextNode(data[i].rawData)); 141 | continue; 142 | } 143 | 144 | fragment.appendChild(span); 145 | } 146 | } 147 | 148 | return fragment; 149 | }; 150 | 151 | const renderElem = function renderElem(elem, optionsCopy) { 152 | for (let i = 0; i < elem.childNodes.length; i++) { 153 | const childNode = elem.childNodes[i]; 154 | 155 | if (childNode.nodeType === 3) { 156 | // Text node 157 | const frag = renderMathInText(childNode.textContent, optionsCopy); 158 | i += frag.childNodes.length - 1; 159 | elem.replaceChild(frag, childNode); 160 | } else if (childNode.nodeType === 1) { 161 | // Element node 162 | const className = ' ' + childNode.className + ' '; 163 | const shouldRender = optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) === -1 && optionsCopy.ignoredClasses.every(x => className.indexOf(' ' + x + ' ') === -1); 164 | 165 | if (shouldRender) { 166 | renderElem(childNode, optionsCopy); 167 | } 168 | } // Otherwise, it's something else, and ignore it. 169 | 170 | } 171 | }; 172 | 173 | const renderMathInElement = function renderMathInElement(elem, options) { 174 | if (!elem) { 175 | throw new Error("No element provided to render"); 176 | } 177 | 178 | const optionsCopy = {}; // Object.assign(optionsCopy, option) 179 | 180 | for (const option in options) { 181 | if (options.hasOwnProperty(option)) { 182 | optionsCopy[option] = options[option]; 183 | } 184 | } // default options 185 | 186 | 187 | optionsCopy.delimiters = optionsCopy.delimiters || [{ 188 | left: "$$", 189 | right: "$$", 190 | display: true 191 | }, { 192 | left: "\\(", 193 | right: "\\)", 194 | display: false 195 | }, // LaTeX uses $…$, but it ruins the display of normal `$` in text: 196 | // {left: "$", right: "$", display: false}, 197 | // \[…\] must come last in this array. Otherwise, renderMathInElement 198 | // will search for \[ before it searches for $$ or \( 199 | // That makes it susceptible to finding a \\[0.3em] row delimiter and 200 | // treating it as if it were the start of a KaTeX math zone. 201 | { 202 | left: "\\[", 203 | right: "\\]", 204 | display: true 205 | }]; 206 | optionsCopy.ignoredTags = optionsCopy.ignoredTags || ["script", "noscript", "style", "textarea", "pre", "code"]; 207 | optionsCopy.ignoredClasses = optionsCopy.ignoredClasses || []; 208 | optionsCopy.errorCallback = optionsCopy.errorCallback || console.error; // Enable sharing of global macros defined via `\gdef` between different 209 | // math elements within a single call to `renderMathInElement`. 210 | 211 | optionsCopy.macros = optionsCopy.macros || {}; 212 | renderElem(elem, optionsCopy); 213 | }; 214 | 215 | export default renderMathInElement; 216 | -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/copy-tex.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(); 4 | else if(typeof define === 'function' && define.amd) 5 | define([], factory); 6 | else { 7 | var a = factory(); 8 | for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; 9 | } 10 | })((typeof self !== 'undefined' ? self : this), function() { 11 | return /******/ (function(modules) { // webpackBootstrap 12 | /******/ // The module cache 13 | /******/ var installedModules = {}; 14 | /******/ 15 | /******/ // The require function 16 | /******/ function __webpack_require__(moduleId) { 17 | /******/ 18 | /******/ // Check if module is in cache 19 | /******/ if(installedModules[moduleId]) { 20 | /******/ return installedModules[moduleId].exports; 21 | /******/ } 22 | /******/ // Create a new module (and put it into the cache) 23 | /******/ var module = installedModules[moduleId] = { 24 | /******/ i: moduleId, 25 | /******/ l: false, 26 | /******/ exports: {} 27 | /******/ }; 28 | /******/ 29 | /******/ // Execute the module function 30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 31 | /******/ 32 | /******/ // Flag the module as loaded 33 | /******/ module.l = true; 34 | /******/ 35 | /******/ // Return the exports of the module 36 | /******/ return module.exports; 37 | /******/ } 38 | /******/ 39 | /******/ 40 | /******/ // expose the modules object (__webpack_modules__) 41 | /******/ __webpack_require__.m = modules; 42 | /******/ 43 | /******/ // expose the module cache 44 | /******/ __webpack_require__.c = installedModules; 45 | /******/ 46 | /******/ // define getter function for harmony exports 47 | /******/ __webpack_require__.d = function(exports, name, getter) { 48 | /******/ if(!__webpack_require__.o(exports, name)) { 49 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 50 | /******/ } 51 | /******/ }; 52 | /******/ 53 | /******/ // define __esModule on exports 54 | /******/ __webpack_require__.r = function(exports) { 55 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 56 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 57 | /******/ } 58 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 59 | /******/ }; 60 | /******/ 61 | /******/ // create a fake namespace object 62 | /******/ // mode & 1: value is a module id, require it 63 | /******/ // mode & 2: merge all properties of value into the ns 64 | /******/ // mode & 4: return value when already ns object 65 | /******/ // mode & 8|1: behave like require 66 | /******/ __webpack_require__.t = function(value, mode) { 67 | /******/ if(mode & 1) value = __webpack_require__(value); 68 | /******/ if(mode & 8) return value; 69 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 70 | /******/ var ns = Object.create(null); 71 | /******/ __webpack_require__.r(ns); 72 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 73 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 74 | /******/ return ns; 75 | /******/ }; 76 | /******/ 77 | /******/ // getDefaultExport function for compatibility with non-harmony modules 78 | /******/ __webpack_require__.n = function(module) { 79 | /******/ var getter = module && module.__esModule ? 80 | /******/ function getDefault() { return module['default']; } : 81 | /******/ function getModuleExports() { return module; }; 82 | /******/ __webpack_require__.d(getter, 'a', getter); 83 | /******/ return getter; 84 | /******/ }; 85 | /******/ 86 | /******/ // Object.prototype.hasOwnProperty.call 87 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 88 | /******/ 89 | /******/ // __webpack_public_path__ 90 | /******/ __webpack_require__.p = ""; 91 | /******/ 92 | /******/ 93 | /******/ // Load entry module and return exports 94 | /******/ return __webpack_require__(__webpack_require__.s = 1); 95 | /******/ }) 96 | /************************************************************************/ 97 | /******/ ([ 98 | /* 0 */ 99 | /***/ (function(module, exports, __webpack_require__) { 100 | 101 | // extracted by mini-css-extract-plugin 102 | 103 | /***/ }), 104 | /* 1 */ 105 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 106 | 107 | "use strict"; 108 | __webpack_require__.r(__webpack_exports__); 109 | 110 | // EXTERNAL MODULE: ./contrib/copy-tex/copy-tex.css 111 | var copy_tex = __webpack_require__(0); 112 | 113 | // CONCATENATED MODULE: ./contrib/copy-tex/katex2tex.js 114 | // Set these to how you want inline and display math to be delimited. 115 | var defaultCopyDelimiters = { 116 | inline: ['$', '$'], 117 | // alternative: ['\(', '\)'] 118 | display: ['$$', '$$'] // alternative: ['\[', '\]'] 119 | 120 | }; // Replace .katex elements with their TeX source ( element). 121 | // Modifies fragment in-place. Useful for writing your own 'copy' handler, 122 | // as in copy-tex.js. 123 | 124 | var katexReplaceWithTex = function katexReplaceWithTex(fragment, copyDelimiters) { 125 | if (copyDelimiters === void 0) { 126 | copyDelimiters = defaultCopyDelimiters; 127 | } 128 | 129 | // Remove .katex-html blocks that are preceded by .katex-mathml blocks 130 | // (which will get replaced below). 131 | var katexHtml = fragment.querySelectorAll('.katex-mathml + .katex-html'); 132 | 133 | for (var i = 0; i < katexHtml.length; i++) { 134 | var element = katexHtml[i]; 135 | 136 | if (element.remove) { 137 | element.remove(null); 138 | } else { 139 | element.parentNode.removeChild(element); 140 | } 141 | } // Replace .katex-mathml elements with their annotation (TeX source) 142 | // descendant, with inline delimiters. 143 | 144 | 145 | var katexMathml = fragment.querySelectorAll('.katex-mathml'); 146 | 147 | for (var _i = 0; _i < katexMathml.length; _i++) { 148 | var _element = katexMathml[_i]; 149 | 150 | var texSource = _element.querySelector('annotation'); 151 | 152 | if (texSource) { 153 | if (_element.replaceWith) { 154 | _element.replaceWith(texSource); 155 | } else { 156 | _element.parentNode.replaceChild(texSource, _element); 157 | } 158 | 159 | texSource.innerHTML = copyDelimiters.inline[0] + texSource.innerHTML + copyDelimiters.inline[1]; 160 | } 161 | } // Switch display math to display delimiters. 162 | 163 | 164 | var displays = fragment.querySelectorAll('.katex-display annotation'); 165 | 166 | for (var _i2 = 0; _i2 < displays.length; _i2++) { 167 | var _element2 = displays[_i2]; 168 | _element2.innerHTML = copyDelimiters.display[0] + _element2.innerHTML.substr(copyDelimiters.inline[0].length, _element2.innerHTML.length - copyDelimiters.inline[0].length - copyDelimiters.inline[1].length) + copyDelimiters.display[1]; 169 | } 170 | 171 | return fragment; 172 | }; 173 | /* harmony default export */ var katex2tex = (katexReplaceWithTex); 174 | // CONCATENATED MODULE: ./contrib/copy-tex/copy-tex.js 175 | // Global copy handler to modify behavior on .katex elements. 176 | 177 | document.addEventListener('copy', function (event) { 178 | var selection = window.getSelection(); 179 | 180 | if (selection.isCollapsed) { 181 | return; // default action OK if selection is empty 182 | } 183 | 184 | var fragment = selection.getRangeAt(0).cloneContents(); 185 | 186 | if (!fragment.querySelector('.katex-mathml')) { 187 | return; // default action OK if no .katex-mathml elements 188 | } // Preserve usual HTML copy/paste behavior. 189 | 190 | 191 | var html = []; 192 | 193 | for (var i = 0; i < fragment.childNodes.length; i++) { 194 | html.push(fragment.childNodes[i].outerHTML); 195 | } 196 | 197 | event.clipboardData.setData('text/html', html.join('')); // Rewrite plain-text version. 198 | 199 | event.clipboardData.setData('text/plain', katex2tex(fragment).textContent); // Prevent normal copy handling. 200 | 201 | event.preventDefault(); 202 | }); 203 | // CONCATENATED MODULE: ./contrib/copy-tex/copy-tex.webpack.js 204 | /** 205 | * This is the webpack entry point for KaTeX. As ECMAScript doesn't support 206 | * CSS modules natively, a separate entry point is used. 207 | */ 208 | 209 | 210 | 211 | /***/ }) 212 | /******/ ])["default"]; 213 | }); -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 15 | 16 | TeXnique 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 57 | 90 | 91 |
92 |

\(\text{\TeX nique}\)

93 |

\(\text{A \LaTeX \, Typesetting Game}\)

94 | 95 |
96 |
97 | 98 |
99 |

100 | 101 |

102 | 103 | 104 | 105 | 106 |


107 | 108 |
109 | Hints: 110 |
    111 |
  • No \(\texttt{\$}\) signs needed
  • 112 |
  • All formulas are rendered in display style
  • 113 |
  • Use \( \verb \left \) and \( \verb \right \) to correctly size balanced delimiters like \( \verb ( \), 114 | \( \texttt \{ \), and \( \verb \lceil \)
  • 115 |
  • Prefer \( \verb \bmod \) and \( \verb \pmod \) to \( \verb \mod \)
  • 116 |
  • Use \( \verb \mathbf \), not \( \verb \textbf \) 117 |
  • Harder problems are worth more points
  • 118 |
  • Use Detexify to quickly look up unknown symbols 119 |
  • 120 |
121 |
122 |
123 | 124 | 157 | 158 |
159 |
160 | 161 | 162 | 163 | 164 | Score:   165 | Time:   166 |
167 | 168 |

169 | 170 |

  171 |

172 | 173 |

Try to create the following formula:

174 | 175 |
176 |
177 |
178 | 179 |
180 | 181 |

This is what your output looks like:

182 | 183 |
184 |
185 |
186 |
187 | 188 |
189 |
190 |
191 |
192 | 193 |
194 | 195 |

Edit your code here:

196 | 197 | 198 | 199 |

200 | 201 |
202 | 203 | 204 |

Toggle Shadow

205 |
206 |
207 |
208 |
209 | 210 | 211 | -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/auto-render.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(require("katex")); 4 | else if(typeof define === 'function' && define.amd) 5 | define(["katex"], factory); 6 | else if(typeof exports === 'object') 7 | exports["renderMathInElement"] = factory(require("katex")); 8 | else 9 | root["renderMathInElement"] = factory(root["katex"]); 10 | })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__0__) { 11 | return /******/ (function(modules) { // webpackBootstrap 12 | /******/ // The module cache 13 | /******/ var installedModules = {}; 14 | /******/ 15 | /******/ // The require function 16 | /******/ function __webpack_require__(moduleId) { 17 | /******/ 18 | /******/ // Check if module is in cache 19 | /******/ if(installedModules[moduleId]) { 20 | /******/ return installedModules[moduleId].exports; 21 | /******/ } 22 | /******/ // Create a new module (and put it into the cache) 23 | /******/ var module = installedModules[moduleId] = { 24 | /******/ i: moduleId, 25 | /******/ l: false, 26 | /******/ exports: {} 27 | /******/ }; 28 | /******/ 29 | /******/ // Execute the module function 30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 31 | /******/ 32 | /******/ // Flag the module as loaded 33 | /******/ module.l = true; 34 | /******/ 35 | /******/ // Return the exports of the module 36 | /******/ return module.exports; 37 | /******/ } 38 | /******/ 39 | /******/ 40 | /******/ // expose the modules object (__webpack_modules__) 41 | /******/ __webpack_require__.m = modules; 42 | /******/ 43 | /******/ // expose the module cache 44 | /******/ __webpack_require__.c = installedModules; 45 | /******/ 46 | /******/ // define getter function for harmony exports 47 | /******/ __webpack_require__.d = function(exports, name, getter) { 48 | /******/ if(!__webpack_require__.o(exports, name)) { 49 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 50 | /******/ } 51 | /******/ }; 52 | /******/ 53 | /******/ // define __esModule on exports 54 | /******/ __webpack_require__.r = function(exports) { 55 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 56 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 57 | /******/ } 58 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 59 | /******/ }; 60 | /******/ 61 | /******/ // create a fake namespace object 62 | /******/ // mode & 1: value is a module id, require it 63 | /******/ // mode & 2: merge all properties of value into the ns 64 | /******/ // mode & 4: return value when already ns object 65 | /******/ // mode & 8|1: behave like require 66 | /******/ __webpack_require__.t = function(value, mode) { 67 | /******/ if(mode & 1) value = __webpack_require__(value); 68 | /******/ if(mode & 8) return value; 69 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 70 | /******/ var ns = Object.create(null); 71 | /******/ __webpack_require__.r(ns); 72 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 73 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 74 | /******/ return ns; 75 | /******/ }; 76 | /******/ 77 | /******/ // getDefaultExport function for compatibility with non-harmony modules 78 | /******/ __webpack_require__.n = function(module) { 79 | /******/ var getter = module && module.__esModule ? 80 | /******/ function getDefault() { return module['default']; } : 81 | /******/ function getModuleExports() { return module; }; 82 | /******/ __webpack_require__.d(getter, 'a', getter); 83 | /******/ return getter; 84 | /******/ }; 85 | /******/ 86 | /******/ // Object.prototype.hasOwnProperty.call 87 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 88 | /******/ 89 | /******/ // __webpack_public_path__ 90 | /******/ __webpack_require__.p = ""; 91 | /******/ 92 | /******/ 93 | /******/ // Load entry module and return exports 94 | /******/ return __webpack_require__(__webpack_require__.s = 1); 95 | /******/ }) 96 | /************************************************************************/ 97 | /******/ ([ 98 | /* 0 */ 99 | /***/ (function(module, exports) { 100 | 101 | module.exports = __WEBPACK_EXTERNAL_MODULE__0__; 102 | 103 | /***/ }), 104 | /* 1 */ 105 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 106 | 107 | "use strict"; 108 | __webpack_require__.r(__webpack_exports__); 109 | 110 | // EXTERNAL MODULE: external "katex" 111 | var external_katex_ = __webpack_require__(0); 112 | var external_katex_default = /*#__PURE__*/__webpack_require__.n(external_katex_); 113 | 114 | // CONCATENATED MODULE: ./contrib/auto-render/splitAtDelimiters.js 115 | /* eslint no-constant-condition:0 */ 116 | var findEndOfMath = function findEndOfMath(delimiter, text, startIndex) { 117 | // Adapted from 118 | // https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx 119 | var index = startIndex; 120 | var braceLevel = 0; 121 | var delimLength = delimiter.length; 122 | 123 | while (index < text.length) { 124 | var character = text[index]; 125 | 126 | if (braceLevel <= 0 && text.slice(index, index + delimLength) === delimiter) { 127 | return index; 128 | } else if (character === "\\") { 129 | index++; 130 | } else if (character === "{") { 131 | braceLevel++; 132 | } else if (character === "}") { 133 | braceLevel--; 134 | } 135 | 136 | index++; 137 | } 138 | 139 | return -1; 140 | }; 141 | 142 | var splitAtDelimiters = function splitAtDelimiters(startData, leftDelim, rightDelim, display) { 143 | var finalData = []; 144 | 145 | for (var i = 0; i < startData.length; i++) { 146 | if (startData[i].type === "text") { 147 | var text = startData[i].data; 148 | var lookingForLeft = true; 149 | var currIndex = 0; 150 | var nextIndex = void 0; 151 | nextIndex = text.indexOf(leftDelim); 152 | 153 | if (nextIndex !== -1) { 154 | currIndex = nextIndex; 155 | finalData.push({ 156 | type: "text", 157 | data: text.slice(0, currIndex) 158 | }); 159 | lookingForLeft = false; 160 | } 161 | 162 | while (true) { 163 | if (lookingForLeft) { 164 | nextIndex = text.indexOf(leftDelim, currIndex); 165 | 166 | if (nextIndex === -1) { 167 | break; 168 | } 169 | 170 | finalData.push({ 171 | type: "text", 172 | data: text.slice(currIndex, nextIndex) 173 | }); 174 | currIndex = nextIndex; 175 | } else { 176 | nextIndex = findEndOfMath(rightDelim, text, currIndex + leftDelim.length); 177 | 178 | if (nextIndex === -1) { 179 | break; 180 | } 181 | 182 | finalData.push({ 183 | type: "math", 184 | data: text.slice(currIndex + leftDelim.length, nextIndex), 185 | rawData: text.slice(currIndex, nextIndex + rightDelim.length), 186 | display: display 187 | }); 188 | currIndex = nextIndex + rightDelim.length; 189 | } 190 | 191 | lookingForLeft = !lookingForLeft; 192 | } 193 | 194 | finalData.push({ 195 | type: "text", 196 | data: text.slice(currIndex) 197 | }); 198 | } else { 199 | finalData.push(startData[i]); 200 | } 201 | } 202 | 203 | return finalData; 204 | }; 205 | 206 | /* harmony default export */ var auto_render_splitAtDelimiters = (splitAtDelimiters); 207 | // CONCATENATED MODULE: ./contrib/auto-render/auto-render.js 208 | /* eslint no-console:0 */ 209 | 210 | 211 | 212 | var auto_render_splitWithDelimiters = function splitWithDelimiters(text, delimiters) { 213 | var data = [{ 214 | type: "text", 215 | data: text 216 | }]; 217 | 218 | for (var i = 0; i < delimiters.length; i++) { 219 | var delimiter = delimiters[i]; 220 | data = auto_render_splitAtDelimiters(data, delimiter.left, delimiter.right, delimiter.display || false); 221 | } 222 | 223 | return data; 224 | }; 225 | /* Note: optionsCopy is mutated by this method. If it is ever exposed in the 226 | * API, we should copy it before mutating. 227 | */ 228 | 229 | 230 | var auto_render_renderMathInText = function renderMathInText(text, optionsCopy) { 231 | var data = auto_render_splitWithDelimiters(text, optionsCopy.delimiters); 232 | var fragment = document.createDocumentFragment(); 233 | 234 | for (var i = 0; i < data.length; i++) { 235 | if (data[i].type === "text") { 236 | fragment.appendChild(document.createTextNode(data[i].data)); 237 | } else { 238 | var span = document.createElement("span"); 239 | var math = data[i].data; // Override any display mode defined in the settings with that 240 | // defined by the text itself 241 | 242 | optionsCopy.displayMode = data[i].display; 243 | 244 | try { 245 | if (optionsCopy.preProcess) { 246 | math = optionsCopy.preProcess(math); 247 | } 248 | 249 | external_katex_default.a.render(math, span, optionsCopy); 250 | } catch (e) { 251 | if (!(e instanceof external_katex_default.a.ParseError)) { 252 | throw e; 253 | } 254 | 255 | optionsCopy.errorCallback("KaTeX auto-render: Failed to parse `" + data[i].data + "` with ", e); 256 | fragment.appendChild(document.createTextNode(data[i].rawData)); 257 | continue; 258 | } 259 | 260 | fragment.appendChild(span); 261 | } 262 | } 263 | 264 | return fragment; 265 | }; 266 | 267 | var renderElem = function renderElem(elem, optionsCopy) { 268 | for (var i = 0; i < elem.childNodes.length; i++) { 269 | var childNode = elem.childNodes[i]; 270 | 271 | if (childNode.nodeType === 3) { 272 | // Text node 273 | var frag = auto_render_renderMathInText(childNode.textContent, optionsCopy); 274 | i += frag.childNodes.length - 1; 275 | elem.replaceChild(frag, childNode); 276 | } else if (childNode.nodeType === 1) { 277 | (function () { 278 | // Element node 279 | var className = ' ' + childNode.className + ' '; 280 | var shouldRender = optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) === -1 && optionsCopy.ignoredClasses.every(function (x) { 281 | return className.indexOf(' ' + x + ' ') === -1; 282 | }); 283 | 284 | if (shouldRender) { 285 | renderElem(childNode, optionsCopy); 286 | } 287 | })(); 288 | } // Otherwise, it's something else, and ignore it. 289 | 290 | } 291 | }; 292 | 293 | var renderMathInElement = function renderMathInElement(elem, options) { 294 | if (!elem) { 295 | throw new Error("No element provided to render"); 296 | } 297 | 298 | var optionsCopy = {}; // Object.assign(optionsCopy, option) 299 | 300 | for (var option in options) { 301 | if (options.hasOwnProperty(option)) { 302 | optionsCopy[option] = options[option]; 303 | } 304 | } // default options 305 | 306 | 307 | optionsCopy.delimiters = optionsCopy.delimiters || [{ 308 | left: "$$", 309 | right: "$$", 310 | display: true 311 | }, { 312 | left: "\\(", 313 | right: "\\)", 314 | display: false 315 | }, // LaTeX uses $…$, but it ruins the display of normal `$` in text: 316 | // {left: "$", right: "$", display: false}, 317 | // \[…\] must come last in this array. Otherwise, renderMathInElement 318 | // will search for \[ before it searches for $$ or \( 319 | // That makes it susceptible to finding a \\[0.3em] row delimiter and 320 | // treating it as if it were the start of a KaTeX math zone. 321 | { 322 | left: "\\[", 323 | right: "\\]", 324 | display: true 325 | }]; 326 | optionsCopy.ignoredTags = optionsCopy.ignoredTags || ["script", "noscript", "style", "textarea", "pre", "code"]; 327 | optionsCopy.ignoredClasses = optionsCopy.ignoredClasses || []; 328 | optionsCopy.errorCallback = optionsCopy.errorCallback || console.error; // Enable sharing of global macros defined via `\gdef` between different 329 | // math elements within a single call to `renderMathInElement`. 330 | 331 | optionsCopy.macros = optionsCopy.macros || {}; 332 | renderElem(elem, optionsCopy); 333 | }; 334 | 335 | /* harmony default export */ var auto_render = __webpack_exports__["default"] = (renderMathInElement); 336 | 337 | /***/ }) 338 | /******/ ])["default"]; 339 | }); -------------------------------------------------------------------------------- /public/assets/js/index.js: -------------------------------------------------------------------------------- 1 | let TIMEOUT_SECONDS = 180; 2 | let TIMEOUT_STRING = "three minutes"; 3 | let secondsRemaining = TIMEOUT_SECONDS; 4 | 5 | let gameTimer; 6 | let oldVal; 7 | let problemNumber = 0; 8 | let problemPoints = 0; 9 | let currentScore = 0; 10 | let numCorrect = 0; 11 | let problemsOrder; 12 | let debug = false; 13 | let lastTarget = ''; 14 | let mobile = false; 15 | let showShadow = false; 16 | let skippedProblems = []; 17 | let showSkipped = false; 18 | 19 | function mobileCheck() { 20 | var check = false; 21 | (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera); 22 | return check; 23 | }; 24 | 25 | function shuffleArray(array) { 26 | for (let i = array.length - 1; i > 0; i--) { 27 | const j = Math.floor(Math.random() * (i + 1)); 28 | [array[i], array[j]] = [array[j], array[i]]; 29 | } 30 | } 31 | 32 | function displayLaTeXInBody() { 33 | renderMathInElement(document.body, { 34 | options: { 35 | throwOnError: false, 36 | display: false 37 | } 38 | }); 39 | } 40 | 41 | // A simple timer 42 | function displayTime(secs) { 43 | let minutes = Math.floor(secs / 60) % 60; 44 | let seconds = secs % 60; 45 | let displayText = minutes + ":" + (seconds < 10 ? "0" + seconds : seconds); 46 | $("#timer").text(displayText); 47 | } 48 | 49 | function displayInfiniteTime() { 50 | katex.render(`\\infty`, $("#timer")[0]); 51 | } 52 | 53 | function startTimer(onTimeoutFunc) { 54 | secondsRemaining = TIMEOUT_SECONDS; 55 | gameTimer = setInterval(function() { 56 | secondsRemaining--; 57 | displayTime(secondsRemaining); 58 | if (secondsRemaining == 0) { 59 | clearInterval(timer); 60 | onTimeoutFunc(); 61 | } 62 | }, 1000); 63 | } 64 | 65 | function toggleShowSkipped() { 66 | $("#skipped-problems").toggle(); 67 | showSkipped = !showSkipped; 68 | $("#show-skipped-button").text(showSkipped ? "Hide Skipped" : "Show Skipped"); 69 | } 70 | 71 | function showIntro() { 72 | $("#game-window").hide(); 73 | $("#ending-window").hide(); 74 | $("#intro-window").show(); 75 | $("#score-submission").show(); 76 | 77 | let introText = "This is a game to test your \\(\\LaTeX\\) skills.

" + 78 | " Type as many formulas as you can in " + TIMEOUT_STRING + " (timed game), or play an untimed game (zen mode)!"; 79 | $("#intro-text").html(introText); 80 | 81 | if (mobileCheck()) { 82 | $("#hint-list").prepend("
  • Consider switching to a desktop browser
  • ") 83 | mobile = true; 84 | } 85 | 86 | displayLaTeXInBody(); 87 | $("#container").show(); 88 | } 89 | 90 | function endGame() { 91 | clearTimeout(gameTimer); 92 | 93 | $("#intro-window").hide(); 94 | $("#game-window").hide(); 95 | $("#ending-window").show(); 96 | displayLaTeXInBody(); 97 | 98 | let problemsText = numCorrect + ((numCorrect == 1) ? " problem" : " problems"); 99 | let endingText = "You finished " + problemsText + " for a total score of " + currentScore; 100 | $("#ending-text").text(endingText); 101 | 102 | // Load initial leaderboard 103 | loadLeaderboard('today'); 104 | 105 | skippedProblems.forEach(idx => { 106 | let target = problems[problemsOrder[idx % problems.length]]; 107 | let targetId = 'skipTarget' + idx; 108 | let skippedProblemsHtml = ` 109 |

    ${target.title}

    110 |
    111 |
    112 |
    113 |
    114 |
    ${target.latex}
    115 |

    116 | `; 117 | $("#skipped-problems").append(skippedProblemsHtml); 118 | 119 | katex.render(target.latex, $("#" + targetId)[0], { 120 | throwOnError: false, 121 | displayMode: true 122 | }); 123 | }); 124 | displayLaTeXInBody(); 125 | 126 | $("#skipped-problems").hide() 127 | $("#show-skipped-button").text("Show Skipped"); 128 | showSkipped = false; 129 | if (skippedProblems.length > 0) { 130 | $("#show-skipped-message").show(); 131 | $("#show-skipped-button").show(); 132 | } else { 133 | $("#show-skipped-message").hide(); 134 | $("#show-skipped-button").hide(); 135 | } 136 | } 137 | 138 | 139 | function startGame(useTimer) { 140 | problemNumber = 0; 141 | currentScore = 0; 142 | numCorrect = 0; 143 | oldVal = ""; 144 | problemsOrder = [...Array(problems.length).keys()]; 145 | shuffleArray(problemsOrder); 146 | skippedProblems = []; 147 | 148 | $("#intro-window").hide(); 149 | $("#ending-window").hide(); 150 | $("#game-window").show(); 151 | $("#skipped-problems").html(""); 152 | $("#skipped-problems").hide(); 153 | 154 | displayLaTeXInBody(); 155 | 156 | $("#score").text(0); 157 | 158 | if (useTimer) { 159 | displayTime(TIMEOUT_SECONDS); 160 | 161 | // Reset and start the timer 162 | loadProblem(); 163 | startTimer(function() { 164 | endGame(); 165 | }); 166 | } else { 167 | displayInfiniteTime(); 168 | loadProblem(); 169 | } 170 | } 171 | 172 | function loadProblem() { 173 | // clear current work 174 | $('#out').empty(); 175 | $('#user-input').val(''); 176 | 177 | // reset styling 178 | $('#out').parent().removeClass("correct"); 179 | $('#user-input').prop("disabled", false); 180 | if (!mobile) { 181 | $('#user-input').focus(); 182 | } 183 | 184 | // load problem 185 | let target = problems[problemsOrder[problemNumber % problems.length]]; 186 | if (debug) { 187 | target = problems[problemNumber + 179]; 188 | } 189 | problemNumber += 1; 190 | 191 | // load problem text 192 | let problemText = "Problem " + problemNumber + ": " + target.title; 193 | $("#problem-title").text(problemText); 194 | problemPoints = Math.ceil(target.latex.length / 10.0); 195 | let pointsText = "(" + problemPoints + ((problemPoints == 1) ? " point)" : " points)"); 196 | $("#problem-points").text(pointsText); 197 | 198 | displayLaTeXInBody(); 199 | 200 | // load problem body 201 | katex.render(target.latex, $("#target")[0], { 202 | throwOnError: false, 203 | displayMode: true 204 | }); 205 | // load problem body 206 | katex.render(target.latex, $("#shadow-target")[0], { 207 | throwOnError: false, 208 | displayMode: true 209 | }); 210 | 211 | oldVal = ""; 212 | }; 213 | 214 | function normalize(input) { 215 | normalizations.forEach( 216 | rule => input = input.replace(rule["rule"], rule["replacement"]) 217 | ); 218 | return input; 219 | } 220 | 221 | function validateProblem() { 222 | let currentVal = normalize($("#user-input").val()); 223 | if (currentVal == oldVal) { 224 | return; // check to prevent multiple simultaneous triggers 225 | } 226 | 227 | oldVal = currentVal; 228 | // action to be performed on textarea changed 229 | katex.render(currentVal, $("#out")[0], { 230 | throwOnError: false, 231 | displayMode: true 232 | }); 233 | 234 | if (currentVal == '') { 235 | // Defensively return if the input is empty. 236 | return; 237 | } 238 | 239 | 240 | if ($("#target").width() != $("#out").width()) { 241 | // Return if the element widths are different. 242 | return; 243 | } 244 | 245 | html2canvas($('#target')[0], {}).then(function (targetCanvas) { 246 | $('#out').parent().removeClass("correct"); 247 | let width = targetCanvas.width; 248 | let height = targetCanvas.height; 249 | let targetData = targetCanvas.getContext("2d").getImageData(0, 0, width, height); 250 | let curTarget = $('#problem-title').text(); 251 | html2canvas($('#out')[0], {}).then(function (outCanvas) { 252 | if (outCanvas.width != width || outCanvas.height != height) { 253 | console.log("doesn't match"); 254 | return; 255 | } 256 | let outData = outCanvas.getContext("2d").getImageData(0, 0, width, height); 257 | let diff = pixelmatch(targetData.data, outData.data, undefined, width, height, {threshold: 0.1}); 258 | let result = ""; 259 | console.log("diff is " + diff) 260 | if (diff == 0) { 261 | if (lastTarget == curTarget) { 262 | return; 263 | } 264 | lastTarget = curTarget; 265 | currentScore += problemPoints; 266 | numCorrect += 1; 267 | 268 | // Styling changes 269 | $('#out').parent().addClass("correct"); 270 | $('#user-input').prop("disabled", true); 271 | $("#score").text(currentScore); 272 | 273 | // Load new problem 274 | setTimeout(loadProblem, 1500); 275 | } 276 | }); 277 | }); 278 | } 279 | 280 | // Helper function to escape HTML special characters 281 | function escapeHtml(text) { 282 | return text 283 | .replace(/&/g, "&") 284 | .replace(//g, ">") 286 | .replace(/"/g, """) 287 | .replace(/'/g, "'"); 288 | } 289 | 290 | // Leaderboard functions 291 | async function submitScore(name, score) { 292 | try { 293 | await db.collection('leaderboard').add({ 294 | name: name.trim(), 295 | score: score, 296 | timestamp: firebase.firestore.FieldValue.serverTimestamp() 297 | }); 298 | loadLeaderboard('today'); // Refresh leaderboard after submission 299 | } catch (error) { 300 | console.error("Error submitting score:", error); 301 | } 302 | } 303 | 304 | async function loadLeaderboard(timeRange) { 305 | const leaderboardList = $("#leaderboard-list"); 306 | leaderboardList.empty(); 307 | 308 | try { 309 | let query = db.collection('leaderboard'); 310 | 311 | // Add time constraints based on selected range 312 | const now = new Date(); 313 | if (timeRange === 'today') { 314 | const startOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate()); 315 | query = query.where('timestamp', '>=', startOfDay); 316 | } else if (timeRange === 'month') { 317 | const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1); 318 | query = query.where('timestamp', '>=', startOfMonth); 319 | } 320 | 321 | const snapshot = await query.orderBy('score', 'desc').limit(10).get(); 322 | 323 | if (snapshot.empty) { 324 | leaderboardList.append('

    No scores yet!

    '); 325 | return; 326 | } 327 | 328 | let rank = 1; 329 | snapshot.forEach((doc) => { 330 | const data = doc.data(); 331 | const scoreEntry = ` 332 |
    333 | #${rank} 334 | ${escapeHtml(data.name)} 335 | ${data.score} points 336 |
    337 | `; 338 | leaderboardList.append(scoreEntry); 339 | rank++; 340 | }); 341 | } catch (error) { 342 | console.error("Error loading leaderboard:", error); 343 | leaderboardList.append('

    Error loading leaderboard

    '); 344 | } 345 | } 346 | 347 | // Start by showing the intro. 348 | $(document).ready(function() { 349 | // Handlers 350 | $("#start-button-timed").click(function() { 351 | startGame(true); 352 | }); 353 | 354 | $("#start-button-untimed").click(function() { 355 | startGame(false); 356 | }); 357 | 358 | $("#reset-button-timed").click(function() { 359 | startGame(true); 360 | }); 361 | 362 | $("#reset-button-untimed").click(function() { 363 | startGame(false); 364 | }); 365 | 366 | $("#skip-button").click(function() { 367 | skippedProblems.push(problemNumber - 1); 368 | loadProblem(); 369 | }); 370 | 371 | $("#show-skipped-button").click(function() { 372 | toggleShowSkipped(); 373 | }) 374 | 375 | $("#end-game-button").click(function() { 376 | endGame(); 377 | }); 378 | 379 | $("#user-input").on("change keyup paste", function() { 380 | validateProblem() 381 | }); 382 | 383 | $("#shadow-checkbox").change(_ => { 384 | $("#shadow-target").toggle(); 385 | }); 386 | 387 | $("#l-shadow-checkbox").keydown(e => { 388 | if (e.which == 13 /* enter */) { 389 | $("#shadow-checkbox").prop("checked", !$("#shadow-checkbox").prop("checked")); 390 | $("#shadow-target").toggle(); 391 | } 392 | }); 393 | 394 | // Leaderboard handlers 395 | $("#submit-score").click(function() { 396 | const playerName = $("#player-name").val().trim(); 397 | if (playerName.length === 0) { 398 | alert("Please enter your name"); 399 | return; 400 | } 401 | if (playerName.length > 30) { 402 | alert("Name must be 30 characters or less"); 403 | return; 404 | } 405 | 406 | submitScore(playerName, currentScore); 407 | $("#score-submission").hide(); 408 | }); 409 | 410 | $("#today-scores, #month-scores, #all-time-scores").click(function() { 411 | const timeRange = $(this).attr('id').replace('-scores', ''); 412 | 413 | // Update active button 414 | $(".leaderboard-controls .latex-button").removeClass('active'); 415 | $(this).addClass('active'); 416 | 417 | loadLeaderboard(timeRange); 418 | }); 419 | 420 | $("#play-again-button").click(function() { 421 | showIntro(); 422 | }); 423 | 424 | showIntro(); 425 | }); 426 | -------------------------------------------------------------------------------- /public/assets/lib/katex/katex.min.css: -------------------------------------------------------------------------------- 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} 2 | -------------------------------------------------------------------------------- /public/assets/lib/katex/katex.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable font-family-no-missing-generic-family-keyword */ 2 | @font-face { 3 | font-family: 'KaTeX_AMS'; 4 | 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'); 5 | font-weight: normal; 6 | font-style: normal; 7 | } 8 | @font-face { 9 | font-family: 'KaTeX_Caligraphic'; 10 | 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'); 11 | font-weight: bold; 12 | font-style: normal; 13 | } 14 | @font-face { 15 | font-family: 'KaTeX_Caligraphic'; 16 | 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'); 17 | font-weight: normal; 18 | font-style: normal; 19 | } 20 | @font-face { 21 | font-family: 'KaTeX_Fraktur'; 22 | 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'); 23 | font-weight: bold; 24 | font-style: normal; 25 | } 26 | @font-face { 27 | font-family: 'KaTeX_Fraktur'; 28 | 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'); 29 | font-weight: normal; 30 | font-style: normal; 31 | } 32 | @font-face { 33 | font-family: 'KaTeX_Main'; 34 | 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'); 35 | font-weight: bold; 36 | font-style: normal; 37 | } 38 | @font-face { 39 | font-family: 'KaTeX_Main'; 40 | 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'); 41 | font-weight: bold; 42 | font-style: italic; 43 | } 44 | @font-face { 45 | font-family: 'KaTeX_Main'; 46 | 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'); 47 | font-weight: normal; 48 | font-style: italic; 49 | } 50 | @font-face { 51 | font-family: 'KaTeX_Main'; 52 | 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'); 53 | font-weight: normal; 54 | font-style: normal; 55 | } 56 | @font-face { 57 | font-family: 'KaTeX_Math'; 58 | 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'); 59 | font-weight: bold; 60 | font-style: italic; 61 | } 62 | @font-face { 63 | font-family: 'KaTeX_Math'; 64 | 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'); 65 | font-weight: normal; 66 | font-style: italic; 67 | } 68 | @font-face { 69 | font-family: 'KaTeX_SansSerif'; 70 | 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'); 71 | font-weight: bold; 72 | font-style: normal; 73 | } 74 | @font-face { 75 | font-family: 'KaTeX_SansSerif'; 76 | 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'); 77 | font-weight: normal; 78 | font-style: italic; 79 | } 80 | @font-face { 81 | font-family: 'KaTeX_SansSerif'; 82 | 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'); 83 | font-weight: normal; 84 | font-style: normal; 85 | } 86 | @font-face { 87 | font-family: 'KaTeX_Script'; 88 | 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'); 89 | font-weight: normal; 90 | font-style: normal; 91 | } 92 | @font-face { 93 | font-family: 'KaTeX_Size1'; 94 | 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'); 95 | font-weight: normal; 96 | font-style: normal; 97 | } 98 | @font-face { 99 | font-family: 'KaTeX_Size2'; 100 | 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'); 101 | font-weight: normal; 102 | font-style: normal; 103 | } 104 | @font-face { 105 | font-family: 'KaTeX_Size3'; 106 | 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'); 107 | font-weight: normal; 108 | font-style: normal; 109 | } 110 | @font-face { 111 | font-family: 'KaTeX_Size4'; 112 | 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'); 113 | font-weight: normal; 114 | font-style: normal; 115 | } 116 | @font-face { 117 | font-family: 'KaTeX_Typewriter'; 118 | 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'); 119 | font-weight: normal; 120 | font-style: normal; 121 | } 122 | .katex { 123 | font: normal 1.21em KaTeX_Main, Times New Roman, serif; 124 | line-height: 1.2; 125 | text-indent: 0; 126 | text-rendering: auto; 127 | } 128 | .katex * { 129 | -ms-high-contrast-adjust: none !important; 130 | } 131 | .katex .katex-version::after { 132 | content: "0.10.2"; 133 | } 134 | .katex .katex-mathml { 135 | position: absolute; 136 | clip: rect(1px, 1px, 1px, 1px); 137 | padding: 0; 138 | border: 0; 139 | height: 1px; 140 | width: 1px; 141 | overflow: hidden; 142 | } 143 | .katex .katex-html { 144 | /* \newline is an empty block at top level, between .base elements */ 145 | } 146 | .katex .katex-html > .newline { 147 | display: block; 148 | } 149 | .katex .base { 150 | position: relative; 151 | display: inline-block; 152 | white-space: nowrap; 153 | width: min-content; 154 | } 155 | .katex .strut { 156 | display: inline-block; 157 | } 158 | .katex .textbf { 159 | font-weight: bold; 160 | } 161 | .katex .textit { 162 | font-style: italic; 163 | } 164 | .katex .textrm { 165 | font-family: KaTeX_Main; 166 | } 167 | .katex .textsf { 168 | font-family: KaTeX_SansSerif; 169 | } 170 | .katex .texttt { 171 | font-family: KaTeX_Typewriter; 172 | } 173 | .katex .mathdefault { 174 | font-family: KaTeX_Math; 175 | font-style: italic; 176 | } 177 | .katex .mathit { 178 | font-family: KaTeX_Main; 179 | font-style: italic; 180 | } 181 | .katex .mathrm { 182 | font-style: normal; 183 | } 184 | .katex .mathbf { 185 | font-family: KaTeX_Main; 186 | font-weight: bold; 187 | } 188 | .katex .boldsymbol { 189 | font-family: KaTeX_Math; 190 | font-weight: bold; 191 | font-style: italic; 192 | } 193 | .katex .amsrm { 194 | font-family: KaTeX_AMS; 195 | } 196 | .katex .mathbb, 197 | .katex .textbb { 198 | font-family: KaTeX_AMS; 199 | } 200 | .katex .mathcal { 201 | font-family: KaTeX_Caligraphic; 202 | } 203 | .katex .mathfrak, 204 | .katex .textfrak { 205 | font-family: KaTeX_Fraktur; 206 | } 207 | .katex .mathtt { 208 | font-family: KaTeX_Typewriter; 209 | } 210 | .katex .mathscr, 211 | .katex .textscr { 212 | font-family: KaTeX_Script; 213 | } 214 | .katex .mathsf, 215 | .katex .textsf { 216 | font-family: KaTeX_SansSerif; 217 | } 218 | .katex .mathboldsf, 219 | .katex .textboldsf { 220 | font-family: KaTeX_SansSerif; 221 | font-weight: bold; 222 | } 223 | .katex .mathitsf, 224 | .katex .textitsf { 225 | font-family: KaTeX_SansSerif; 226 | font-style: italic; 227 | } 228 | .katex .mainrm { 229 | font-family: KaTeX_Main; 230 | font-style: normal; 231 | } 232 | .katex .vlist-t { 233 | display: inline-table; 234 | table-layout: fixed; 235 | } 236 | .katex .vlist-r { 237 | display: table-row; 238 | } 239 | .katex .vlist { 240 | display: table-cell; 241 | vertical-align: bottom; 242 | position: relative; 243 | } 244 | .katex .vlist > span { 245 | display: block; 246 | height: 0; 247 | position: relative; 248 | } 249 | .katex .vlist > span > span { 250 | display: inline-block; 251 | } 252 | .katex .vlist > span > .pstrut { 253 | overflow: hidden; 254 | width: 0; 255 | } 256 | .katex .vlist-t2 { 257 | margin-right: -2px; 258 | } 259 | .katex .vlist-s { 260 | display: table-cell; 261 | vertical-align: bottom; 262 | font-size: 1px; 263 | width: 2px; 264 | min-width: 2px; 265 | } 266 | .katex .msupsub { 267 | text-align: left; 268 | } 269 | .katex .mfrac > span > span { 270 | text-align: center; 271 | } 272 | .katex .mfrac .frac-line { 273 | display: inline-block; 274 | width: 100%; 275 | border-bottom-style: solid; 276 | } 277 | .katex .mfrac .frac-line, 278 | .katex .overline .overline-line, 279 | .katex .underline .underline-line, 280 | .katex .hline, 281 | .katex .hdashline, 282 | .katex .rule { 283 | min-height: 1px; 284 | } 285 | .katex .mspace { 286 | display: inline-block; 287 | } 288 | .katex .llap, 289 | .katex .rlap, 290 | .katex .clap { 291 | width: 0; 292 | position: relative; 293 | } 294 | .katex .llap > .inner, 295 | .katex .rlap > .inner, 296 | .katex .clap > .inner { 297 | position: absolute; 298 | } 299 | .katex .llap > .fix, 300 | .katex .rlap > .fix, 301 | .katex .clap > .fix { 302 | display: inline-block; 303 | } 304 | .katex .llap > .inner { 305 | right: 0; 306 | } 307 | .katex .rlap > .inner, 308 | .katex .clap > .inner { 309 | left: 0; 310 | } 311 | .katex .clap > .inner > span { 312 | margin-left: -50%; 313 | margin-right: 50%; 314 | } 315 | .katex .rule { 316 | display: inline-block; 317 | border: solid 0; 318 | position: relative; 319 | } 320 | .katex .overline .overline-line, 321 | .katex .underline .underline-line, 322 | .katex .hline { 323 | display: inline-block; 324 | width: 100%; 325 | border-bottom-style: solid; 326 | } 327 | .katex .hdashline { 328 | display: inline-block; 329 | width: 100%; 330 | border-bottom-style: dashed; 331 | } 332 | .katex .sqrt > .root { 333 | margin-left: 0.27777778em; 334 | margin-right: -0.55555556em; 335 | } 336 | .katex .sizing, 337 | .katex .fontsize-ensurer { 338 | display: inline-block; 339 | } 340 | .katex .sizing.reset-size1.size1, 341 | .katex .fontsize-ensurer.reset-size1.size1 { 342 | font-size: 1em; 343 | } 344 | .katex .sizing.reset-size1.size2, 345 | .katex .fontsize-ensurer.reset-size1.size2 { 346 | font-size: 1.2em; 347 | } 348 | .katex .sizing.reset-size1.size3, 349 | .katex .fontsize-ensurer.reset-size1.size3 { 350 | font-size: 1.4em; 351 | } 352 | .katex .sizing.reset-size1.size4, 353 | .katex .fontsize-ensurer.reset-size1.size4 { 354 | font-size: 1.6em; 355 | } 356 | .katex .sizing.reset-size1.size5, 357 | .katex .fontsize-ensurer.reset-size1.size5 { 358 | font-size: 1.8em; 359 | } 360 | .katex .sizing.reset-size1.size6, 361 | .katex .fontsize-ensurer.reset-size1.size6 { 362 | font-size: 2em; 363 | } 364 | .katex .sizing.reset-size1.size7, 365 | .katex .fontsize-ensurer.reset-size1.size7 { 366 | font-size: 2.4em; 367 | } 368 | .katex .sizing.reset-size1.size8, 369 | .katex .fontsize-ensurer.reset-size1.size8 { 370 | font-size: 2.88em; 371 | } 372 | .katex .sizing.reset-size1.size9, 373 | .katex .fontsize-ensurer.reset-size1.size9 { 374 | font-size: 3.456em; 375 | } 376 | .katex .sizing.reset-size1.size10, 377 | .katex .fontsize-ensurer.reset-size1.size10 { 378 | font-size: 4.148em; 379 | } 380 | .katex .sizing.reset-size1.size11, 381 | .katex .fontsize-ensurer.reset-size1.size11 { 382 | font-size: 4.976em; 383 | } 384 | .katex .sizing.reset-size2.size1, 385 | .katex .fontsize-ensurer.reset-size2.size1 { 386 | font-size: 0.83333333em; 387 | } 388 | .katex .sizing.reset-size2.size2, 389 | .katex .fontsize-ensurer.reset-size2.size2 { 390 | font-size: 1em; 391 | } 392 | .katex .sizing.reset-size2.size3, 393 | .katex .fontsize-ensurer.reset-size2.size3 { 394 | font-size: 1.16666667em; 395 | } 396 | .katex .sizing.reset-size2.size4, 397 | .katex .fontsize-ensurer.reset-size2.size4 { 398 | font-size: 1.33333333em; 399 | } 400 | .katex .sizing.reset-size2.size5, 401 | .katex .fontsize-ensurer.reset-size2.size5 { 402 | font-size: 1.5em; 403 | } 404 | .katex .sizing.reset-size2.size6, 405 | .katex .fontsize-ensurer.reset-size2.size6 { 406 | font-size: 1.66666667em; 407 | } 408 | .katex .sizing.reset-size2.size7, 409 | .katex .fontsize-ensurer.reset-size2.size7 { 410 | font-size: 2em; 411 | } 412 | .katex .sizing.reset-size2.size8, 413 | .katex .fontsize-ensurer.reset-size2.size8 { 414 | font-size: 2.4em; 415 | } 416 | .katex .sizing.reset-size2.size9, 417 | .katex .fontsize-ensurer.reset-size2.size9 { 418 | font-size: 2.88em; 419 | } 420 | .katex .sizing.reset-size2.size10, 421 | .katex .fontsize-ensurer.reset-size2.size10 { 422 | font-size: 3.45666667em; 423 | } 424 | .katex .sizing.reset-size2.size11, 425 | .katex .fontsize-ensurer.reset-size2.size11 { 426 | font-size: 4.14666667em; 427 | } 428 | .katex .sizing.reset-size3.size1, 429 | .katex .fontsize-ensurer.reset-size3.size1 { 430 | font-size: 0.71428571em; 431 | } 432 | .katex .sizing.reset-size3.size2, 433 | .katex .fontsize-ensurer.reset-size3.size2 { 434 | font-size: 0.85714286em; 435 | } 436 | .katex .sizing.reset-size3.size3, 437 | .katex .fontsize-ensurer.reset-size3.size3 { 438 | font-size: 1em; 439 | } 440 | .katex .sizing.reset-size3.size4, 441 | .katex .fontsize-ensurer.reset-size3.size4 { 442 | font-size: 1.14285714em; 443 | } 444 | .katex .sizing.reset-size3.size5, 445 | .katex .fontsize-ensurer.reset-size3.size5 { 446 | font-size: 1.28571429em; 447 | } 448 | .katex .sizing.reset-size3.size6, 449 | .katex .fontsize-ensurer.reset-size3.size6 { 450 | font-size: 1.42857143em; 451 | } 452 | .katex .sizing.reset-size3.size7, 453 | .katex .fontsize-ensurer.reset-size3.size7 { 454 | font-size: 1.71428571em; 455 | } 456 | .katex .sizing.reset-size3.size8, 457 | .katex .fontsize-ensurer.reset-size3.size8 { 458 | font-size: 2.05714286em; 459 | } 460 | .katex .sizing.reset-size3.size9, 461 | .katex .fontsize-ensurer.reset-size3.size9 { 462 | font-size: 2.46857143em; 463 | } 464 | .katex .sizing.reset-size3.size10, 465 | .katex .fontsize-ensurer.reset-size3.size10 { 466 | font-size: 2.96285714em; 467 | } 468 | .katex .sizing.reset-size3.size11, 469 | .katex .fontsize-ensurer.reset-size3.size11 { 470 | font-size: 3.55428571em; 471 | } 472 | .katex .sizing.reset-size4.size1, 473 | .katex .fontsize-ensurer.reset-size4.size1 { 474 | font-size: 0.625em; 475 | } 476 | .katex .sizing.reset-size4.size2, 477 | .katex .fontsize-ensurer.reset-size4.size2 { 478 | font-size: 0.75em; 479 | } 480 | .katex .sizing.reset-size4.size3, 481 | .katex .fontsize-ensurer.reset-size4.size3 { 482 | font-size: 0.875em; 483 | } 484 | .katex .sizing.reset-size4.size4, 485 | .katex .fontsize-ensurer.reset-size4.size4 { 486 | font-size: 1em; 487 | } 488 | .katex .sizing.reset-size4.size5, 489 | .katex .fontsize-ensurer.reset-size4.size5 { 490 | font-size: 1.125em; 491 | } 492 | .katex .sizing.reset-size4.size6, 493 | .katex .fontsize-ensurer.reset-size4.size6 { 494 | font-size: 1.25em; 495 | } 496 | .katex .sizing.reset-size4.size7, 497 | .katex .fontsize-ensurer.reset-size4.size7 { 498 | font-size: 1.5em; 499 | } 500 | .katex .sizing.reset-size4.size8, 501 | .katex .fontsize-ensurer.reset-size4.size8 { 502 | font-size: 1.8em; 503 | } 504 | .katex .sizing.reset-size4.size9, 505 | .katex .fontsize-ensurer.reset-size4.size9 { 506 | font-size: 2.16em; 507 | } 508 | .katex .sizing.reset-size4.size10, 509 | .katex .fontsize-ensurer.reset-size4.size10 { 510 | font-size: 2.5925em; 511 | } 512 | .katex .sizing.reset-size4.size11, 513 | .katex .fontsize-ensurer.reset-size4.size11 { 514 | font-size: 3.11em; 515 | } 516 | .katex .sizing.reset-size5.size1, 517 | .katex .fontsize-ensurer.reset-size5.size1 { 518 | font-size: 0.55555556em; 519 | } 520 | .katex .sizing.reset-size5.size2, 521 | .katex .fontsize-ensurer.reset-size5.size2 { 522 | font-size: 0.66666667em; 523 | } 524 | .katex .sizing.reset-size5.size3, 525 | .katex .fontsize-ensurer.reset-size5.size3 { 526 | font-size: 0.77777778em; 527 | } 528 | .katex .sizing.reset-size5.size4, 529 | .katex .fontsize-ensurer.reset-size5.size4 { 530 | font-size: 0.88888889em; 531 | } 532 | .katex .sizing.reset-size5.size5, 533 | .katex .fontsize-ensurer.reset-size5.size5 { 534 | font-size: 1em; 535 | } 536 | .katex .sizing.reset-size5.size6, 537 | .katex .fontsize-ensurer.reset-size5.size6 { 538 | font-size: 1.11111111em; 539 | } 540 | .katex .sizing.reset-size5.size7, 541 | .katex .fontsize-ensurer.reset-size5.size7 { 542 | font-size: 1.33333333em; 543 | } 544 | .katex .sizing.reset-size5.size8, 545 | .katex .fontsize-ensurer.reset-size5.size8 { 546 | font-size: 1.6em; 547 | } 548 | .katex .sizing.reset-size5.size9, 549 | .katex .fontsize-ensurer.reset-size5.size9 { 550 | font-size: 1.92em; 551 | } 552 | .katex .sizing.reset-size5.size10, 553 | .katex .fontsize-ensurer.reset-size5.size10 { 554 | font-size: 2.30444444em; 555 | } 556 | .katex .sizing.reset-size5.size11, 557 | .katex .fontsize-ensurer.reset-size5.size11 { 558 | font-size: 2.76444444em; 559 | } 560 | .katex .sizing.reset-size6.size1, 561 | .katex .fontsize-ensurer.reset-size6.size1 { 562 | font-size: 0.5em; 563 | } 564 | .katex .sizing.reset-size6.size2, 565 | .katex .fontsize-ensurer.reset-size6.size2 { 566 | font-size: 0.6em; 567 | } 568 | .katex .sizing.reset-size6.size3, 569 | .katex .fontsize-ensurer.reset-size6.size3 { 570 | font-size: 0.7em; 571 | } 572 | .katex .sizing.reset-size6.size4, 573 | .katex .fontsize-ensurer.reset-size6.size4 { 574 | font-size: 0.8em; 575 | } 576 | .katex .sizing.reset-size6.size5, 577 | .katex .fontsize-ensurer.reset-size6.size5 { 578 | font-size: 0.9em; 579 | } 580 | .katex .sizing.reset-size6.size6, 581 | .katex .fontsize-ensurer.reset-size6.size6 { 582 | font-size: 1em; 583 | } 584 | .katex .sizing.reset-size6.size7, 585 | .katex .fontsize-ensurer.reset-size6.size7 { 586 | font-size: 1.2em; 587 | } 588 | .katex .sizing.reset-size6.size8, 589 | .katex .fontsize-ensurer.reset-size6.size8 { 590 | font-size: 1.44em; 591 | } 592 | .katex .sizing.reset-size6.size9, 593 | .katex .fontsize-ensurer.reset-size6.size9 { 594 | font-size: 1.728em; 595 | } 596 | .katex .sizing.reset-size6.size10, 597 | .katex .fontsize-ensurer.reset-size6.size10 { 598 | font-size: 2.074em; 599 | } 600 | .katex .sizing.reset-size6.size11, 601 | .katex .fontsize-ensurer.reset-size6.size11 { 602 | font-size: 2.488em; 603 | } 604 | .katex .sizing.reset-size7.size1, 605 | .katex .fontsize-ensurer.reset-size7.size1 { 606 | font-size: 0.41666667em; 607 | } 608 | .katex .sizing.reset-size7.size2, 609 | .katex .fontsize-ensurer.reset-size7.size2 { 610 | font-size: 0.5em; 611 | } 612 | .katex .sizing.reset-size7.size3, 613 | .katex .fontsize-ensurer.reset-size7.size3 { 614 | font-size: 0.58333333em; 615 | } 616 | .katex .sizing.reset-size7.size4, 617 | .katex .fontsize-ensurer.reset-size7.size4 { 618 | font-size: 0.66666667em; 619 | } 620 | .katex .sizing.reset-size7.size5, 621 | .katex .fontsize-ensurer.reset-size7.size5 { 622 | font-size: 0.75em; 623 | } 624 | .katex .sizing.reset-size7.size6, 625 | .katex .fontsize-ensurer.reset-size7.size6 { 626 | font-size: 0.83333333em; 627 | } 628 | .katex .sizing.reset-size7.size7, 629 | .katex .fontsize-ensurer.reset-size7.size7 { 630 | font-size: 1em; 631 | } 632 | .katex .sizing.reset-size7.size8, 633 | .katex .fontsize-ensurer.reset-size7.size8 { 634 | font-size: 1.2em; 635 | } 636 | .katex .sizing.reset-size7.size9, 637 | .katex .fontsize-ensurer.reset-size7.size9 { 638 | font-size: 1.44em; 639 | } 640 | .katex .sizing.reset-size7.size10, 641 | .katex .fontsize-ensurer.reset-size7.size10 { 642 | font-size: 1.72833333em; 643 | } 644 | .katex .sizing.reset-size7.size11, 645 | .katex .fontsize-ensurer.reset-size7.size11 { 646 | font-size: 2.07333333em; 647 | } 648 | .katex .sizing.reset-size8.size1, 649 | .katex .fontsize-ensurer.reset-size8.size1 { 650 | font-size: 0.34722222em; 651 | } 652 | .katex .sizing.reset-size8.size2, 653 | .katex .fontsize-ensurer.reset-size8.size2 { 654 | font-size: 0.41666667em; 655 | } 656 | .katex .sizing.reset-size8.size3, 657 | .katex .fontsize-ensurer.reset-size8.size3 { 658 | font-size: 0.48611111em; 659 | } 660 | .katex .sizing.reset-size8.size4, 661 | .katex .fontsize-ensurer.reset-size8.size4 { 662 | font-size: 0.55555556em; 663 | } 664 | .katex .sizing.reset-size8.size5, 665 | .katex .fontsize-ensurer.reset-size8.size5 { 666 | font-size: 0.625em; 667 | } 668 | .katex .sizing.reset-size8.size6, 669 | .katex .fontsize-ensurer.reset-size8.size6 { 670 | font-size: 0.69444444em; 671 | } 672 | .katex .sizing.reset-size8.size7, 673 | .katex .fontsize-ensurer.reset-size8.size7 { 674 | font-size: 0.83333333em; 675 | } 676 | .katex .sizing.reset-size8.size8, 677 | .katex .fontsize-ensurer.reset-size8.size8 { 678 | font-size: 1em; 679 | } 680 | .katex .sizing.reset-size8.size9, 681 | .katex .fontsize-ensurer.reset-size8.size9 { 682 | font-size: 1.2em; 683 | } 684 | .katex .sizing.reset-size8.size10, 685 | .katex .fontsize-ensurer.reset-size8.size10 { 686 | font-size: 1.44027778em; 687 | } 688 | .katex .sizing.reset-size8.size11, 689 | .katex .fontsize-ensurer.reset-size8.size11 { 690 | font-size: 1.72777778em; 691 | } 692 | .katex .sizing.reset-size9.size1, 693 | .katex .fontsize-ensurer.reset-size9.size1 { 694 | font-size: 0.28935185em; 695 | } 696 | .katex .sizing.reset-size9.size2, 697 | .katex .fontsize-ensurer.reset-size9.size2 { 698 | font-size: 0.34722222em; 699 | } 700 | .katex .sizing.reset-size9.size3, 701 | .katex .fontsize-ensurer.reset-size9.size3 { 702 | font-size: 0.40509259em; 703 | } 704 | .katex .sizing.reset-size9.size4, 705 | .katex .fontsize-ensurer.reset-size9.size4 { 706 | font-size: 0.46296296em; 707 | } 708 | .katex .sizing.reset-size9.size5, 709 | .katex .fontsize-ensurer.reset-size9.size5 { 710 | font-size: 0.52083333em; 711 | } 712 | .katex .sizing.reset-size9.size6, 713 | .katex .fontsize-ensurer.reset-size9.size6 { 714 | font-size: 0.5787037em; 715 | } 716 | .katex .sizing.reset-size9.size7, 717 | .katex .fontsize-ensurer.reset-size9.size7 { 718 | font-size: 0.69444444em; 719 | } 720 | .katex .sizing.reset-size9.size8, 721 | .katex .fontsize-ensurer.reset-size9.size8 { 722 | font-size: 0.83333333em; 723 | } 724 | .katex .sizing.reset-size9.size9, 725 | .katex .fontsize-ensurer.reset-size9.size9 { 726 | font-size: 1em; 727 | } 728 | .katex .sizing.reset-size9.size10, 729 | .katex .fontsize-ensurer.reset-size9.size10 { 730 | font-size: 1.20023148em; 731 | } 732 | .katex .sizing.reset-size9.size11, 733 | .katex .fontsize-ensurer.reset-size9.size11 { 734 | font-size: 1.43981481em; 735 | } 736 | .katex .sizing.reset-size10.size1, 737 | .katex .fontsize-ensurer.reset-size10.size1 { 738 | font-size: 0.24108004em; 739 | } 740 | .katex .sizing.reset-size10.size2, 741 | .katex .fontsize-ensurer.reset-size10.size2 { 742 | font-size: 0.28929605em; 743 | } 744 | .katex .sizing.reset-size10.size3, 745 | .katex .fontsize-ensurer.reset-size10.size3 { 746 | font-size: 0.33751205em; 747 | } 748 | .katex .sizing.reset-size10.size4, 749 | .katex .fontsize-ensurer.reset-size10.size4 { 750 | font-size: 0.38572806em; 751 | } 752 | .katex .sizing.reset-size10.size5, 753 | .katex .fontsize-ensurer.reset-size10.size5 { 754 | font-size: 0.43394407em; 755 | } 756 | .katex .sizing.reset-size10.size6, 757 | .katex .fontsize-ensurer.reset-size10.size6 { 758 | font-size: 0.48216008em; 759 | } 760 | .katex .sizing.reset-size10.size7, 761 | .katex .fontsize-ensurer.reset-size10.size7 { 762 | font-size: 0.57859209em; 763 | } 764 | .katex .sizing.reset-size10.size8, 765 | .katex .fontsize-ensurer.reset-size10.size8 { 766 | font-size: 0.69431051em; 767 | } 768 | .katex .sizing.reset-size10.size9, 769 | .katex .fontsize-ensurer.reset-size10.size9 { 770 | font-size: 0.83317261em; 771 | } 772 | .katex .sizing.reset-size10.size10, 773 | .katex .fontsize-ensurer.reset-size10.size10 { 774 | font-size: 1em; 775 | } 776 | .katex .sizing.reset-size10.size11, 777 | .katex .fontsize-ensurer.reset-size10.size11 { 778 | font-size: 1.19961427em; 779 | } 780 | .katex .sizing.reset-size11.size1, 781 | .katex .fontsize-ensurer.reset-size11.size1 { 782 | font-size: 0.20096463em; 783 | } 784 | .katex .sizing.reset-size11.size2, 785 | .katex .fontsize-ensurer.reset-size11.size2 { 786 | font-size: 0.24115756em; 787 | } 788 | .katex .sizing.reset-size11.size3, 789 | .katex .fontsize-ensurer.reset-size11.size3 { 790 | font-size: 0.28135048em; 791 | } 792 | .katex .sizing.reset-size11.size4, 793 | .katex .fontsize-ensurer.reset-size11.size4 { 794 | font-size: 0.32154341em; 795 | } 796 | .katex .sizing.reset-size11.size5, 797 | .katex .fontsize-ensurer.reset-size11.size5 { 798 | font-size: 0.36173633em; 799 | } 800 | .katex .sizing.reset-size11.size6, 801 | .katex .fontsize-ensurer.reset-size11.size6 { 802 | font-size: 0.40192926em; 803 | } 804 | .katex .sizing.reset-size11.size7, 805 | .katex .fontsize-ensurer.reset-size11.size7 { 806 | font-size: 0.48231511em; 807 | } 808 | .katex .sizing.reset-size11.size8, 809 | .katex .fontsize-ensurer.reset-size11.size8 { 810 | font-size: 0.57877814em; 811 | } 812 | .katex .sizing.reset-size11.size9, 813 | .katex .fontsize-ensurer.reset-size11.size9 { 814 | font-size: 0.69453376em; 815 | } 816 | .katex .sizing.reset-size11.size10, 817 | .katex .fontsize-ensurer.reset-size11.size10 { 818 | font-size: 0.83360129em; 819 | } 820 | .katex .sizing.reset-size11.size11, 821 | .katex .fontsize-ensurer.reset-size11.size11 { 822 | font-size: 1em; 823 | } 824 | .katex .delimsizing.size1 { 825 | font-family: KaTeX_Size1; 826 | } 827 | .katex .delimsizing.size2 { 828 | font-family: KaTeX_Size2; 829 | } 830 | .katex .delimsizing.size3 { 831 | font-family: KaTeX_Size3; 832 | } 833 | .katex .delimsizing.size4 { 834 | font-family: KaTeX_Size4; 835 | } 836 | .katex .delimsizing.mult .delim-size1 > span { 837 | font-family: KaTeX_Size1; 838 | } 839 | .katex .delimsizing.mult .delim-size4 > span { 840 | font-family: KaTeX_Size4; 841 | } 842 | .katex .nulldelimiter { 843 | display: inline-block; 844 | width: 0.12em; 845 | } 846 | .katex .delimcenter { 847 | position: relative; 848 | } 849 | .katex .op-symbol { 850 | position: relative; 851 | } 852 | .katex .op-symbol.small-op { 853 | font-family: KaTeX_Size1; 854 | } 855 | .katex .op-symbol.large-op { 856 | font-family: KaTeX_Size2; 857 | } 858 | .katex .op-limits > .vlist-t { 859 | text-align: center; 860 | } 861 | .katex .accent > .vlist-t { 862 | text-align: center; 863 | } 864 | .katex .accent .accent-body { 865 | position: relative; 866 | } 867 | .katex .accent .accent-body:not(.accent-full) { 868 | width: 0; 869 | } 870 | .katex .overlay { 871 | display: block; 872 | } 873 | .katex .mtable .vertical-separator { 874 | display: inline-block; 875 | margin: 0 -0.025em; 876 | border-right: 0.05em solid; 877 | min-width: 1px; 878 | } 879 | .katex .mtable .vs-dashed { 880 | border-right: 0.05em dashed; 881 | } 882 | .katex .mtable .arraycolsep { 883 | display: inline-block; 884 | } 885 | .katex .mtable .col-align-c > .vlist-t { 886 | text-align: center; 887 | } 888 | .katex .mtable .col-align-l > .vlist-t { 889 | text-align: left; 890 | } 891 | .katex .mtable .col-align-r > .vlist-t { 892 | text-align: right; 893 | } 894 | .katex .svg-align { 895 | text-align: left; 896 | } 897 | .katex svg { 898 | display: block; 899 | position: absolute; 900 | width: 100%; 901 | height: inherit; 902 | fill: currentColor; 903 | stroke: currentColor; 904 | fill-rule: nonzero; 905 | fill-opacity: 1; 906 | stroke-width: 1; 907 | stroke-linecap: butt; 908 | stroke-linejoin: miter; 909 | stroke-miterlimit: 4; 910 | stroke-dasharray: none; 911 | stroke-dashoffset: 0; 912 | stroke-opacity: 1; 913 | } 914 | .katex svg path { 915 | stroke: none; 916 | } 917 | .katex img { 918 | border-style: none; 919 | min-width: 0; 920 | min-height: 0; 921 | max-width: none; 922 | max-height: none; 923 | } 924 | .katex .stretchy { 925 | width: 100%; 926 | display: block; 927 | position: relative; 928 | overflow: hidden; 929 | } 930 | .katex .stretchy::before, 931 | .katex .stretchy::after { 932 | content: ""; 933 | } 934 | .katex .hide-tail { 935 | width: 100%; 936 | position: relative; 937 | overflow: hidden; 938 | } 939 | .katex .halfarrow-left { 940 | position: absolute; 941 | left: 0; 942 | width: 50.2%; 943 | overflow: hidden; 944 | } 945 | .katex .halfarrow-right { 946 | position: absolute; 947 | right: 0; 948 | width: 50.2%; 949 | overflow: hidden; 950 | } 951 | .katex .brace-left { 952 | position: absolute; 953 | left: 0; 954 | width: 25.1%; 955 | overflow: hidden; 956 | } 957 | .katex .brace-center { 958 | position: absolute; 959 | left: 25%; 960 | width: 50%; 961 | overflow: hidden; 962 | } 963 | .katex .brace-right { 964 | position: absolute; 965 | right: 0; 966 | width: 25.1%; 967 | overflow: hidden; 968 | } 969 | .katex .x-arrow-pad { 970 | padding: 0 0.5em; 971 | } 972 | .katex .x-arrow, 973 | .katex .mover, 974 | .katex .munder { 975 | text-align: center; 976 | } 977 | .katex .boxpad { 978 | padding: 0 0.3em 0 0.3em; 979 | } 980 | .katex .fbox, 981 | .katex .fcolorbox { 982 | box-sizing: border-box; 983 | border: 0.04em solid; 984 | } 985 | .katex .cancel-pad { 986 | padding: 0 0.2em 0 0.2em; 987 | } 988 | .katex .cancel-lap { 989 | margin-left: -0.2em; 990 | margin-right: -0.2em; 991 | } 992 | .katex .sout { 993 | border-bottom-style: solid; 994 | border-bottom-width: 0.08em; 995 | } 996 | .katex-display { 997 | display: block; 998 | margin: 1em 0; 999 | text-align: center; 1000 | } 1001 | .katex-display > .katex { 1002 | display: block; 1003 | text-align: center; 1004 | white-space: nowrap; 1005 | } 1006 | .katex-display > .katex > .katex-html { 1007 | display: block; 1008 | position: relative; 1009 | } 1010 | .katex-display > .katex > .katex-html > .tag { 1011 | position: absolute; 1012 | right: 0; 1013 | } 1014 | .katex-display.leqno > .katex > .katex-html > .tag { 1015 | left: 0; 1016 | right: auto; 1017 | } 1018 | .katex-display.fleqn > .katex { 1019 | text-align: left; 1020 | } 1021 | 1022 | -------------------------------------------------------------------------------- /public/assets/lib/katex/contrib/mhchem.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],e);else{var n="object"==typeof exports?e(require("katex")):e(t.katex);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e);var o=n(0),a=n.n(o);a.a.__defineMacro("\\ce",function(t){return r(t.consumeArgs(1)[0],"ce")}),a.a.__defineMacro("\\pu",function(t){return r(t.consumeArgs(1)[0],"pu")}),a.a.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var r=function(t,e){for(var n="",o=t[t.length-1].loc.start,a=t.length-1;a>=0;a--)t[a].loc.start>o&&(n+=" ",o=t[a].loc.start),n+=t[a].text,o+=t[a].text.length;return c.go(i.go(n,e))},i={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var n,o="0",a={};a.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var r=10,c=[];;){n!==t?(r=10,n=t):r--;var u=i.stateMachines[e],p=u.transitions[o]||u.transitions["*"];t:for(var s=0;s0))return c;if(d.revisit||(t=_.remainder),!d.toContinue)break t}}if(r<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var n=0;n":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]\/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return i.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return i.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var n=i.patterns.findObserveGroups(t,"","$","$","");return n&&(e=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,n,o,a,r,i,c,u,p){var s=function(t,e){if("string"==typeof e)return 0!==t.indexOf(e)?null:e;var n=t.match(e);return n?n[0]:null},_=s(t,e);if(null===_)return null;if(t=t.substr(_.length),null===(_=s(t,n)))return null;var d=function(t,e,n){for(var o=0;e":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var n;if((t.d||"").match(/^[0-9]+$/)){var o=t.d;t.d=void 0,n=this.output(t),t.b=o}else n=this.output(t);return i.actions["o="](t,e),n},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var n=[];return i.concatArray(n,this.output(t)),i.concatArray(n,i.actions.bond(t,e,"-")),n}t.d=e},"- after o/d":function(t,e,n){var o=i.patterns.match_("orbital",t.o||""),a=i.patterns.match_("one lowercase greek letter $",t.o||""),r=i.patterns.match_("one lowercase latin letter $",t.o||""),c=i.patterns.match_("$one lowercase latin letter$ $",t.o||""),u="-"===e&&(o&&""===o.remainder||a||r||c);!u||t.a||t.b||t.p||t.d||t.q||o||!r||(t.o="$"+t.o+"$");var p=[];return u?(i.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(o=i.patterns.match_("digits",t.d||""),n&&o&&""===o.remainder?(i.concatArray(p,i.actions["d="](t,e)),i.concatArray(p,this.output(t))):(i.concatArray(p,this.output(t)),i.concatArray(p,i.actions.bond(t,e,"-")))),p},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:i.go(e,"o")}},comma:function(t,e){var n=e.replace(/\s*$/,"");return n!==e&&0===t.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(t,e,n){var o,a,r;t.r?(a="M"===t.rdt?i.go(t.rd,"tex-math"):"T"===t.rdt?[{type_:"text",p1:t.rd||""}]:i.go(t.rd),r="M"===t.rqt?i.go(t.rq,"tex-math"):"T"===t.rqt?[{type_:"text",p1:t.rq||""}]:i.go(t.rq),o={type_:"arrow",r:t.r,rd:a,rq:r}):(o=[],(t.a||t.b||t.p||t.o||t.q||t.d||n)&&(t.sb&&o.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||2===n?t.o||t.q||t.d||!t.b&&!t.p?t.o&&"kv"===t.dType&&i.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&"kv"===t.dType&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),o.push({type_:"chemfive",a:i.go(t.a,"a"),b:i.go(t.b,"bd"),p:i.go(t.p,"pq"),o:i.go(t.o,"o"),q:i.go(t.q,"pq"),d:i.go(t.d,"oxidation"===t.dType?"oxidation":"bd"),dType:t.dType})));for(var c in t)"parenthesisLevel"!==c&&"beginsWithBond"!==c&&delete t[c];return o},"oxidation-output":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"oxidation")),n.push("}"),n},"frac-output":function(t,e){return{type_:"frac-ce",p1:i.go(e[0]),p2:i.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:i.go(e[0]),p2:i.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:i.go(e[0]),p2:i.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:i.go(e[0]),p2:i.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,n){return{type_:"operator",kind_:n||e}}}},a:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var n in t)delete t[n];return e}}}},pq:{transitions:i.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:i.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"pq")}}}},bd:{transitions:i.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"bd")}}}},oxidation:{transitions:i.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"tex-math tight":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"9,9":{transitions:i.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),e[1]&&(i.concatArray(n,i.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?i.concatArray(n,i.go(e[2],"pu-9,9")):n.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),"e"===e[3]||"*"===e[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),e[3]&&n.push("10^{"+e[5]+"}"),n},"number^":function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),i.concatArray(n,i.go(e[1],"pu-9,9")),n.push("^{"+e[2]+"}"),n},operator:function(t,e,n){return{type_:"operator",kind_:n||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,n=i.patterns.match_("{(...)}",t.d||"");n&&""===n.remainder&&(t.d=n.match_);var o=i.patterns.match_("{(...)}",t.q||"");if(o&&""===o.remainder&&(t.q=o.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:i.go(t.d,"pu"),q:i.go(t.q,"pu")};"//"===t.o?e={type_:"pu-frac",p1:a.d,p2:a.q}:(e=a.d,a.d.length>1||a.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),i.concatArray(e,a.q))}else e=i.go(t.d,"pu-2");for(var r in t)delete t[r];return e}}},"pu-2":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var n=i.patterns.match_("{(...)}",t.rm||"");e=n&&""===n.remainder?i.go(n.match_,"pu"):{type_:"rm",p1:t.rm}}for(var o in t)delete t[o];return e}}},"pu-9,9":{transitions:i.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var n=t.text_.length%3;0===n&&(n=3);for(var o=t.text_.length-3;o>0;o-=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,n)),e.reverse()}else e.push(t.text_);for(var a in t)delete t[a];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var n=t.text_.length-3,o=0;o":case"\u2192":case"\u27f6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"\u21cc":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}}}]).default}); --------------------------------------------------------------------------------