├── .github └── workflows │ └── release.yml ├── .gitignore ├── .vscode ├── keybindings.json ├── latex.code-snippets ├── latex.hsnips ├── settings.json └── utf_latex.hsnips ├── CHANGELOG.md ├── LICENSE ├── README.md ├── _docs ├── README.md ├── SUMMARY.md ├── cheatsheet │ └── cheatsheet.md └── reference │ └── snippets-reference.md ├── book.json ├── cheatsheet.md ├── demo ├── demo-continuity.gif ├── demo-continuity.png ├── demo-dual-basis.gif ├── demo-dual-basis.png ├── demo-math-mode.gif ├── demo-taylor-expansion.gif ├── demo-taylor-expansion.png ├── demo-tensor-isomorphism.gif ├── demo-tensor-isomorphism.png ├── demo-tex.png └── demo.tex ├── docs ├── cheatsheet │ └── cheatsheet.html ├── gitbook │ ├── @honkit │ │ └── honkit-plugin-highlight │ │ │ ├── ebook.css │ │ │ └── website.css │ ├── fonts │ │ └── fontawesome │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ ├── gitbook-plugin-fontsettings │ │ ├── fontsettings.js │ │ └── website.css │ ├── gitbook-plugin-lunr │ │ ├── lunr.min.js │ │ └── search-lunr.js │ ├── gitbook-plugin-search │ │ ├── lunr.min.js │ │ ├── search-engine.js │ │ ├── search.css │ │ └── search.js │ ├── gitbook.js │ ├── honkit-plugin-katex │ │ ├── fonts │ │ │ ├── KaTeX_AMS-Regular.ttf │ │ │ ├── KaTeX_AMS-Regular.woff │ │ │ ├── KaTeX_AMS-Regular.woff2 │ │ │ ├── KaTeX_Caligraphic-Bold.ttf │ │ │ ├── KaTeX_Caligraphic-Bold.woff │ │ │ ├── KaTeX_Caligraphic-Bold.woff2 │ │ │ ├── KaTeX_Caligraphic-Regular.ttf │ │ │ ├── KaTeX_Caligraphic-Regular.woff │ │ │ ├── KaTeX_Caligraphic-Regular.woff2 │ │ │ ├── KaTeX_Fraktur-Bold.ttf │ │ │ ├── KaTeX_Fraktur-Bold.woff │ │ │ ├── KaTeX_Fraktur-Bold.woff2 │ │ │ ├── KaTeX_Fraktur-Regular.ttf │ │ │ ├── KaTeX_Fraktur-Regular.woff │ │ │ ├── KaTeX_Fraktur-Regular.woff2 │ │ │ ├── KaTeX_Main-Bold.ttf │ │ │ ├── KaTeX_Main-Bold.woff │ │ │ ├── KaTeX_Main-Bold.woff2 │ │ │ ├── KaTeX_Main-BoldItalic.ttf │ │ │ ├── KaTeX_Main-BoldItalic.woff │ │ │ ├── KaTeX_Main-BoldItalic.woff2 │ │ │ ├── KaTeX_Main-Italic.ttf │ │ │ ├── KaTeX_Main-Italic.woff │ │ │ ├── KaTeX_Main-Italic.woff2 │ │ │ ├── KaTeX_Main-Regular.ttf │ │ │ ├── KaTeX_Main-Regular.woff │ │ │ ├── KaTeX_Main-Regular.woff2 │ │ │ ├── KaTeX_Math-BoldItalic.ttf │ │ │ ├── KaTeX_Math-BoldItalic.woff │ │ │ ├── KaTeX_Math-BoldItalic.woff2 │ │ │ ├── KaTeX_Math-Italic.ttf │ │ │ ├── KaTeX_Math-Italic.woff │ │ │ ├── KaTeX_Math-Italic.woff2 │ │ │ ├── KaTeX_SansSerif-Bold.ttf │ │ │ ├── KaTeX_SansSerif-Bold.woff │ │ │ ├── KaTeX_SansSerif-Bold.woff2 │ │ │ ├── KaTeX_SansSerif-Italic.ttf │ │ │ ├── KaTeX_SansSerif-Italic.woff │ │ │ ├── KaTeX_SansSerif-Italic.woff2 │ │ │ ├── KaTeX_SansSerif-Regular.ttf │ │ │ ├── KaTeX_SansSerif-Regular.woff │ │ │ ├── KaTeX_SansSerif-Regular.woff2 │ │ │ ├── KaTeX_Script-Regular.ttf │ │ │ ├── KaTeX_Script-Regular.woff │ │ │ ├── KaTeX_Script-Regular.woff2 │ │ │ ├── KaTeX_Size1-Regular.ttf │ │ │ ├── KaTeX_Size1-Regular.woff │ │ │ ├── KaTeX_Size1-Regular.woff2 │ │ │ ├── KaTeX_Size2-Regular.ttf │ │ │ ├── KaTeX_Size2-Regular.woff │ │ │ ├── KaTeX_Size2-Regular.woff2 │ │ │ ├── KaTeX_Size3-Regular.ttf │ │ │ ├── KaTeX_Size3-Regular.woff │ │ │ ├── KaTeX_Size3-Regular.woff2 │ │ │ ├── KaTeX_Size4-Regular.ttf │ │ │ ├── KaTeX_Size4-Regular.woff │ │ │ ├── KaTeX_Size4-Regular.woff2 │ │ │ ├── KaTeX_Typewriter-Regular.ttf │ │ │ ├── KaTeX_Typewriter-Regular.woff │ │ │ └── KaTeX_Typewriter-Regular.woff2 │ │ └── katex.min.css │ ├── images │ │ ├── apple-touch-icon-precomposed-152.png │ │ └── favicon.ico │ ├── style.css │ └── theme.js ├── index.html ├── reference │ └── snippets-reference.html └── search_index.json ├── latex-snippets-for-vscode.code-workspace ├── package-lock.json ├── package.json ├── script └── rename.sh ├── sty ├── commands.sty ├── commands_UTF.sty └── envs.sty └── table-generator ├── .python-version ├── data ├── commands.json └── table-commands.txt ├── package-lock.json ├── poetry.lock ├── pyproject.toml ├── scr └── json2table.py └── usage.md /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Generate release note 2 | on: 3 | pull_request: 4 | branches: 5 | - main 6 | types: 7 | - closed 8 | jobs: 9 | create-release: 10 | runs-on: ubuntu-latest 11 | if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v') 12 | steps: 13 | - uses: actions/checkout@v3 14 | - name: make tag name variable available 15 | run: | 16 | git fetch origin ${{ github.event.pull_request.head.ref }} 17 | git checkout ${{ github.event.pull_request.head.ref }} 18 | echo "TAG_NAME=`echo '${{ github.event.pull_request.head.ref }}' | sed 's/release\///'`" >> $GITHUB_ENV 19 | - name: set tag 20 | run: | 21 | git tag ${{ env.TAG_NAME }} 22 | git push origin ${{ env.TAG_NAME }} 23 | - name: Generate release note 24 | uses: softprops/action-gh-release@v1 25 | with: 26 | name: ${{ env.TAG_NAME }} 27 | tag_name: ${{ env.TAG_NAME }} 28 | body_path: ${{ github.workspace }}/CHANGELOG.md -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.history/ 2 | /node_modules 3 | /**/.venv -------------------------------------------------------------------------------- /.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "alt+l", 4 | "command": "jumpToNextSnippetPlaceholder", 5 | "when": "editorTextFocus && hasNextTabstop && inSnippetMode" 6 | }, 7 | { 8 | "key": "alt+h", 9 | "command": "jumpToPrevSnippetPlaceholder", 10 | "when": "editorTextFocus && hasPrevTabstop && inSnippetMode" 11 | }, 12 | // disable exisiting keybindings if necessary 13 | { 14 | "key": "tab", 15 | "command": "-jumpToNextSnippetPlaceholder", 16 | "when": "editorTextFocus && hasNextTabstop && inSnippetMode" 17 | }, 18 | { 19 | "key": "shift+tab", 20 | "command": "-jumpToPrevSnippetPlaceholder", 21 | "when": "editorTextFocus && hasPrevTabstop && inSnippetMode" 22 | }, 23 | // ---------------- Hyper Snipet extention ---------------- 24 | { 25 | "key": "alt+l", 26 | "command": "hsnips.nextPlaceholder", 27 | "when": "editorTextFocus && hasNextTabstop && inSnippetMode" 28 | }, 29 | { 30 | "key": "alt+h", 31 | "command": "hsnips.prevPlaceholder", 32 | "when": "editorTextFocus && hasPrevTabstop && inSnippetMode" 33 | }, 34 | // disable exisiting keybindings if necessary 35 | { 36 | "key": "tab", 37 | "command": "-hsnips.nextPlaceholder", 38 | "when": "editorTextFocus && hasNextTabstop && inSnippetMode" 39 | }, 40 | { 41 | "key": "shift+tab", 42 | "command": "-hsnips.prevPlaceholder", 43 | "when": "editorTextFocus && hasNextTabstop && inSnippetMode" 44 | }, 45 | ] -------------------------------------------------------------------------------- /.vscode/latex.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | // Place your snippets for latex here. Each snippet is defined under a snippet name and has a prefix, body and 3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 5 | // same ids are connected. 6 | // 7 | // begin environment 8 | "begin/end": { 9 | "prefix": [ 10 | "@beg", 11 | "mbeg" 12 | ], 13 | "body": [ 14 | "\\begin{${1}}", 15 | "$2", 16 | "\\end{${1}}", 17 | "$0" 18 | ] 19 | }, 20 | // for built-in math environment 21 | "begin/end equation": { 22 | "prefix": [ 23 | "@eq", 24 | "eq", 25 | "meq", 26 | ], 27 | "body": [ 28 | "\\begin{equation}", 29 | "$1", 30 | "\\end{equation}", 31 | "$0" 32 | ] 33 | }, 34 | "begin/end void equation": { 35 | "prefix": [ 36 | "@eqv", 37 | "eqv", 38 | "meqv" 39 | ], 40 | "body": [ 41 | "\\begin{equation*}", 42 | "$1", 43 | "\\end{equation*}", 44 | "$0", 45 | ] 46 | }, 47 | "begin/end aligned": { 48 | "prefix": [ 49 | "@ali", 50 | "ali", 51 | "mali" 52 | ], 53 | "body": [ 54 | "\\begin{aligned}", 55 | "$0", 56 | "\\end{aligned}" 57 | ] 58 | }, 59 | "begin/end gather": { 60 | "prefix": [ 61 | "@gat", 62 | "gat", 63 | "mgat", 64 | ], 65 | "body": [ 66 | "\\begin{gather}", 67 | "$0", 68 | "\\end{gather}" 69 | ] 70 | }, 71 | "begin/end gather*": { 72 | "prefix": [ 73 | "@gatv", 74 | "gatv", 75 | "mgatv", 76 | "gav" 77 | ], 78 | "body": [ 79 | "\\begin{gather*}", 80 | "$0", 81 | "\\end{gather*}" 82 | ] 83 | }, 84 | "begin/end cases": { 85 | "prefix": [ 86 | "@cas", 87 | "cas", 88 | "mcas", 89 | ], 90 | "body": [ 91 | "\\begin{cases}", 92 | "$0", 93 | "\\end{cases}" 94 | ] 95 | }, 96 | "begin/end cases*": { 97 | "prefix": [ 98 | "@casv", 99 | "casv", 100 | "mcasv", 101 | "cav" 102 | ], 103 | "body": [ 104 | "\\begin{cases*}", 105 | "$0", 106 | "\\end{cases*}" 107 | ] 108 | }, 109 | "begin/end enumerate": { 110 | "prefix": [ 111 | "@enu", 112 | "enu", 113 | "menu", 114 | "enm", 115 | "menm" 116 | ], 117 | "body": [ 118 | "\\begin{enumerate}", 119 | "$0", 120 | "\\end{enumerate}" 121 | ] 122 | }, 123 | "begin/end enumerate*": { 124 | "prefix": [ 125 | "@enuv", 126 | "enuv", 127 | "menuv", 128 | "enmv", 129 | "menmv", 130 | ], 131 | "body": [ 132 | "\\begin{enumerate*}", 133 | "$0", 134 | "\\end{enumerate*}" 135 | ] 136 | }, 137 | "begin/end itemize": { 138 | "prefix": [ 139 | "@itz", 140 | "mitz", 141 | "itz", 142 | ], 143 | "body": [ 144 | "\\begin{itemize}", 145 | "$0", 146 | "\\end{itemize}" 147 | ] 148 | }, 149 | // for user-defined math environment 150 | "begin/end theorem": { 151 | "prefix": [ 152 | "@thm", 153 | "mthm", 154 | "thm" 155 | ], 156 | "body": [ 157 | "\\begin{thm}", 158 | "$0", 159 | "\\end{thm}" 160 | ] 161 | }, 162 | "begin/end theorem* ": { 163 | "prefix": [ 164 | "@thmv", 165 | "mthmv", 166 | "mthv", 167 | "thmv", 168 | "thv" 169 | ], 170 | "body": [ 171 | "\\begin{thm*}", 172 | "$0", 173 | "\\end{thm*}" 174 | ] 175 | }, 176 | "begin/end corollary": { 177 | "prefix": [ 178 | "@cor", 179 | "mcor", 180 | "cor" 181 | ], 182 | "body": [ 183 | "\\begin{cor}", 184 | "$0", 185 | "\\end{cor}" 186 | ] 187 | }, 188 | "begin/end corollary* ": { 189 | "prefix": [ 190 | "@corv", 191 | "corv", 192 | "mcorv", 193 | ], 194 | "body": [ 195 | "\\begin{cor*}", 196 | "$0", 197 | "\\end{cor*}" 198 | ] 199 | }, 200 | "begin/end example": { 201 | "prefix": [ 202 | "@ex", 203 | "mex", 204 | "ex" 205 | ], 206 | "body": [ 207 | "\\begin{ex}", 208 | "$0", 209 | "\\fin\\end{ex}" 210 | ] 211 | }, 212 | "begin/end example* ": { 213 | "prefix": [ 214 | "@exv", 215 | "mexv", 216 | "exv" 217 | ], 218 | "body": [ 219 | "\\begin{ex*}", 220 | "$0", 221 | "\\fin\\end{ex*}" 222 | ] 223 | }, 224 | "begin/end exercise": { 225 | "prefix": [ 226 | "@exe", 227 | "mexe", 228 | "exe" 229 | ], 230 | "body": [ 231 | "\\begin{exe}", 232 | "$0", 233 | "\\end{exe}" 234 | ] 235 | }, 236 | "begin/end remark": { 237 | "prefix": [ 238 | "@rem", 239 | "rem", 240 | ], 241 | "body": [ 242 | "\\begin{rem}", 243 | "$0", 244 | "\\fin\\end{rem}" 245 | ] 246 | }, 247 | "begin/end remark* ": { 248 | "prefix": [ 249 | "@remv", 250 | "remv", 251 | "rev" 252 | ], 253 | "body": [ 254 | "\\begin{rem*}", 255 | "$0", 256 | "\\fin\\end{rem*}" 257 | ] 258 | }, 259 | "begin/end definition": { 260 | "prefix": [ 261 | "@dfn", 262 | "mdfn", 263 | "dfn" 264 | ], 265 | "body": [ 266 | "\\begin{dfn}", 267 | "$0", 268 | "\\end{dfn}" 269 | ] 270 | }, 271 | "begin/end definition*": { 272 | "prefix": [ 273 | "@dfv", 274 | "mdfv", 275 | "dfv", 276 | "mdfnv", 277 | "dfnv" 278 | ], 279 | "body": [ 280 | "\\begin{dfn*}", 281 | "$0", 282 | "\\end{dfn*}" 283 | ] 284 | }, 285 | "begin/end proposition": { 286 | "prefix": [ 287 | "@prp", 288 | "mprp", 289 | "prp", 290 | ], 291 | "body": [ 292 | "\\begin{prp}", 293 | "$0", 294 | "\\end{prp}" 295 | ] 296 | }, 297 | "begin/end proposition*": { 298 | "prefix": [ 299 | "@prpv", 300 | "@prv", 301 | "prpv", 302 | "prv" 303 | ], 304 | "body": [ 305 | "\\begin{prp*}", 306 | "$0", 307 | "\\end{prp*}" 308 | ] 309 | }, 310 | "begin/end lemma": { 311 | "prefix": [ 312 | "@lem", 313 | "mlem", 314 | "lem", 315 | ], 316 | "body": [ 317 | "\\begin{lem}", 318 | "$0", 319 | "\\end{lem}" 320 | ] 321 | }, 322 | "begin/end lem*": { 323 | "prefix": [ 324 | "@lemv", 325 | "@lev", 326 | "lemv", 327 | "lev" 328 | ], 329 | "body": [ 330 | "\\begin{lem*}", 331 | "$0", 332 | "\\end{lem*}" 333 | ] 334 | }, 335 | "begin/end prf": { 336 | "prefix": [ 337 | "@prf", 338 | "mprf", 339 | "prf" 340 | ], 341 | "body": [ 342 | "\\begin{prf}", 343 | "$0", 344 | "\\end{prf}" 345 | ] 346 | }, 347 | } -------------------------------------------------------------------------------- /.vscode/latex.hsnips: -------------------------------------------------------------------------------- 1 | # `_`: snippet argument, T: trigger key needed 2 | 3 | #-------------------------------------- 4 | # context def | 5 | #-------------------------------------- 6 | 7 | # you don't have to read this unless you are going to customise the math context defined below. 8 | 9 | # information below is based on VSCode v1.81.1 and LaTeX Workshop Extensionv9.13.14. 10 | 11 | # the scope "support.class.math.block.environment" is, in general, inside \begin \end style math environments such as equation as gather. plus, $ $ and \[ \] also has this scope. 12 | # But the scope for some math environments contains the point outside the environments (i.e., its outer boundary). 13 | # the scope "meta.math.block.latex" is, in general, inside major math environments mentioned above plus \( \). 14 | # this scope also has the boundary-inconsistency mentioned above. 15 | # "punctuation.definition.string.begin.latex" and "punctuation.definition.string.end.latex" are also nuisances. the former (and the latter) could be at, in general, just before and just after a math environment starts (and ends, respectively) but the exact realm of its scope depends on individual math environment used. 16 | # So the math context everyone would agreed upon is the union of these math block minus their boundaries, sacrificing the very first and the last point of some math environments. 17 | 18 | # The definition of math contex below is loose in that it does not eliminate "punctuation.definition.string.end.latex" to ensure a wider math environments, taking the risk of the "boundary" problem. 19 | # this definition, in my experience, causes little trouble if you use \( \) and equation (and gather) environment as the primary math environments. 20 | # If you are using $-based math environments, trying a more loose definition would be an option. 21 | 22 | # running "Developer: Inspect Editor Tokens and Scopes" yourself in a tex code to help you understand math context. 23 | 24 | global 25 | function math(context) { 26 | return context.scopes.some(s => s.startsWith("support.class.math.block.environment")) 27 | && context.scopes.some(s => s.startsWith("meta.math.block.latex")) 28 | // comment out below if you would like a more loose math context 29 | && ! context.scopes.some(s => s.startsWith("punctuation.definition.string.begin.latex")) 30 | // uncomment below for a more strict math context 31 | //&& ! context.scopes.some(s => s.startsWith("punctuation.definition.string.end.latex")) 32 | && ! context.scopes.some(s => s.startsWith("comment")); 33 | } 34 | endglobal 35 | 36 | # the definition for math(context) by Hsnips extension 37 | # 38 | # global 39 | # function math(context) { 40 | # return context.scopes.some(s => s.startsWith("meta.math")); 41 | # } 42 | # endglobal 43 | 44 | global 45 | function text(context) { 46 | return !context.scopes.some(s => s.startsWith("meta.math") || s.startsWith("meta.embedded") || s.startsWith("source")); 47 | } 48 | endglobal 49 | 50 | #-------------------------------------- 51 | # Environment | 52 | #-------------------------------------- 53 | 54 | # ;; -> \( \) 55 | snippet ;; " [HS] math inline" A 56 | \( $1 \) $0 57 | endsnippet 58 | 59 | # A;; -> \( A \) 60 | snippet `([\\a-zA-Z]+);;` " [HS] convert math inline" A 61 | `` rv = `\\( ${m[1]} \\)` `` 62 | endsnippet 63 | 64 | # Mp34xb -> 3x4 pMatrix with all components equal to x 65 | # Mp -> \begin{pMatrix} 66 | # Mb -> \begin{pMatrix} etc. 67 | # the last variable [bn] specifies output style. 68 | context math(context) 69 | snippet `M([\ pbvBV])(\d)(\d)(.)([bn])` " [HS] Matrix" A 70 | `` 71 | type = m[1] === ' ' ? '' : m[1] 72 | n = 1 73 | res = `\\begin{${type}matrix}` 74 | res += m[5] == "b" ? "\n" : '' 75 | for (let i = 0; i < m[2]; i++) { 76 | for (let j = 0; j < m[3]; j++) { 77 | res += snip.tabstop(n++, m[4]) 78 | if (j + 1 != m[3]) { 79 | res += " & " 80 | } else { 81 | if (i + 1 != m[2]) { 82 | res += "\\\\\\\\" 83 | } 84 | res += m[5] == "b" ? "\n" : '' 85 | } 86 | } 87 | } 88 | res += `\\end{${type}matrix}` 89 | rv = res 90 | `` 91 | endsnippet 92 | 93 | # lr) -> \left( \right) 94 | # and similarly for ]>}vV 95 | # v and V correspond to vert and Vert 96 | context math(context) 97 | snippet `lr([\)\]\>\}vV])` " [HS] Left-right" A 98 | `` trans = { 99 | ")": [ 100 | "(", 101 | ")" 102 | ], 103 | "]": [ 104 | "[", 105 | "]" 106 | ], 107 | ">": [ 108 | "<", 109 | ">" 110 | ], 111 | "}": [ 112 | "{", 113 | "}" 114 | ], 115 | "v": [ 116 | "\\lvert", 117 | "\\rvert" 118 | ], 119 | "V": [ 120 | "\\lVert", 121 | "\\rVert" 122 | ] 123 | } 124 | rv = `\\left${trans[m[1]][0]} ${snip.tabstop(1)} \\right${trans[m[1]][1]}` `` 125 | endsnippet 126 | 127 | #-------------------------------------- 128 | # Character | 129 | #-------------------------------------- 130 | 131 | # za -> \alpha 132 | # zG -> Gamma 133 | context math(context) 134 | snippet `(? \mathbb{R} 176 | context math(context) 177 | snippet `\b([A-Z])#` " [HS] Math bb" A 178 | `` rv = `\\mathbb{${m[1]}}` `` 179 | endsnippet 180 | 181 | # Acal -> \mathcal{A} 182 | context math(context) 183 | snippet `\b([A-Z])cal` " [HS] Math cal" A 184 | `` rv = `\\mathbb{${m[1]}}` `` 185 | endsnippet 186 | 187 | # A@ -> \mathscr{A} 188 | context math(context) 189 | snippet `\b([A-Z])@` " [HS] Math scr" A 190 | `` rv = `\\mathscr{${m[1]}}` `` 191 | endsnippet 192 | 193 | # adding # transforms mathbb -> mathcal -> mathscr -> mathbb 194 | 195 | # mathbb + # -> mathcal 196 | context math(context) 197 | snippet `\\mathbb{([A-Z])}#` " [HS] mathbb -> mathcal" A 198 | `` rv = `\\mathcal{${m[1]}}` `` 199 | endsnippet 200 | 201 | # \mathcal + # -> mathscr 202 | context math(context) 203 | snippet `\\mathcal{([A-Z])}#` " [HS] mathcal -> mathscr" A 204 | `` rv = `\\mathscr{${m[1]}}` `` 205 | endsnippet 206 | 207 | # \mathscr + # -> mathbb 208 | context math(context) 209 | snippet `\\mathscr{([A-Z])}#` " [HS] mathscr -> mathbb" A 210 | `` rv = `\\mathbb{${m[1]}}` `` 211 | endsnippet 212 | 213 | # \mathbb{R}+ -> \mathbb{R}_+ 214 | context math(context) 215 | snippet `(\\mathbb{[A-Z]})(_[+-])?(\^\*)?([+-])` " [HS] Math bb +/- modifier" A 216 | `` rv = m[1] + "_" + m[4] + (m[3] || "") `` 217 | endsnippet 218 | 219 | # \mathbb{R}* -> \mathbb{R}^* 220 | context math(context) 221 | snippet `(\\mathbb{[A-Z]})(_[+-])?\*` " [HS] Math bb * modifier" A 222 | `` rv = m[1] + (m[2] || "") + "^*" `` 223 | endsnippet 224 | 225 | #-------------------------------------- 226 | # Commands & their Abbreviations | 227 | #-------------------------------------- 228 | 229 | # not in -> \notin 230 | # priority is needed to win "\not \in" 231 | # place before snippet in -> \in 232 | context math(context) 233 | priority 2 234 | snippet `\\not\s(in|ni)` " [HS] Not in Not ni" A 235 | `` rv = `\\not${m[1]} ` `` 236 | endsnippet 237 | 238 | # ad-hoc solution for \int: rewrite \in t -> \int 239 | context math(context) 240 | priority 2 241 | snippet `\\in\st` "[HS] Integral" A 242 | \\int 243 | endsnippet 244 | 245 | # ad-hoc solution for \inf: rewrite \in f -> \inf 246 | context math(context) 247 | priority 2 248 | snippet `\\in\sf` "[HS] Infimum" A 249 | \\inf 250 | endsnippet 251 | 252 | # ad-hoc solution for \interior: rewrite \int e -> \interior 253 | context math(context) 254 | priority 2 255 | snippet `\\int\se` "[HS] Interior" A 256 | \\interior 257 | endsnippet 258 | 259 | # ad-hoc solution for \supp: rewrite \sup p -> \supp 260 | context math(context) 261 | priority 2 262 | snippet `\\sup\sp` "[HS] Support" A 263 | \\supp 264 | endsnippet 265 | 266 | # \sim + eq -> \simeq 267 | context math(context) 268 | priority 2 269 | snippet `\b(?<=\\)(sim|subset|supset|succ|prec)\s{1,2}(neq|eq)` " [HS] \\commands + (n)eq" A 270 | ``rv = `${m[1]}${m[2]} ` `` 271 | endsnippet 272 | 273 | # ker -> \ker 274 | context math(context) 275 | priority 1 276 | snippet `\b(? \bar{} 281 | context math(context) 282 | snippet `\b(? \implies 287 | context math(context) 288 | snippet `\b(? \xrightarrow{} 320 | context math(context) 321 | snippet `\b(? frac{}{} 333 | context math(context) 334 | snippet `\b(? \arcsin {} 344 | context math(context) 345 | snippet `\b(? x_{} 354 | context math(context) 355 | snippet __ " [HS] Subscript" iA 356 | _{$1} $0 357 | endsnippet 358 | 359 | # xsq -> x^2 360 | context math(context) 361 | snippet sq " [HS] Square" A 362 | ^2 363 | endsnippet 364 | 365 | context math(context) 366 | snippet cb " [HS] Cube" A 367 | ^3 368 | endsnippet 369 | 370 | # x inv -> x^{-1} 371 | context math(context) 372 | snippet `\s*?\\in\s?v` " [HS] Inverse" iA 373 | ^{-1} 374 | endsnippet 375 | 376 | # x^^ -> x^{} 377 | # x-- -? x^{} 378 | context math(context) 379 | snippet `--|\^\^` " [HS] Superscript" iA 380 | ^{$1} $0 381 | endsnippet 382 | 383 | # x1 -> x_1 384 | context math(context) 385 | snippet `(\B\\[A-Za-z]+|\b\d*[A-Za-z])(\d)` " [HS] Auto subscript" A 386 | `` rv = m[1] + "_" + m[2] `` 387 | endsnippet 388 | 389 | # x11 -> x_{11} 390 | context math(context) 391 | snippet `(\B\\[A-Za-z]+|\b\d*[A-Za-z])_(\d\d)` " [HS] Auto subscript 2" A 392 | `` rv = `${m[1]}_{${m[2]}}` `` 393 | endsnippet 394 | 395 | # xNN -> x_n 396 | context math(context) 397 | snippet `(\B\\[A-Za-z]+|\b\d*[A-Za-z])([A-Z])\2` " [HS] a_k" A 398 | `` rv = `${m[1]}_${m[2].toLowerCase()}` `` 399 | endsnippet 400 | 401 | # xIImk -> x_{i-k} 402 | # xIIpk -> x_{i+k} 403 | context math(context) 404 | priority 2 405 | snippet `(\B\\[A-Za-z]+|\b\d*[A-Za-z])_([0-9a-zA-Z\_\{\}\-\+\*])(m|p)([0-9a-z])` " [HS] _{k-d}" A 406 | `` trans = {"m": "-", "p": "+"} 407 | rv = `${m[1]}_{${m[2]}${trans[m[3]]}${m[4]}}` `` 408 | endsnippet 409 | 410 | # convert subscript into superscript, and conversely 411 | # x_{i+1}tt -> x^{i+1} 412 | context math(context) 413 | snippet `(\B\\[A-Za-z]+|\b\d*[\\A-Za-z])(_|\^)([0-9a-zA-Z\\\_\{\}\(\)\-\+\*]+)tt` " [HS] x_k -> x^k" A 414 | `` trans = {"_": "^", "^": "_"} 415 | rv = `${m[1]}${trans[m[2]]}${m[3]}` `` 416 | endsnippet 417 | 418 | #-------------------------------------- 419 | # Dots | 420 | #-------------------------------------- 421 | 422 | # x_{i+1},, -> x_{i+1}, \\cdots, x_{i+1} 423 | context math(context) 424 | snippet `(\B\\[A-Za-z]+|\b\d*[\\A-Za-z])(\_|\^)([0-9a-zA-Z\\\_\{\}\(\)\-\+\*]+),,` " [HS] repeat by ldots" wA 425 | `` rv = `${m[1]}${m[2]}${m[3]}, \\ldots, ${m[1]}${m[2]}${m[3]}` `` 426 | endsnippet 427 | 428 | # .. -> \ldots 429 | context math(context) 430 | snippet `\b(? \\(dot type)dots 440 | # sdc -> \cdots 441 | context math(context) 442 | snippet `\b(? \\sum_{i=1}^{\infty} 461 | context math(context) 462 | snippet `\\sum\s?_` " [HS] Sum" A 463 | \\sum_{${1:i}=${2:1}} 464 | endsnippet 465 | 466 | context math(context) 467 | snippet `\\prod\s?_` " [HS] Product" A 468 | \\prod_{${1:i}=${2:1}} 469 | endsnippet 470 | 471 | context math(context) 472 | snippet `\\int\s?_` " [HS] Integral" A 473 | \\int_{$1} 474 | endsnippet 475 | 476 | context math(context) 477 | snippet `\\lim\s?_` " [HS] Limit" A 478 | \\lim_{${1:x} \\to ${2:\infty}} 479 | endsnippet 480 | 481 | # --------- suggestion on "^" --------- 482 | 483 | # \\sum^ -> \\sum_{i=1}^{\infty} 484 | context math(context) 485 | snippet `\\sum\s?\\^` " [HS] Sum" wA 486 | \\sum_{${1:i}=${2:1}}^{${3:\\infty}} 487 | endsnippet 488 | 489 | context math(context) 490 | snippet `\\prod\s?\^` " [HS] Product" wA 491 | \\prod_{${1:i}=${2:1}}^{${3:n}} 492 | endsnippet 493 | 494 | context math(context) 495 | snippet `\\to\s?\^` " [HS] Arrow limit" wA 496 | \\xrightarrow{${1:x} \\to ${2:\infty}} 497 | endsnippet 498 | 499 | context math(context) 500 | snippet `\\int\s?\^` " [HS] Integral" wA 501 | \\int_{${1:-\\infty}}^{${2:\\infty}} 502 | endsnippet 503 | 504 | #-------------------------------------- 505 | # Misc | 506 | #-------------------------------------- 507 | 508 | snippet `\b(? s.startsWith("meta.math")) && !context.scopes.some(s => s.startsWith("comment") || s.startsWith("meta.text.normal.tex")); 6 | } 7 | endglobal 8 | 9 | global 10 | function text(context) { 11 | return !context.scopes.some(s => s.startsWith("meta.math") || s.startsWith("meta.embedded") || s.startsWith("source")); 12 | } 13 | endglobal 14 | 15 | #-------------------------------------- 16 | # Experimental: UTF-characters | 17 | #-------------------------------------- 18 | 19 | # following commands, such as \(utf N), should be defined by yourself 20 | # all utf-snippets begin with "u" 21 | 22 | context math(context) 23 | snippet `\b(?Tab is represented by "|", which is frequently used to jump to the next tab stop. 27 | The point is that we apply various conversions to (a part of) preceding text instead of inputting pre-registered texts. As a result, most input is done without Enter and ←↑→↓. 28 | 29 | Throughout demos, E represents Enter, and braces `{}` are not typed in reality. They are inserted in order to visualize word breaks that are otherwise difficult to see. 30 | 31 | ### demo 1: definition of continuous real function 32 | 33 | `Let U{;;}|be an open subset of {;;}{R#}|.CE A function {;;}f:U to {R#}|is said to be {tit}contnuous at|{;;}{x0}|if for any {;;}{ze}>0|there is {;;}{zd}>0|such that {eqv}{E}{abs}x-x0|<{zd}{imp}{abs}f(x→-f(x0→<{ze}|.`Ctrl+S, where C represents Ctrl. 34 | 35 | ![demo 1][demo-continuity] 36 | ![demo-continuity-png][demo-continuity-png] 37 | 38 | - `U{;;}` at the beginning becomes `\( U \)`. Here `;;` is a function that puts the preceding term into an inline math and puts the cursor next to it. In contrast, `;;` just before `R#` creates an empty inline math but puts the cursor inside it. In this way, the same string of snippet can be defined to behave differently in different situations. 39 | - `R#` turns into `\mathbb{R}`. Here `#` is a function that assigns, to each uppercase alphabet, the corresponding black board character. 40 | - `x0` turns into `x_0`. In this situation, `0`(more precisely, the digits of length <= 2) is a function that equips digit(s) itself to an input. 41 | - `ze` becomes `\epsilon`. In this case, `z` is a function that assigns, to each alphabet, the corresponding Greek letter. 42 | - `eqv` is an ordinary VSCode user-snippets, and the only non-dynamic snippet appearing in our demos, which is defined to be a shortcut for non-numbered equation environment. 43 | 44 | Note that the word "to" in `A function {;;}f:U to {R#}|` is converted to `\to` but not in "is said to be", as expected. 45 | 46 | ### demo 2: dual basis 47 | 48 | `Let {;;}e1{,,}{D}n|be a basis of a vector space V{;;}|and let ;;{lr)}{f1}{tt}{,,}{D}n|be the...`, where D represents Delete. 49 | 50 | ![demo 2][demo-dual-basis] 51 | ![demo-dual-basis-png][demo-dual-basis-png] 52 | 53 | - `e1` turns into `e_1` as before. The two consecutive commas `,,` is a function that repeats the preceding term with `, \ldots,`. The output is `e_1, \ldots, e_1`. 54 | - `lr` is a function and `)` is its argument. `lr)` returns the `\left \right` version of the input. So, in this case, it outputs `\left( \right)`. 55 | - `tt` acting on `f_1` is, of course, a function that turns subscript into superscript (and the inverse of `tt` is `tt` itself). We get `f^1` from `f_1tt`. 56 | 57 | ### demo 3: Taylor expansion of exponential function 58 | 59 | `{eqv}{E}{exp}x= {sum}{_}{n}|||{xNN}{tt}|/n!|{\\}{E}={lim} {_}{n}|| {lr)}1+x/n|{^^}n`Ctrl+S. 60 | 61 | ![demo 3][demo-taylor-expansion] 62 | ![demo-taylor-expansion-png][demo-taylor-expansion-png] 63 | 64 | - Commands with short names such as `\exp` and `\sum` have obvious snippets, i.e., `exp` and `sum`. 65 | - `^` just after `\sum` is a "suggestion" function that auto-completes a typical content that follows. Its default behavior for `\sum` is to suggest `_{i=1}^{\infty}`. So, we have `\sum_{i=1}^{\infty}`. Similarly, `_` for `\lim` is also a suggestion function. 66 | - `xNN` is a friend of `x0`, in that `NN` is a function that equips its lowercase subscript to an input. 67 | - Even `/` is a function, that returns the `\frac` whose numerator is the preceding term. 68 | - Finally, `^^` turns into `^{}`. Note that `^` does not behave as a suggestion function since the preceding term does not belong to the family who wants a suggestion. Instead, it acts simply like a shortcut for `^{}`. 69 | 70 | ### demo 4: Tensor isomorphism 71 | 72 | `;;V {oxx}W {sim}{eq}W {oxx}V|.{E}Indeed, the map ;;V {oxx}W {ni}(x,y→{mpt}(y,x→{in}W {oxx}V| is...`. 73 | 74 | ![demo 4][demo-tensor-isomorphism] 75 | ![demo-tensor-isomorphism-png][demo-tensor-isomorphism-png] 76 | 77 | - `sim` turns into `\sim`, and then `\sim eq` rewrites `\sim` to `\simeq`. `eq` is a rewrite function that adds the suffix "eq" to the preceding commands if it thinks it should. We have many rewrite functions other than `eq`, such as `neq` and `in`. 78 | 79 | ## Snippets Overview 80 | 81 | This repository provides two different types of snippets: static one ([latex.code-snippets][my-code-snippets]) and dynamic one ([latex.hsnips][my-hsnips]). 82 | Our emphasis is on the latter. 83 | 84 | | | Trigger | Interactition | Output | Defined by | 85 | | :-----: | :------------: | :-------------------------: | :--------------------------: | :---------: | 86 | | Static | Text | Yes
(Suggestion to user) | Registered Text | JSON | 87 | | Dynamic | Context & Text | No
(Auto conversion) | Transformation of Input Text | RegExp & JS | 88 | 89 | ### Static Snippets 90 | 91 | The static snippets are just typical VSCode snippets. It consists of snippets for `\begin \end` style math environments, such as `\begin{equation}` and `\begin{proof}`. They can be used everywhere on a tex file. 92 | If you skim through the first section of the cheat sheets and then try some commands such as `eq`, `eqv`, `gat`,`gatv`, you'll know how to use it. 93 | 94 | For instance, 95 | `cas` gets you the suggestion for `\begin{cases} \end{cases}`. 96 | The "v"ed version `casv` gives you the non-numbered cases `\begin{cases*} \end{cases*}`. Here, `v` means "void". The suffix `v` works similarly for other `\begin-\end` style environments. 97 | 98 | One thing to note here about static snippet is that defined snippets `thm`, `dfn` and `prf` etc. do not yield `\begin{theorem}`, `\begin{definition}` and `\begin{proof}` etc. Actually, it yields ALIASes for them such as `\begin{thm}`, `\begin{dfn}` and `\begin{prf}` defined in [envs.sty][envs]. They are expected to be customized according to user preferences, but may of course be used as is. 99 | 100 | ### Dynamic Snippets 101 | 102 | For the practical usage of our dynamic snippets, we refer to the [cheat sheet][cheatsheet] and [snippets reference][my-reference]. If you encounter snippets that are not defined in de facto latex packages, [commands.sty][my-commands] would be your help. 103 | 104 | If you want a hands-on experience, I suggest you try to reproduce the above demos yourself. It's the essence of dynamic snippets in a nutshell. [The demo directory](./demo/) contains a tex file for this exercise. 105 | 106 | #### Math Context 107 | 108 | HyperSnips Extension provides "context", which we use to tell our snippets whether cursor is within a math environment (such as `\(x\)`, `\[ \]` and `\begin-\end{equation}`) or not. 109 | (Technically, it is an array of strings provided through vscode-textmate library.) 110 | Its benefit and limitation are very important to know since it plays a fundamental role in determining the domain of dynamic snippets. 111 | 112 | Triggers for dynamic snippets for math are defined to get active only when we are in a math environment. Here is a demo. The point is that the word "to" is converted to `\to` only when it is typed within a math environment. 113 | 114 | ![demo-math-context][demo-math-context] 115 | 116 | More than 99% of our dynamic snippets are for math. So you may reasonably assume that dynamic snippets are designed to be used like this, but there are trivial exceptions: 117 | 118 | - globally active dynamic snippets 119 | - `;;` for inline math mode `\( \)` 120 | - `tit` and `tbf` for `\textit{}` and `\textbf{}` 121 | 122 | A dynamic snippet for `$ $` is intentionally not defined. More importantly, our dynamic snippets (more precisely, the function `math(context)` in our latex.hsnips) does not recognize `$` based inline math as a math environment. In other words, `$` math inline is not supported. This is not just because `\( \)` is recommended instead of `$`. In fact, `$` based math environments can have a confusing context, and allowing it can cause unintended behavior; for instance, "to" is converted into `\to` outside math environment, which is really annoying. For this reason, I gave it up at least for the current version. (If you are interested, read my comments for `math(context)` function in latex.hsnips file.) 123 | 124 | #### Experimental: UTF Snippets and Commands 125 | 126 | This subsection might be safely skipped. We wrote the following code in demo 4: 127 | 128 | ```tex 129 | % demo 4: tensor isomorphism 130 | \( V \otimes W \simeq W \otimes V \). 131 | Indeed, the map \( V \otimes W \ni x \otimes y \mapsto y \otimes x \in W \otimes V \) is an isomorphism. 132 | ``` 133 | 134 | If we allow ourselves to use UTF character in a command name (this is possible, for instance, with LuaLaTeX and XeLaTeX), then UTF version would look like: 135 | 136 | ```tex 137 | % demo 4 UTF version 138 | % PC browser might fail to render this 139 | \( V \⊗ W \≃ W \otimes V \). 140 | Indeed, the map \( V \⊗ W \∋ x \⊗ y \↦ y \⊗ x \∈ W \⊗ V \) is an isomorphism. 141 | ``` 142 | 143 | But how can we input the characters like `⊗` and `≃` in some reasonable way? 144 | Just use [utf_latex.hsnips][utf-hsnips] and [commands_UTF.sty][my-utf-command]. They contain snippets for UTF commands and the definition of UTF commands. 145 | 146 | We can use many UTF snippets by the simple rule "utf trigger = u + traditional trigger". For instance, `uoxx` -> `\⊗`, `uin` -> `\∈`, but `ueqsim` 147 | -> `\≃` (an exception since we have `simeq` -> $\simeq$). As they are experimental, there are many problems to be solved, such as coverage of UTF characters, consistency of snippets names, and integrability with traditional tools etc. I introduced it here out of curiosity that some readers might be interested in UTF latex coding. 148 | 149 | ## Install 150 | 151 | For static snippets [latex.code-snippets][my-code-snippets], see [Snippets in Visual Studio Code][page-snippets-in-vscode]. 152 | It can be installed locally and globally. 153 | 154 | For dynamic snippets [latex.hsnips][my-hsnips], see [Hypersnips Extension][hsnip-ext]. UTF snippets are enabled just by adding its functions to a properly placed [latex.hsnips][my-hsnips]. (Remember [commands_UTF.sty][my-utf-command] if you compile UTF commands!) 155 | 156 | You might want to turn off other snippets, for instance, those provided by LaTeX Workshop Extension. Then [Control Snippets][control-snip-ext] is useful. 157 | 158 | ## Contribution 159 | 160 | This repository was born as a byproduct of my TeX writing. My main objective has been "write faster". It makes snippets tend to be written for practical convenience rather than perfection, with the excuse that assumed use is limited to a pure interactive process (latex coding) and the risk of bugs is small. This resulted in a lot of code that needed to be fixed. 161 | So suggestion for improvements (whether in the direction of perfection or practical convenience) are REALLY welcome. 162 | 163 | ## References 164 | 165 | - [latex-setup][latex-setup] 166 | - [latex-snippets][latex-snippets] 167 | - [HyperSnips Extension][hsnip-ext] 168 | - [page-snippets-in-vscode][page-snippets-in-vscode] 169 | - [control-snip-ext][control-snip-ext] 170 | 171 | [my-hsnips]:./.vscode/latex.hsnips 172 | [my-code-snippets]:./.vscode/latex.code-snippets 173 | [cheatsheet]:https://shena4746.github.io/latex-snippets-for-vscode/cheatsheet/cheatsheet.html 174 | [my-reference]:https://shena4746.github.io/latex-snippets-for-vscode/reference/snippets-reference.html 175 | [demo-continuity]:https://user-images.githubusercontent.com/87386937/261810044-f974ba47-6877-4e17-a7f3-d3a8a1bb02a8.gif 176 | [demo-dual-basis]:https://user-images.githubusercontent.com/87386937/261810046-91c2cadb-f1db-46d1-908b-179645a450f0.gif 177 | [demo-taylor-expansion]:https://user-images.githubusercontent.com/87386937/261810040-cddb9673-fdda-4377-bf32-b30680cd2cd4.gif 178 | [demo-tensor-isomorphism]:https://user-images.githubusercontent.com/87386937/261844955-016a1701-2755-4122-9fd5-ce86fcf53e51.gif 179 | [demo-math-context]:https://user-images.githubusercontent.com/87386937/261810049-c75e86d4-3d4a-4764-98b0-ac1282a3b992.gif 180 | [demo-continuity-png]:./demo/demo-continuity.png 181 | [demo-dual-basis-png]:./demo/demo-dual-basis.png 182 | [demo-taylor-expansion-png]:./demo/demo-taylor-expansion.png 183 | [demo-tensor-isomorphism-png]:./demo/demo-tensor-isomorphism.png 184 | 185 | [latex-setup]: 186 | [latex-snippets]:https://github.com/Einlar/latex_snippets 187 | [hsnip-ext]: 188 | [page-snippets-in-vscode]:https://code.visualstudio.com/docs/editor/userdefinedsnippets 189 | [control-snip-ext]:https://marketplace.visualstudio.com/items?itemName=svipas.control-snippets 190 | [envs]:./sty/envs.sty 191 | 192 | [my-commands]:./sty/commands.sty 193 | [my-utf-command]:./sty/commands_UTF.sty 194 | [utf-hsnips]:./.vscode/utf_latex.hsnips 195 | [my-japanese-article]:https://zenn.dev/shena46/articles/latex-snippets-vscode 196 | -------------------------------------------------------------------------------- /_docs/README.md: -------------------------------------------------------------------------------- 1 | # Docs for Snippets 2 | 3 | Cheat sheet and reference for snippets in [shena4746's GitHub repository][my-repo]. 4 | 5 | [my-repo]:https://github.com/Shena4746/latex-snippets-for-vscode 6 | -------------------------------------------------------------------------------- /_docs/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | * [Cheat Sheet](cheatsheet/cheatsheet.md) 4 | * [Snippets Reference](reference/snippets-reference.md) 5 | -------------------------------------------------------------------------------- /_docs/cheatsheet/cheatsheet.md: -------------------------------------------------------------------------------- 1 | # CHEAT SHEET 2 | 3 | ## Environments 4 | 5 | ### `\begin \end` 6 | 7 | | snippet | | 8 | | :------ | :-------------------------------------------------- | 9 | | mbeg | `\begin{} \end{}` | 10 | | eq | `\begin{equation}` | 11 | | eqv | `\begin{equation*}` | 12 | | ali | `\begin{aligned}` | 13 | | gat | `\begin{gather}` | 14 | | cas | `\begin{cases}` | 15 | | enm | `\begin{enumerate}` | 16 | | itz | `\begin{itemize}` | 17 | | thm | `\begin{theorem}` | 18 | | prp | `\begin{proposition}` | 19 | | dfn | `\begin{definition}` | 20 | | lem | `\begin{lemma}` | 21 | | prf | `\begin{proof}` | 22 | | ex | `\begin{example}` | 23 | | exe | `\begin{exercise}` | 24 | | rem | `\begin{remark}` | 25 | | Mp34xb | `\begin{pmatrix}` size `3 x 4`, all components `=x` | 26 | | Mb23yb | `\begin{bmatrix}` size `2 x 3`, all components `=y` | 27 | 28 | - Add suffix `v` to get `*` version. 29 | - `Bmatrix`, `vmatrix`, `Vmatrix` are also available. 30 | 31 | ### Misc 32 | 33 | | snippet | | 34 | | :------ | :---------------- | 35 | | ;; | `\( \)` | 36 | | x;; | `\( x \)` | 37 | | lr) | `\left( \right)` | 38 | 39 | - `lr` also works for `]`, `>`, `}`, `v`(vert), `V`(Vert). 40 | 41 | ## Characters 42 | 43 | | snippet | | | 44 | | :----------- | :------------- | :------------- | 45 | | za | `\alpha` | $\alpha$ | 46 | | zG | `Gamma` | $\Gamma$ | 47 | | R# | `\mathbb{R}` | $\mathbb{R}$ | 48 | | Acal | `\mathcal{A}` | $\mathcal{A}$ | 49 | | B@ | `\mathscr{B}` | $\mathscr{B}$ | 50 | | \mathbb{R}# | `\mathcal{R}` | | 51 | | \mathcal{R}# | `\mathscr{R}` | | 52 | | \mathscr{R}# | `\mathbb{R}` | | 53 | | \mathbb{Z}+ | `\mathbb{Z}_+` | $\mathbb{Z}_+$ | 54 | | \mathbb{R}* | `\mathbb{R}^*` | $\mathbb{R}^*$ | 55 | 56 | - adding `#` converts `mathbb` -> `mathcal` -> `mathscr` -> `mathbb` 57 | 58 | ## Subscripts and Superscripts 59 | 60 | | snippet | | 61 | | :-------- | :-------- | 62 | | __ | `_{}` | 63 | | ^^ | `^{}` | 64 | | inv | `^{-1}` | 65 | | x1 | `x_1` | 66 | | x23 | `x_{23}` | 67 | | xNN | `x_n` | 68 | | a_ipk | `a_{i+k}` | 69 | | b_ip1 | `b_{i+1}` | 70 | | a_jmk | `a_{j-k}` | 71 | | b_jm1 | `b_{j-1}` | 72 | | xJJpk | `x_{j+k}` | 73 | | x_{i+1}tt | `x^{i+1}` | 74 | | sq | `^2` | 75 | | cb | `^3` | 76 | 77 | ## Dots 78 | 79 | | snippet | | 80 | | :-------- | :-------------------------- | 81 | | .. | `\ldots` | 82 | | ,. | , `\ldots`, | 83 | | x_{i+1},, | `x_{i+1}, \\ldots, x_{i+1}` | 84 | | sdd | `\ddots` | 85 | | sdv | `\vdots` | 86 | | dc | `\cdot` | 87 | 88 | - sd + \[dvlc\](dot type) -> `\\(dot type)dots` 89 | 90 | ## Math Commands 91 | 92 | ### Commands with Short Names 93 | 94 | For commands of less than or equal to four characters in length, you may assume that their snippets are defined in an obvious way as follows: 95 | 96 | | snippet | | | 97 | | :------ | :------- | :-------- | 98 | | in | `\in` | $\in$ | 99 | | int | `\int` | $\int$ | 100 | | notin | `\notin` | $\notin$ | 101 | | sim | `\sim` | $\sim$ | 102 | | simeq | `\simeq` | $\simeq$ | 103 | | dot | `\dot` | $\dot{x}$ | 104 | 105 | - more than 50 snippets are defined in this way. 106 | 107 | ### Commands with Longer Name 108 | 109 | | snippet | | | 110 | | :------ | :---------------- | :---------------- | 111 | | imp | `\implies` | $\implies$ | 112 | | imb | `\impliedby` | $\impliedby$ | 113 | | ssb | `\subset` | $\subset$ | 114 | | ssp | `\supset` | $\supset$ | 115 | | stm | `\setminus` | $\setminus$ | 116 | | emps | `\emptyset` | $\emptyset$ | 117 | | ee | `\exists` | $\exists$ | 118 | | fa | `\forall` | $\forall$ | 119 | | mpt | `\mapsto` | $\mapsto$ | 120 | | uuto | `\upuparrows` | $\upuparrows$ | 121 | | ddto | `\downdownarrows` | $\downdownarrows$ | 122 | | lra | `\leftrightarrow` | $\leftrightarrow$ | 123 | | Lra | `\Leftrightarrow` | $\Leftrightarrow$ | 124 | | xto | `\xrightarrow` | $\xrightarrow{}$ | 125 | | xot | `\xleftarrow` | $\xleftarrow{}$ | 126 | | oo | `\infty` | $\infty$ | 127 | | asin | `\arcsin` | $\arcsin$ | 128 | | app | `\approx` | $\approx$ | 129 | | xx | `\times` | $\times$ | 130 | | oxx | `\otimes` | $\otimes$ | 131 | | o+ | `\oplus` | $\oplus$ | 132 | | inte | `\interior` | $A^{\circ}$ | 133 | | ovl | `\overline` | $\overline{A}$ | 134 | | uset | `\underset` | | 135 | | oset | `\overset` | | 136 | | ff | `\frac` | $\frac{1}{2}$ | 137 | | tit | `\textit` | $\textit{italic}$ | 138 | | tbf | `\textbf` | $\textbf{bold}$ | 139 | | mrm | `\mathrm` | $\mathrm{MathRoman}$ | 140 | 141 | ### Suggestion 142 | 143 | | snippet | | | 144 | | :------- | :--------------------------- | :--------------------------- | 145 | | \sum _ | `\sum_{i=1}` | $\sum_{i=1}$ | 146 | | \prods _ | `\prod_{i=1}` | $\prod_{i=1}$ | 147 | | \lim _ | `\lim_{x \to \infty}` | $\lim_{x \to \infty}$ | 148 | | \sum ^ | `\sum_{i=1}^{\infty}` | $\sum_{i=1}^{\infty}$ | 149 | | \prods ^ | `\prod_{i=1}^{n}` | $\prod_{i=1}^{n}$ | 150 | | \to ^ | `\xrightarrow{x \to \infty}` | $\xrightarrow{x \to \infty}$ | 151 | | \int ^ | `\int_{\infty}^{\infty}` | $\int_{\infty}^{\infty}$ | 152 | 153 | - `_`: modest suggestion 154 | - `^`: aggressive 155 | -------------------------------------------------------------------------------- /_docs/reference/snippets-reference.md: -------------------------------------------------------------------------------- 1 | # Snippets Reference 2 | 3 | This document is a collection of descriptions for dynamic snippets. 4 | It is not comprehensive but (I think) is sufficient to understand the behavior of non-trivial dynamic snippets. 5 | 6 | - [Snippets Reference](#snippets-reference) 7 | - [Characters](#characters) 8 | - [letter to `\mathxxx{}`](#letter-to-mathxxx) 9 | - [conversion among `\mathxxx{}`](#conversion-among-mathxxx) 10 | - [alphabet to Greek letter](#alphabet-to-greek-letter) 11 | - [Subscripts and Superscripts](#subscripts-and-superscripts) 12 | - [auto-subscript (digit)](#auto-subscript-digit) 13 | - [auto-subscript (lower case alphabet)](#auto-subscript-lower-case-alphabet) 14 | - [modification of subscript](#modification-of-subscript) 15 | - [conversion between subscript and superscript](#conversion-between-subscript-and-superscript) 16 | - [Dots](#dots) 17 | - [repeat with ldots](#repeat-with-ldots) 18 | - [Math Commands](#math-commands) 19 | 20 | ## Characters 21 | 22 | ### letter to `\mathxxx{}` 23 | 24 | - Trigger: an uppercase alphabet (A, for instance) + operator(# or 'cal' or @) 25 | - Output: `\mathbb{A}`, `\mathcal{A}`, `\mathscr{A}`, resp 26 | - Example: 27 | - `R#` -> `\mathbb{R}` 28 | - `Acal` -> `\mathcal{A}` 29 | - `B@` -> `\mathscr{B}` 30 | 31 | ### conversion among `\mathxxx{}` 32 | 33 | - Trigger: `\mathxxx{}` + # 34 | - Output: `\mathbb` -> `\mathcal` -> `\mathscr` -> `\mathbb` 35 | - Example: `\mathbb{A}#` -> `\mathcal{A}` 36 | 37 | ### alphabet to Greek letter 38 | 39 | - Trigger: z + an alphabet 40 | - Output: corresponding greek letter 41 | - Examples: 42 | - `za` -> `\alpha` 43 | - `zG` -> `\Gamma` 44 | 45 | ## Subscripts and Superscripts 46 | 47 | ### auto-subscript (digit) 48 | 49 | - Trigger: (a letter or a command) + (digits of length <= 2) 50 | - Output: letter or command with that subscript 51 | - Examples: 52 | - `x1` -> `x_1` 53 | - `\ell23` -> `\ell_{23}` 54 | 55 | ### auto-subscript (lower case alphabet) 56 | 57 | - Trigger: (X: a letter or a command) + (an uppercase alphabet)×2 58 | - Output: X subscripted by the lowercase alphabet 59 | - Examples: 60 | - `xNN` -> `x_n` 61 | - `qKK` -> `q_k` 62 | 63 | ### modification of subscript 64 | 65 | - Trigger: (a letter or a command with a subscript of depth 1) + (operator "p" or "m") + (value: a lowercase alphabet or a digit) 66 | - Output: add plus or minus value to the subscript 67 | - Examples: 68 | - `x_kp1` -> `x_{k+1}` 69 | - `C_{m}mk` -> `C_{m-k}` 70 | 71 | ### conversion between subscript and superscript 72 | 73 | - Trigger: (a letter or a command with either a subscript or a superscript of depth 1) + tt 74 | - Output: subscript(superscript) is turned to superscript(subscript, resp) 75 | - Example: `A^{\ell+1}tt` -> `A_{\ell+1}`, and conversely. 76 | 77 | ## Dots 78 | 79 | ### repeat with ldots 80 | 81 | - Trigger: (single term not containing a space but space-separated with other terms) + (double comma,,) 82 | - Output: repeat the same term after ", ...," 83 | - Examples 84 | - `A_{i_1}^{j_1}`,, -> `A_{i_1}^{j_1}, \ldots, A_{i_1}^{j_1}` 85 | - `\ell\ell_{i_1}^{j_1},,` does not work as they are not properly separated. 86 | 87 | ## Math Commands 88 | 89 | This category includes numerous snippets. For instance, triggers `le`, `ge`, `div`, `to`, `not`, `in`, `sup`, `inf`, `dim`, `deg`, `ker`, `range`, `grad`, `rot`, `Div`, `rank`, `diag`, `det`, `arg`, `max`, `min`, `argmax`, `argmin`, `sin`, `cos`, `tan`, `cot`, `ln`, `log`, `exp`, `perp`, `cup`, `cap`, `sim`, `pm`, `iff`, `mid`, `Im`, `Re`, `succ`, `prec`, `circ`, `neq`, `ni`, `lim`, `sum`, `prod`, `const`, are defined for their commands (e.g., `le` -> `\le`). 90 | 91 | Moreover, those snippets that begin with `not` and `in` as well as those end with `eq`, `neq` are defined in this way. This category includes `notin`, `simeq`, `subsetneq` etc. (More precisely, the trigger for `\simeq` is defined as `\sim` + eq, not `simeq`. The same is true for the other members.) `supp` also belongs to this category for similar reason. 92 | 93 | There are also a number of abbreviated commands, for instance, `emps` for `\emptyset`, `oo` for `\infty`, and `o+` for `\oplus` and so on. 94 | The cheat sheet has the (nearly?) complete list for the abbreviated, but the best way to get accurate information is to go to definition of snippets, which is always up-to-date. 95 | -------------------------------------------------------------------------------- /book.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": "_docs", 3 | "description": "Docs for Snippets", 4 | "title": "Docs for Snippets", 5 | "structure": { 6 | "readme": "README.md", 7 | "summary": "SUMMARY.md" 8 | }, 9 | "plugins": [ 10 | "katex" 11 | ] 12 | } -------------------------------------------------------------------------------- /cheatsheet.md: -------------------------------------------------------------------------------- 1 | # CHEAT SHEET 2 | 3 | 20 | 21 |
22 | 23 | ## Environments 24 | 25 | ### `\begin \end` 26 | 27 | | snippet | | 28 | | :------ | :-------------------------------------------------- | 29 | | mbeg | `\begin{} \end{}` | 30 | | eq | `\begin{equation}` | 31 | | eqv | `\begin{equation*}` | 32 | | ali | `\begin{aligned}` | 33 | | gat | `\begin{gather}` | 34 | | cas | `\begin{cases}` | 35 | | enm | `\begin{enumerate}` | 36 | | itz | `\begin{itemize}` | 37 | | thm | `\begin{theorem}` | 38 | | prp | `\begin{proposition}` | 39 | | dfn | `\begin{definition}` | 40 | | lem | `\begin{lemma}` | 41 | | prf | `\begin{proof}` | 42 | | ex | `\begin{example}` | 43 | | exe | `\begin{exercise}` | 44 | | rem | `\begin{remark}` | 45 | | Mp34xb | `\begin{pmatrix}` size `3 x 4`, all components `=x` | 46 | | Mb23yb | `\begin{bmatrix}` size `2 x 3`, all components `=y` | 47 | 48 | - Add suffix `v` to get `*` version. 49 | - `Bmatrix`, `vmatrix`, `Vmatrix` are also available. 50 | 51 | ### Misc 52 | 53 | | snippet | | 54 | | :------ | :---------------- | 55 | | ;; | `\( \)` | 56 | | x;; | `\( x \)` | 57 | | lr) | `\left( \right)` | 58 | 59 | - `lr` also works for `]`, `>`, `}`, `v`(vert), `V`(Vert). 60 | 61 | ## Subscripts and Superscripts 62 | 63 | | snippet | | 64 | | :-------- | :-------- | 65 | | __ | `_{}` | 66 | | ^^ | `^{}` | 67 | | inv | `^{-1}` | 68 | | x1 | `x_1` | 69 | | x23 | `x_{23}` | 70 | | xNN | `x_n` | 71 | | a_ipk | `a_{i+k}` | 72 | | b_ip1 | `b_{i+1}` | 73 | | a_jmk | `a_{j-k}` | 74 | | b_jm1 | `b_{j-1}` | 75 | | xJJpk | `x_{j+k}` | 76 | | x_{i+1}tt | `x^{i+1}` | 77 | | sq | `^2` | 78 | | cb | `^3` | 79 | 80 | ## Dots 81 | 82 | | snippet | | 83 | | :-------- | :-------------------------- | 84 | | .. | `\ldots` | 85 | | ,. | , `\ldots`, | 86 | | x_{i+1},, | `x_{i+1}, \\ldots, x_{i+1}` | 87 | | sdd | `\ddots` | 88 | | sdv | `\vdots` | 89 | | dc | `\cdot` | 90 | 91 | - sd + \[dvlc\](dot type) -> `\\(dot type)dots` 92 | 93 |
94 |
95 | 96 | ## Characters 97 | 98 | | snippet | | | 99 | | :----------- | :------------- | :------------- | 100 | | za | `\alpha` | $\alpha$ | 101 | | zG | `Gamma` | $\Gamma$ | 102 | | R# | `\mathbb{R}` | $\mathbb{R}$ | 103 | | Acal | `\mathcal{A}` | $\mathcal{A}$ | 104 | | B@ | `\mathscr{B}` | $\mathscr{B}$ | 105 | | \mathbb{R}# | `\mathcal{R}` | | 106 | | \mathcal{R}# | `\mathscr{R}` | | 107 | | \mathscr{R}# | `\mathbb{R}` | | 108 | | \mathbb{Z}+ | `\mathbb{Z}_+` | $\mathbb{Z}_+$ | 109 | | \mathbb{R}* | `\mathbb{R}^*` | $\mathbb{R}^*$ | 110 | 111 | - adding `#` converts `mathbb` -> `mathcal` -> `mathscr` -> `mathbb` 112 | 113 | ## Math Commands 114 | 115 | ### Commands with Short Names 116 | 117 | For commands of less than or equal to four characters in length, you may assume that their snippets are defined in an obvious way as follows: 118 | 119 | | snippet | | | 120 | | :------ | :------- | :-------- | 121 | | in | `\in` | $\in$ | 122 | | int | `\int` | $\int$ | 123 | | notin | `\notin` | $\notin$ | 124 | | sim | `\sim` | $\sim$ | 125 | | simeq | `\simeq` | $\simeq$ | 126 | | dot | `\dot` | $\dot{x}$ | 127 | 128 | - more than 50 snippets are defined in this way. 129 | 130 | ### Commands with Longer Name 131 | 132 | | snippet | | | 133 | | :------ | :---------------- | :---------------- | 134 | | imp | `\implies` | $\Rightarrow$ | 135 | | imb | `\impliedby` | $\Leftarrow$ | 136 | | ssb | `\subset` | $\subset$ | 137 | | ssp | `\supset` | $\supset$ | 138 | | stm | `\setminus` | $\setminus$ | 139 | | emps | `\emptyset` | $\emptyset$ | 140 | | ee | `\exists` | $\exists$ | 141 | | fa | `\forall` | $\forall$ | 142 | | mpt | `\mapsto` | $\mapsto$ | 143 | | uuto | `\upuparrows` | $\upuparrows$ | 144 | | ddto | `\downdownarrows` | $\downdownarrows$ | 145 | | lra | `\leftrightarrow` | $\leftrightarrow$ | 146 | | Lra | `\Leftrightarrow` | $\Leftrightarrow$ | 147 | | xto | `\xrightarrow` | $\longrightarrow$ | 148 | | xot | `\xleftarrow` | $\longleftarrow$ | 149 | | oo | `\infty` | $\infty$ | 150 | | asin | `\arcsin` | $\arcsin$ | 151 | | app | `\approx` | $\approx$ | 152 | | xx | `\times` | $\times$ | 153 | | oxx | `\otimes` | $\otimes$ | 154 | | o+ | `\oplus` | $\oplus$ | 155 | | inte | `\interior` | $A^{\circ}$ | 156 | | ovl | `\overline` | $\overline{x}$ | 157 | | uset | `\underset` | | 158 | | oset | `\overset` | | 159 | | ff | `\frac` | $\frac{1}{2}$ | 160 | | tit | `\textit` | | 161 | | tbf | `\textbf` | | 162 | | mrm | `\mathrm` | | 163 | 164 | ### Suggestion 165 | 166 | | snippet | | | 167 | | :------- | :----------------------------- | :----------------------- | 168 | | \sum _ | `\sum_{i=1}` | $\sum_{i=1}$ | 169 | | \prods _ | `\prod_{i=1}` | $\prod_{i=1}$ | 170 | | \lim _ | `\lim_{x \to \infty}` | $\lim_{x \to \infty}$ | 171 | | \sum ^ | `\sum_{i=1}^{\infty}` | $\sum_{i=1}^{\infty}$ | 172 | | \prods ^ | `\prod_{i=1}^{n}` | $\prod_{i=1}^{n}$ | 173 | | \to ^ | `\xrightarrow{{x} \to \infty}` | | 174 | | \int ^ | `\int_{\infty}^{\infty}` | $\int_{\infty}^{\infty}$ | 175 | 176 | - `_`: modest suggestion 177 | - `^`: aggressive 178 | 179 |
180 | -------------------------------------------------------------------------------- /demo/demo-continuity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-continuity.gif -------------------------------------------------------------------------------- /demo/demo-continuity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-continuity.png -------------------------------------------------------------------------------- /demo/demo-dual-basis.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-dual-basis.gif -------------------------------------------------------------------------------- /demo/demo-dual-basis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-dual-basis.png -------------------------------------------------------------------------------- /demo/demo-math-mode.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-math-mode.gif -------------------------------------------------------------------------------- /demo/demo-taylor-expansion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-taylor-expansion.gif -------------------------------------------------------------------------------- /demo/demo-taylor-expansion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-taylor-expansion.png -------------------------------------------------------------------------------- /demo/demo-tensor-isomorphism.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-tensor-isomorphism.gif -------------------------------------------------------------------------------- /demo/demo-tensor-isomorphism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-tensor-isomorphism.png -------------------------------------------------------------------------------- /demo/demo-tex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/demo/demo-tex.png -------------------------------------------------------------------------------- /demo/demo.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{commands} 3 | \begin{document} 4 | 5 | % demo 1: def of continuity 6 | Let \( U \) be an open subset of \( \mathbb{R} \). 7 | A function \( f:U \to \mathbb{R} \) is said to be \textit{continuous at } \( x_0 \) if for any \( \epsilon > 0 \) there is \( \delta > 0 \) such that 8 | 9 | \begin{equation*} 10 | \abs{x - x_0} \implies \abs{f(x) - f(x_0)} < \epsilon. 11 | \end{equation*} 12 | 13 | % demo 2: dual basis 14 | Let \( \left( e_1, \ldots, e_n \right) \) be a basis of a vector space \( V \) and let \( \left( f^1, \ldots, f^n \right) \) is the corresponding dual basis. 15 | 16 | % demo 3: taylor expansion 17 | \begin{equation*} 18 | \exp x = \sum_{n = 1}^{\infty} \frac{x^n}{n!} \\ 19 | = \lim_{n \to \infty} \left( 1 + \frac{x}{n} \right)^{n} 20 | \end{equation*} 21 | 22 | %demo 4: tensor isomorphism 23 | \( V \otimes W \simeq W \otimes V \). 24 | Indeed, the map \( V \otimes W \ni x \otimes y \mapsto y \otimes x \in W \otimes V \) is an isomorphism. 25 | 26 | \end{document} -------------------------------------------------------------------------------- /docs/gitbook/@honkit/honkit-plugin-highlight/ebook.css: -------------------------------------------------------------------------------- 1 | pre, 2 | code { 3 | /* From highlight.js@11.8.0/styles/tomorrow.css */ 4 | /*! 5 | Theme: Tomorrow 6 | Author: Chris Kempson (http://chriskempson.com) 7 | License: ~ MIT (or more permissive) [via base16-schemes-source] 8 | Maintainer: @highlightjs/core-team 9 | Version: 2021.09.0 10 | */ 11 | } 12 | pre pre code.hljs, 13 | code pre code.hljs { 14 | display: block; 15 | overflow-x: auto; 16 | padding: 1em; 17 | } 18 | pre code.hljs, 19 | code code.hljs { 20 | padding: 3px 5px; 21 | } 22 | pre .hljs, 23 | code .hljs { 24 | color: #4d4d4c; 25 | background: #fff; 26 | } 27 | pre .hljs ::selection, 28 | code .hljs ::selection, 29 | pre .hljs::selection, 30 | code .hljs::selection { 31 | background-color: #d6d6d6; 32 | color: #4d4d4c; 33 | } 34 | pre .hljs-comment, 35 | code .hljs-comment { 36 | color: #8e908c; 37 | } 38 | pre .hljs-tag, 39 | code .hljs-tag { 40 | color: #969896; 41 | } 42 | pre .hljs-operator, 43 | code .hljs-operator, 44 | pre .hljs-punctuation, 45 | code .hljs-punctuation, 46 | pre .hljs-subst, 47 | code .hljs-subst { 48 | color: #4d4d4c; 49 | } 50 | pre .hljs-operator, 51 | code .hljs-operator { 52 | opacity: 0.7; 53 | } 54 | pre .hljs-bullet, 55 | code .hljs-bullet, 56 | pre .hljs-deletion, 57 | code .hljs-deletion, 58 | pre .hljs-name, 59 | code .hljs-name, 60 | pre .hljs-selector-tag, 61 | code .hljs-selector-tag, 62 | pre .hljs-template-variable, 63 | code .hljs-template-variable, 64 | pre .hljs-variable, 65 | code .hljs-variable { 66 | color: #c82829; 67 | } 68 | pre .hljs-attr, 69 | code .hljs-attr, 70 | pre .hljs-link, 71 | code .hljs-link, 72 | pre .hljs-literal, 73 | code .hljs-literal, 74 | pre .hljs-number, 75 | code .hljs-number, 76 | pre .hljs-symbol, 77 | code .hljs-symbol, 78 | pre .hljs-variable.constant_, 79 | code .hljs-variable.constant_ { 80 | color: #f5871f; 81 | } 82 | pre .hljs-class .hljs-title, 83 | code .hljs-class .hljs-title, 84 | pre .hljs-title, 85 | code .hljs-title, 86 | pre .hljs-title.class_, 87 | code .hljs-title.class_ { 88 | color: #eab700; 89 | } 90 | pre .hljs-strong, 91 | code .hljs-strong { 92 | font-weight: 700; 93 | color: #eab700; 94 | } 95 | pre .hljs-addition, 96 | code .hljs-addition, 97 | pre .hljs-code, 98 | code .hljs-code, 99 | pre .hljs-string, 100 | code .hljs-string, 101 | pre .hljs-title.class_.inherited__, 102 | code .hljs-title.class_.inherited__ { 103 | color: #718c00; 104 | } 105 | pre .hljs-built_in, 106 | code .hljs-built_in, 107 | pre .hljs-doctag, 108 | code .hljs-doctag, 109 | pre .hljs-keyword.hljs-atrule, 110 | code .hljs-keyword.hljs-atrule, 111 | pre .hljs-quote, 112 | code .hljs-quote, 113 | pre .hljs-regexp, 114 | code .hljs-regexp { 115 | color: #3e999f; 116 | } 117 | pre .hljs-attribute, 118 | code .hljs-attribute, 119 | pre .hljs-function .hljs-title, 120 | code .hljs-function .hljs-title, 121 | pre .hljs-section, 122 | code .hljs-section, 123 | pre .hljs-title.function_, 124 | code .hljs-title.function_, 125 | pre .ruby .hljs-property, 126 | code .ruby .hljs-property { 127 | color: #4271ae; 128 | } 129 | pre .diff .hljs-meta, 130 | code .diff .hljs-meta, 131 | pre .hljs-keyword, 132 | code .hljs-keyword, 133 | pre .hljs-template-tag, 134 | code .hljs-template-tag, 135 | pre .hljs-type, 136 | code .hljs-type { 137 | color: #8959a8; 138 | } 139 | pre .hljs-emphasis, 140 | code .hljs-emphasis { 141 | color: #8959a8; 142 | font-style: italic; 143 | } 144 | pre .hljs-meta, 145 | code .hljs-meta, 146 | pre .hljs-meta .hljs-keyword, 147 | code .hljs-meta .hljs-keyword, 148 | pre .hljs-meta .hljs-string, 149 | code .hljs-meta .hljs-string { 150 | color: #a3685a; 151 | } 152 | pre .hljs-meta .hljs-keyword, 153 | code .hljs-meta .hljs-keyword, 154 | pre .hljs-meta-keyword, 155 | code .hljs-meta-keyword { 156 | font-weight: 700; 157 | } 158 | -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/fonts/fontawesome/FontAwesome.otf -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/fonts/fontawesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/fonts/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/gitbook/gitbook-plugin-fontsettings/fontsettings.js: -------------------------------------------------------------------------------- 1 | require(['gitbook', 'jquery'], function(gitbook, $) { 2 | // Configuration 3 | var MAX_SIZE = 4, 4 | MIN_SIZE = 0, 5 | BUTTON_ID; 6 | 7 | // Current fontsettings state 8 | var fontState; 9 | 10 | // Default themes 11 | var THEMES = [ 12 | { 13 | config: 'white', 14 | text: 'White', 15 | id: 0 16 | }, 17 | { 18 | config: 'sepia', 19 | text: 'Sepia', 20 | id: 1 21 | }, 22 | { 23 | config: 'night', 24 | text: 'Night', 25 | id: 2 26 | } 27 | ]; 28 | 29 | // Default font families 30 | var FAMILIES = [ 31 | { 32 | config: 'serif', 33 | text: 'Serif', 34 | id: 0 35 | }, 36 | { 37 | config: 'sans', 38 | text: 'Sans', 39 | id: 1 40 | } 41 | ]; 42 | 43 | // Return configured themes 44 | function getThemes() { 45 | return THEMES; 46 | } 47 | 48 | // Modify configured themes 49 | function setThemes(themes) { 50 | THEMES = themes; 51 | updateButtons(); 52 | } 53 | 54 | // Return configured font families 55 | function getFamilies() { 56 | return FAMILIES; 57 | } 58 | 59 | // Modify configured font families 60 | function setFamilies(families) { 61 | FAMILIES = families; 62 | updateButtons(); 63 | } 64 | 65 | // Save current font settings 66 | function saveFontSettings() { 67 | gitbook.storage.set('fontState', fontState); 68 | update(); 69 | } 70 | 71 | // Increase font size 72 | function enlargeFontSize(e) { 73 | e.preventDefault(); 74 | if (fontState.size >= MAX_SIZE) return; 75 | 76 | fontState.size++; 77 | saveFontSettings(); 78 | } 79 | 80 | // Decrease font size 81 | function reduceFontSize(e) { 82 | e.preventDefault(); 83 | if (fontState.size <= MIN_SIZE) return; 84 | 85 | fontState.size--; 86 | saveFontSettings(); 87 | } 88 | 89 | // Change font family 90 | function changeFontFamily(configName, e) { 91 | if (e && e instanceof Event) { 92 | e.preventDefault(); 93 | } 94 | 95 | var familyId = getFontFamilyId(configName); 96 | fontState.family = familyId; 97 | saveFontSettings(); 98 | } 99 | 100 | // Change type of color theme 101 | function changeColorTheme(configName, e) { 102 | if (e && e instanceof Event) { 103 | e.preventDefault(); 104 | } 105 | 106 | var $book = gitbook.state.$book; 107 | 108 | // Remove currently applied color theme 109 | if (fontState.theme !== 0) 110 | $book.removeClass('color-theme-'+fontState.theme); 111 | 112 | // Set new color theme 113 | var themeId = getThemeId(configName); 114 | fontState.theme = themeId; 115 | if (fontState.theme !== 0) 116 | $book.addClass('color-theme-'+fontState.theme); 117 | 118 | saveFontSettings(); 119 | } 120 | 121 | // Return the correct id for a font-family config key 122 | // Default to first font-family 123 | function getFontFamilyId(configName) { 124 | // Search for plugin configured font family 125 | var configFamily = $.grep(FAMILIES, function(family) { 126 | return family.config == configName; 127 | })[0]; 128 | // Fallback to default font family 129 | return (!!configFamily)? configFamily.id : 0; 130 | } 131 | 132 | // Return the correct id for a theme config key 133 | // Default to first theme 134 | function getThemeId(configName) { 135 | // Search for plugin configured theme 136 | var configTheme = $.grep(THEMES, function(theme) { 137 | return theme.config == configName; 138 | })[0]; 139 | // Fallback to default theme 140 | return (!!configTheme)? configTheme.id : 0; 141 | } 142 | 143 | function update() { 144 | var $book = gitbook.state.$book; 145 | 146 | $('.font-settings .font-family-list li').removeClass('active'); 147 | $('.font-settings .font-family-list li:nth-child('+(fontState.family+1)+')').addClass('active'); 148 | 149 | $book[0].className = $book[0].className.replace(/\bfont-\S+/g, ''); 150 | $book.addClass('font-size-'+fontState.size); 151 | $book.addClass('font-family-'+fontState.family); 152 | 153 | if(fontState.theme !== 0) { 154 | $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, ''); 155 | $book.addClass('color-theme-'+fontState.theme); 156 | } 157 | } 158 | 159 | function init(config) { 160 | // Search for plugin configured font family 161 | var configFamily = getFontFamilyId(config.family), 162 | configTheme = getThemeId(config.theme); 163 | 164 | // Instantiate font state object 165 | fontState = gitbook.storage.get('fontState', { 166 | size: config.size || 2, 167 | family: configFamily, 168 | theme: configTheme 169 | }); 170 | 171 | update(); 172 | } 173 | 174 | function updateButtons() { 175 | // Remove existing fontsettings buttons 176 | if (!!BUTTON_ID) { 177 | gitbook.toolbar.removeButton(BUTTON_ID); 178 | } 179 | 180 | // Create buttons in toolbar 181 | BUTTON_ID = gitbook.toolbar.createButton({ 182 | icon: 'fa fa-font', 183 | label: 'Font Settings', 184 | className: 'font-settings', 185 | dropdown: [ 186 | [ 187 | { 188 | text: 'A', 189 | className: 'font-reduce', 190 | onClick: reduceFontSize 191 | }, 192 | { 193 | text: 'A', 194 | className: 'font-enlarge', 195 | onClick: enlargeFontSize 196 | } 197 | ], 198 | $.map(FAMILIES, function(family) { 199 | family.onClick = function(e) { 200 | return changeFontFamily(family.config, e); 201 | }; 202 | 203 | return family; 204 | }), 205 | $.map(THEMES, function(theme) { 206 | theme.onClick = function(e) { 207 | return changeColorTheme(theme.config, e); 208 | }; 209 | 210 | return theme; 211 | }) 212 | ] 213 | }); 214 | } 215 | 216 | // Init configuration at start 217 | gitbook.events.bind('start', function(e, config) { 218 | var opts = config.fontsettings; 219 | 220 | // Generate buttons at start 221 | updateButtons(); 222 | 223 | // Init current settings 224 | init(opts); 225 | }); 226 | 227 | // Expose API 228 | gitbook.fontsettings = { 229 | enlargeFontSize: enlargeFontSize, 230 | reduceFontSize: reduceFontSize, 231 | setTheme: changeColorTheme, 232 | setFamily: changeFontFamily, 233 | getThemes: getThemes, 234 | setThemes: setThemes, 235 | getFamilies: getFamilies, 236 | setFamilies: setFamilies 237 | }; 238 | }); 239 | 240 | 241 | -------------------------------------------------------------------------------- /docs/gitbook/gitbook-plugin-fontsettings/website.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Theme 1 3 | */ 4 | .color-theme-1 .dropdown-menu { 5 | background-color: #111111; 6 | border-color: #7e888b; 7 | } 8 | .color-theme-1 .dropdown-menu .dropdown-caret .caret-inner { 9 | border-bottom: 9px solid #111111; 10 | } 11 | .color-theme-1 .dropdown-menu .buttons { 12 | border-color: #7e888b; 13 | } 14 | .color-theme-1 .dropdown-menu .button { 15 | color: #afa790; 16 | } 17 | .color-theme-1 .dropdown-menu .button:hover { 18 | color: #73553c; 19 | } 20 | /* 21 | * Theme 2 22 | */ 23 | .color-theme-2 .dropdown-menu { 24 | background-color: #2d3143; 25 | border-color: #272a3a; 26 | } 27 | .color-theme-2 .dropdown-menu .dropdown-caret .caret-inner { 28 | border-bottom: 9px solid #2d3143; 29 | } 30 | .color-theme-2 .dropdown-menu .buttons { 31 | border-color: #272a3a; 32 | } 33 | .color-theme-2 .dropdown-menu .button { 34 | color: #62677f; 35 | } 36 | .color-theme-2 .dropdown-menu .button:hover { 37 | color: #f4f4f5; 38 | } 39 | .book .book-header .font-settings .font-enlarge { 40 | line-height: 30px; 41 | font-size: 1.4em; 42 | } 43 | .book .book-header .font-settings .font-reduce { 44 | line-height: 30px; 45 | font-size: 1em; 46 | } 47 | .book.color-theme-1 .book-body { 48 | color: #704214; 49 | background: #f3eacb; 50 | } 51 | .book.color-theme-1 .book-body .page-wrapper .page-inner section { 52 | background: #f3eacb; 53 | } 54 | .book.color-theme-2 .book-body { 55 | color: #bdcadb; 56 | background: #1c1f2b; 57 | } 58 | .book.color-theme-2 .book-body .page-wrapper .page-inner section { 59 | background: #1c1f2b; 60 | } 61 | .book.font-size-0 .book-body .page-inner section { 62 | font-size: 1.2rem; 63 | } 64 | .book.font-size-1 .book-body .page-inner section { 65 | font-size: 1.4rem; 66 | } 67 | .book.font-size-2 .book-body .page-inner section { 68 | font-size: 1.6rem; 69 | } 70 | .book.font-size-3 .book-body .page-inner section { 71 | font-size: 2.2rem; 72 | } 73 | .book.font-size-4 .book-body .page-inner section { 74 | font-size: 4rem; 75 | } 76 | .book.font-family-0 { 77 | font-family: Georgia, serif; 78 | } 79 | .book.font-family-1 { 80 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 81 | } 82 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal { 83 | color: #704214; 84 | } 85 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a { 86 | color: inherit; 87 | } 88 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, 89 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2, 90 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3, 91 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4, 92 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5, 93 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { 94 | color: inherit; 95 | } 96 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, 97 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 { 98 | border-color: inherit; 99 | } 100 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { 101 | color: inherit; 102 | } 103 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr { 104 | background-color: inherit; 105 | } 106 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote { 107 | border-color: inherit; 108 | } 109 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre, 110 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code { 111 | background: #fdf6e3; 112 | color: #657b83; 113 | border-color: #f8df9c; 114 | } 115 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight { 116 | background-color: inherit; 117 | } 118 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th, 119 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td { 120 | border-color: #f5d06c; 121 | } 122 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr { 123 | color: inherit; 124 | background-color: #fdf6e3; 125 | border-color: #444444; 126 | } 127 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { 128 | background-color: #fbeecb; 129 | } 130 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal { 131 | color: #bdcadb; 132 | } 133 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a { 134 | color: #3eb1d0; 135 | } 136 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, 137 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2, 138 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3, 139 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4, 140 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5, 141 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { 142 | color: #fffffa; 143 | } 144 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, 145 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 { 146 | border-color: #373b4e; 147 | } 148 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { 149 | color: #373b4e; 150 | } 151 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr { 152 | background-color: #373b4e; 153 | } 154 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote { 155 | border-color: #373b4e; 156 | } 157 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre, 158 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code { 159 | color: #9dbed8; 160 | background: #2d3143; 161 | border-color: #2d3143; 162 | } 163 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight { 164 | background-color: #282a39; 165 | } 166 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th, 167 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td { 168 | border-color: #3b3f54; 169 | } 170 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr { 171 | color: #b6c2d2; 172 | background-color: #2d3143; 173 | border-color: #3b3f54; 174 | } 175 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { 176 | background-color: #35394b; 177 | } 178 | .book.color-theme-1 .book-header { 179 | color: #afa790; 180 | background: transparent; 181 | } 182 | .book.color-theme-1 .book-header .btn { 183 | color: #afa790; 184 | } 185 | .book.color-theme-1 .book-header .btn:hover { 186 | color: #73553c; 187 | background: none; 188 | } 189 | .book.color-theme-1 .book-header h1 { 190 | color: #704214; 191 | } 192 | .book.color-theme-2 .book-header { 193 | color: #7e888b; 194 | background: transparent; 195 | } 196 | .book.color-theme-2 .book-header .btn { 197 | color: #3b3f54; 198 | } 199 | .book.color-theme-2 .book-header .btn:hover { 200 | color: #fffff5; 201 | background: none; 202 | } 203 | .book.color-theme-2 .book-header h1 { 204 | color: #bdcadb; 205 | } 206 | .book.color-theme-1 .book-body .navigation { 207 | color: #afa790; 208 | } 209 | .book.color-theme-1 .book-body .navigation:hover { 210 | color: #73553c; 211 | } 212 | .book.color-theme-2 .book-body .navigation { 213 | color: #383f52; 214 | } 215 | .book.color-theme-2 .book-body .navigation:hover { 216 | color: #fffff5; 217 | } 218 | /* 219 | * Theme 1 220 | */ 221 | .book.color-theme-1 .book-summary { 222 | color: #afa790; 223 | background: #111111; 224 | border-right: 1px solid rgba(0, 0, 0, 0.07); 225 | } 226 | .book.color-theme-1 .book-summary .book-search { 227 | background: transparent; 228 | } 229 | .book.color-theme-1 .book-summary .book-search input, 230 | .book.color-theme-1 .book-summary .book-search input:focus { 231 | border: 1px solid transparent; 232 | } 233 | .book.color-theme-1 .book-summary ul.summary li.divider { 234 | background: #7e888b; 235 | box-shadow: none; 236 | } 237 | .book.color-theme-1 .book-summary ul.summary li i.fa-check { 238 | color: #33cc33; 239 | } 240 | .book.color-theme-1 .book-summary ul.summary li.done > a { 241 | color: #877f6a; 242 | } 243 | .book.color-theme-1 .book-summary ul.summary li a, 244 | .book.color-theme-1 .book-summary ul.summary li span { 245 | color: #877f6a; 246 | background: transparent; 247 | font-weight: normal; 248 | } 249 | .book.color-theme-1 .book-summary ul.summary li.active > a, 250 | .book.color-theme-1 .book-summary ul.summary li a:hover { 251 | color: #704214; 252 | background: transparent; 253 | font-weight: normal; 254 | } 255 | /* 256 | * Theme 2 257 | */ 258 | .book.color-theme-2 .book-summary { 259 | color: #bcc1d2; 260 | background: #2d3143; 261 | border-right: none; 262 | } 263 | .book.color-theme-2 .book-summary .book-search { 264 | background: transparent; 265 | } 266 | .book.color-theme-2 .book-summary .book-search input, 267 | .book.color-theme-2 .book-summary .book-search input:focus { 268 | border: 1px solid transparent; 269 | } 270 | .book.color-theme-2 .book-summary ul.summary li.divider { 271 | background: #272a3a; 272 | box-shadow: none; 273 | } 274 | .book.color-theme-2 .book-summary ul.summary li i.fa-check { 275 | color: #33cc33; 276 | } 277 | .book.color-theme-2 .book-summary ul.summary li.done > a { 278 | color: #62687f; 279 | } 280 | .book.color-theme-2 .book-summary ul.summary li a, 281 | .book.color-theme-2 .book-summary ul.summary li span { 282 | color: #c1c6d7; 283 | background: transparent; 284 | font-weight: 600; 285 | } 286 | .book.color-theme-2 .book-summary ul.summary li.active > a, 287 | .book.color-theme-2 .book-summary ul.summary li a:hover { 288 | color: #f4f4f5; 289 | background: #252737; 290 | font-weight: 600; 291 | } 292 | -------------------------------------------------------------------------------- /docs/gitbook/gitbook-plugin-lunr/lunr.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.12 3 | * Copyright (C) 2015 Oliver Nightingale 4 | * MIT Licensed 5 | * @license 6 | */ 7 | !function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.5.12",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(t){return arguments.length&&null!=t&&void 0!=t?Array.isArray(t)?t.map(function(t){return t.toLowerCase()}):t.toString().trim().toLowerCase().split(/[\s\-]+/):[]},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,o=0;n>o;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;no;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n element for each result 48 | res.results.forEach(function(res) { 49 | var $li = $('
  • ', { 50 | 'class': 'search-results-item' 51 | }); 52 | 53 | var $title = $('

    '); 54 | 55 | var $link = $('', { 56 | 'href': gitbook.state.basePath + '/' + res.url, 57 | 'text': res.title 58 | }); 59 | 60 | var content = res.body.trim(); 61 | if (content.length > MAX_DESCRIPTION_SIZE) { 62 | content = content.slice(0, MAX_DESCRIPTION_SIZE).trim()+'...'; 63 | } 64 | var $content = $('

    ').html(content); 65 | 66 | $link.appendTo($title); 67 | $title.appendTo($li); 68 | $content.appendTo($li); 69 | $li.appendTo($searchList); 70 | }); 71 | } 72 | 73 | function launchSearch(q) { 74 | // Add class for loading 75 | $body.addClass('with-search'); 76 | $body.addClass('search-loading'); 77 | 78 | // Launch search query 79 | throttle(gitbook.search.query(q, 0, MAX_RESULTS) 80 | .then(function(results) { 81 | displayResults(results); 82 | }) 83 | .always(function() { 84 | $body.removeClass('search-loading'); 85 | }), 1000); 86 | } 87 | 88 | function closeSearch() { 89 | $body.removeClass('with-search'); 90 | $bookSearchResults.removeClass('open'); 91 | } 92 | 93 | function launchSearchFromQueryString() { 94 | var q = getParameterByName('q'); 95 | if (q && q.length > 0) { 96 | // Update search input 97 | $searchInput.val(q); 98 | 99 | // Launch search 100 | launchSearch(q); 101 | } 102 | } 103 | 104 | function bindSearch() { 105 | // Bind DOM 106 | $searchInput = $('#book-search-input input'); 107 | $bookSearchResults = $('#book-search-results'); 108 | $searchList = $bookSearchResults.find('.search-results-list'); 109 | $searchTitle = $bookSearchResults.find('.search-results-title'); 110 | $searchResultsCount = $searchTitle.find('.search-results-count'); 111 | $searchQuery = $searchTitle.find('.search-query'); 112 | 113 | // Launch query based on input content 114 | function handleUpdate() { 115 | var q = $searchInput.val(); 116 | 117 | if (q.length == 0) { 118 | closeSearch(); 119 | } 120 | else { 121 | launchSearch(q); 122 | } 123 | } 124 | 125 | // Detect true content change in search input 126 | // Workaround for IE < 9 127 | var propertyChangeUnbound = false; 128 | $searchInput.on('propertychange', function(e) { 129 | if (e.originalEvent.propertyName == 'value') { 130 | handleUpdate(); 131 | } 132 | }); 133 | 134 | // HTML5 (IE9 & others) 135 | $searchInput.on('input', function(e) { 136 | // Unbind propertychange event for IE9+ 137 | if (!propertyChangeUnbound) { 138 | $(this).unbind('propertychange'); 139 | propertyChangeUnbound = true; 140 | } 141 | 142 | handleUpdate(); 143 | }); 144 | 145 | // Push to history on blur 146 | $searchInput.on('blur', function(e) { 147 | // Update history state 148 | if (usePushState) { 149 | var uri = updateQueryString('q', $(this).val()); 150 | history.pushState({ path: uri }, null, uri); 151 | } 152 | }); 153 | } 154 | 155 | gitbook.events.on('page.change', function() { 156 | bindSearch(); 157 | closeSearch(); 158 | 159 | // Launch search based on query parameter 160 | if (gitbook.search.isInitialized()) { 161 | launchSearchFromQueryString(); 162 | } 163 | }); 164 | 165 | gitbook.events.on('search.ready', function() { 166 | bindSearch(); 167 | 168 | // Launch search from query param at start 169 | launchSearchFromQueryString(); 170 | }); 171 | 172 | function getParameterByName(name) { 173 | var url = window.location.href; 174 | name = name.replace(/[\[\]]/g, '\\$&'); 175 | var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'), 176 | results = regex.exec(url); 177 | if (!results) return null; 178 | if (!results[2]) return ''; 179 | return decodeURIComponent(results[2].replace(/\+/g, ' ')); 180 | } 181 | 182 | function updateQueryString(key, value) { 183 | value = encodeURIComponent(value); 184 | 185 | var url = window.location.href; 186 | var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'), 187 | hash; 188 | 189 | if (re.test(url)) { 190 | if (typeof value !== 'undefined' && value !== null) 191 | return url.replace(re, '$1' + key + '=' + value + '$2$3'); 192 | else { 193 | hash = url.split('#'); 194 | url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, ''); 195 | if (typeof hash[1] !== 'undefined' && hash[1] !== null) 196 | url += '#' + hash[1]; 197 | return url; 198 | } 199 | } 200 | else { 201 | if (typeof value !== 'undefined' && value !== null) { 202 | var separator = url.indexOf('?') !== -1 ? '&' : '?'; 203 | hash = url.split('#'); 204 | url = hash[0] + separator + key + '=' + value; 205 | if (typeof hash[1] !== 'undefined' && hash[1] !== null) 206 | url += '#' + hash[1]; 207 | return url; 208 | } 209 | else 210 | return url; 211 | } 212 | } 213 | }); 214 | -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/katex.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.13.19"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;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 .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.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 .accent>.vlist-t,.katex .op-limits>.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;min-width:1px}.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{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;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.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{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} 2 | -------------------------------------------------------------------------------- /docs/gitbook/images/apple-touch-icon-precomposed-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/images/apple-touch-icon-precomposed-152.png -------------------------------------------------------------------------------- /docs/gitbook/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/405bccafe69184b356420c989cfc848241779aa0/docs/gitbook/images/favicon.ico -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Introduction · Docs for Snippets 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 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 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |

    71 |
    72 | 73 | 74 | 77 | 78 | 79 | 146 | 147 | 148 |
    149 | 150 |
    151 | 152 |
    153 | 154 | 155 | 156 | 165 | 166 | 167 | 168 | 169 |
    170 |
    171 | 172 |
    173 |
    174 | 175 |
    176 | 177 |

    Docs for Snippets

    178 |

    Cheat sheet and reference for snippets in shena4746's GitHub repository.

    179 | 180 | 181 |
    182 | 183 |
    184 |
    185 |
    186 | 187 |

    results matching ""

    188 |
      189 | 190 |
      191 |
      192 | 193 |

      No results matching ""

      194 | 195 |
      196 |
      197 |
      198 | 199 |
      200 |
      201 | 202 |
      203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 |
      214 | 215 | 221 |
      222 | 223 | 224 | 231 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | -------------------------------------------------------------------------------- /docs/reference/snippets-reference.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Snippets Reference · Docs for Snippets 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 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 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
      71 |
      72 | 73 | 74 | 77 | 78 | 79 | 146 | 147 | 148 |
      149 | 150 |
      151 | 152 |
      153 | 154 | 155 | 156 | 165 | 166 | 167 | 168 | 169 |
      170 |
      171 | 172 |
      173 |
      174 | 175 |
      176 | 177 |

      Snippets Reference

      178 |

      This document is a collection of descriptions for dynamic snippets. 179 | It is not comprehensive but (I think) is sufficient to understand the behavior of non-trivial dynamic snippets.

      180 | 203 |

      Characters

      204 |

      letter to \mathxxx{}

      205 |
        206 |
      • Trigger: an uppercase alphabet (A, for instance) + operator(# or 'cal' or @)
      • 207 |
      • Output: \mathbb{A}, \mathcal{A}, \mathscr{A}, resp
      • 208 |
      • Example:
          209 |
        • R# -> \mathbb{R}
        • 210 |
        • Acal -> \mathcal{A}
        • 211 |
        • B@ -> \mathscr{B}
        • 212 |
        213 |
      • 214 |
      215 |

      conversion among \mathxxx{}

      216 |
        217 |
      • Trigger: \mathxxx{} + #
      • 218 |
      • Output: \mathbb -> \mathcal -> \mathscr -> \mathbb
      • 219 |
      • Example: \mathbb{A}# -> \mathcal{A}
      • 220 |
      221 |

      alphabet to Greek letter

      222 |
        223 |
      • Trigger: z + an alphabet
      • 224 |
      • Output: corresponding greek letter
      • 225 |
      • Examples:
          226 |
        • za -> \alpha
        • 227 |
        • zG -> \Gamma
        • 228 |
        229 |
      • 230 |
      231 |

      Subscripts and Superscripts

      232 |

      auto-subscript (digit)

      233 |
        234 |
      • Trigger: (a letter or a command) + (digits of length <= 2)
      • 235 |
      • Output: letter or command with that subscript
      • 236 |
      • Examples:
          237 |
        • x1 -> x_1
        • 238 |
        • \ell23 -> \ell_{23}
        • 239 |
        240 |
      • 241 |
      242 |

      auto-subscript (lower case alphabet)

      243 |
        244 |
      • Trigger: (X: a letter or a command) + (an uppercase alphabet)×2
      • 245 |
      • Output: X subscripted by the lowercase alphabet
      • 246 |
      • Examples:
          247 |
        • xNN -> x_n
        • 248 |
        • qKK -> q_k
        • 249 |
        250 |
      • 251 |
      252 |

      modification of subscript

      253 |
        254 |
      • Trigger: (a letter or a command with a subscript of depth 1) + (operator "p" or "m") + (value: a lowercase alphabet or a digit)
      • 255 |
      • Output: add plus or minus value to the subscript
      • 256 |
      • Examples:
          257 |
        • x_kp1 -> x_{k+1}
        • 258 |
        • C_{m}mk -> C_{m-k}
        • 259 |
        260 |
      • 261 |
      262 |

      conversion between subscript and superscript

      263 |
        264 |
      • Trigger: (a letter or a command with either a subscript or a superscript of depth 1) + tt
      • 265 |
      • Output: subscript(superscript) is turned to superscript(subscript, resp)
      • 266 |
      • Example: A^{\ell+1}tt -> A_{\ell+1}, and conversely.
      • 267 |
      268 |

      Dots

      269 |

      repeat with ldots

      270 |
        271 |
      • Trigger: (single term not containing a space but space-separated with other terms) + (double comma,,)
      • 272 |
      • Output: repeat the same term after ", ...,"
      • 273 |
      • Examples
          274 |
        • A_{i_1}^{j_1},, -> A_{i_1}^{j_1}, \ldots, A_{i_1}^{j_1}
        • 275 |
        • \ell\ell_{i_1}^{j_1},, does not work as they are not properly separated.
        • 276 |
        277 |
      • 278 |
      279 |

      Math Commands

      280 |

      This category includes numerous snippets. For instance, triggers le, ge, div, to, not, in, sup, inf, dim, deg, ker, range, grad, rot, Div, rank, diag, det, arg, max, min, argmax, argmin, sin, cos, tan, cot, ln, log, exp, perp, cup, cap, sim, pm, iff, mid, Im, Re, succ, prec, circ, neq, ni, lim, sum, prod, const, are defined for their commands (e.g., le -> \le).

      281 |

      Moreover, those snippets that begin with not and in as well as those end with eq, neq are defined in this way. This category includes notin, simeq, subsetneq etc. (More precisely, the trigger for \simeq is defined as \sim + eq, not simeq. The same is true for the other members.) supp also belongs to this category for similar reason.

      282 |

      There are also a number of abbreviated commands, for instance, emps for \emptyset, oo for \infty, and o+ for \oplus and so on. 283 | The cheat sheet has the (nearly?) complete list for the abbreviated, but the best way to get accurate information is to go to definition of snippets, which is always up-to-date.

      284 | 285 | 286 |
      287 | 288 |
      289 |
      290 |
      291 | 292 |

      results matching ""

      293 |
        294 | 295 |
        296 |
        297 | 298 |

        No results matching ""

        299 | 300 |
        301 |
        302 |
        303 | 304 |
        305 |
        306 | 307 |
        308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 |
        319 | 320 | 326 |
        327 | 328 | 329 | 336 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | -------------------------------------------------------------------------------- /latex-snippets-for-vscode.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "latex-snippets-for-vscode", 3 | "version": "1.0.0", 4 | "description": "This repository provides a much more efficient method to input LaTeX code in VSCode compared to traditional user-snippets-based input method.", 5 | "main": "index.js", 6 | "directories": { 7 | "doc": "docs" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1", 11 | "build": "honkit build && bash script/rename.sh", 12 | "serve": "honkit serve" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/Shena4746/latex-snippets-for-vscode.git" 17 | }, 18 | "keywords": [], 19 | "author": "", 20 | "license": "ISC", 21 | "bugs": { 22 | "url": "https://github.com/Shena4746/latex-snippets-for-vscode/issues" 23 | }, 24 | "homepage": "https://github.com/Shena4746/latex-snippets-for-vscode#readme", 25 | "devDependencies": { 26 | "honkit": "^5.0.0", 27 | "honkit-plugin-katex": "^1.1.7" 28 | } 29 | } -------------------------------------------------------------------------------- /script/rename.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | TEMP_DIR=_book 4 | OUT_DIR=docs 5 | 6 | if [ -d $OUT_DIR ]; then 7 | rm -rf $OUT_DIR 8 | fi 9 | 10 | mv $TEMP_DIR $OUT_DIR 11 | -------------------------------------------------------------------------------- /sty/commands.sty: -------------------------------------------------------------------------------- 1 | % (probably imcomplete) list of commands that appear in snippets but are not defined. 2 | \newcommand{\LHS}{\text{LHS}} 3 | \newcommand{\RHS}{\text{RHS}} 4 | \newcommand{\const}{\mathrm{const}} 5 | \newcommand{\notni}{\not\owns} % quick solution for backward \notin 6 | \newcommand{\equalby}[1]{\mathrel{\stackrel{#1}{\resizebox{\widthof{#1}}{\height}{=}}}} % show \text{reason} over "=". 7 | 8 | \DeclareMathOperator{\Dom}{Dom} 9 | \DeclareMathOperator{\CoDom}{CoDom} 10 | \DeclareMathOperator{\range}{range} 11 | \DeclareMathOperator{\Div}{div} % \div is reserved for ÷ 12 | \DeclareMathOperator{\grad}{grad} 13 | \DeclareMathOperator{\rot}{rot} 14 | \DeclareMathOperator{\Tr}{Tr} 15 | \DeclareMathOperator{\rank}{rank} 16 | \DeclareMathOperator{\diag}{diag} 17 | \DeclareMathOperator{\Codim}{Codim} 18 | \DeclareMathOperator*{\argmin}{arg~min} 19 | \DeclareMathOperator*{\argmax}{arg~max} 20 | \DeclareMathOperator{\supp}{supp} 21 | 22 | \newcommand{\interior}[1]{#1^{\circ}} 23 | \newcommand{\adj}[1]{#1^{\star}} 24 | 25 | % physics pacakge contains \abs and \norm 26 | % if you use it, then comment out the below 27 | % ------------------------------------------------ 28 | % abs and norm 29 | % ------------------------------------------------ 30 | % depends on mathtools pacakge 31 | \DeclarePairedDelimiter\abs{\lvert}{\rvert} 32 | \DeclarePairedDelimiter\norm{\lVert}{\rVert} 33 | % Swap the definition of \abs* and \norm*, 34 | % so that \abs and \norm resizes the size of the brackets, 35 | % and the starred version does not. 36 | % SO USE \abs and \norm 37 | \makeatletter 38 | \let\oldabs\abs 39 | \def\abs{\@ifstar{\oldabs}{\oldabs*}} 40 | % 41 | \let\oldnorm\norm 42 | \def\norm{\@ifstar{\oldnorm}{\oldnorm*}} 43 | \makeatother 44 | % ------------------------------------------------ 45 | % END abs and norm 46 | % ------------------------------------------------ -------------------------------------------------------------------------------- /sty/commands_UTF.sty: -------------------------------------------------------------------------------- 1 | % black board characters 2 | % snippets N# -> \ℕ 3 | \newcommand{\ℕ}{\mathbb{N}} 4 | \newcommand{\ℝ}{\mathbb{R}} 5 | \newcommand{\ℚ}{\mathbb{Q}} 6 | \newcommand{\ℤ}{\mathbb{Z}} 7 | 8 | % Greek lowercase letter 9 | % za -> \𝛂 10 | \newcommand{\𝛂}{\alpha} 11 | \newcommand{\𝛃}{\beta} 12 | \newcommand{\𝛄}{\gamma} 13 | \newcommand{\𝛅}{\delta} 14 | \newcommand{\𝛆}{\epsilon} 15 | \newcommand{\𝛇}{\zeta} 16 | \newcommand{\𝛈}{\eta} 17 | \newcommand{\𝛉}{\theta} 18 | \newcommand{\𝛊}{\iota} 19 | \newcommand{\𝛋}{\kappa} 20 | \newcommand{\𝛌}{\lambda} 21 | \newcommand{\𝛍}{\mu} 22 | \newcommand{\𝛎}{\nu} 23 | \newcommand{\𝛏}{\xi} 24 | \newcommand{\𝛐}{\omicron} 25 | \newcommand{\𝛑}{\pi} 26 | \newcommand{\𝛒}{\rho} 27 | \newcommand{\𝛓}{\sigma} 28 | \newcommand{\𝛔}{\tau} 29 | \newcommand{\𝛕}{\upsilon} 30 | \newcommand{\𝛖}{\phi} 31 | \newcommand{\𝛗}{\chi} 32 | \newcommand{\𝛘}{\psi} 33 | \newcommand{\𝛙}{\omega} 34 | \newcommand{\Θ}{\Theta} 35 | \newcommand{\Ξ}{\Xi} 36 | 37 | % Greek uppercase letter 38 | % G# -> \𝚪 39 | \newcommand{\𝚪}{\Gamma} 40 | \newcommand{\𝚫}{\Delta} 41 | \newcommand{\𝚸}{\Pi} 42 | \newcommand{\𝚲}{\Lambda} 43 | \newcommand{\𝚺}{\Sigma} 44 | \newcommand{\𝚼}{\Upsilon} 45 | \newcommand{\𝚽}{\Phi} 46 | \newcommand{\𝚶}{\Omega} 47 | 48 | % set relation 49 | \newcommand{\∈}{\in} 50 | \newcommand{\∋}{\ni} 51 | \newcommand{\∉}{\notin} 52 | %\newcommand{\notni}{\not\owns} % quick solution for backward \notin 53 | \newcommand{\∌}{\notni} 54 | 55 | \newcommand{\⊂}{\subset} 56 | \newcommand{\⊃}{\supset} 57 | \newcommand{\⊊}{\subsetneq} 58 | \newcommand{\⊋}{\supsetneq} 59 | \newcommand{\⊆}{\subseteq} 60 | \newcommand{\⊇}{\supseteq} 61 | 62 | % logic 63 | \newcommand{\∀}{\forall} 64 | \newcommand{\∃}{\exists} 65 | \newcommand{\∧}{\wedge} 66 | \newcommand{\∨}{\vee} 67 | \newcommand{\⇒}{\Rightarrow} 68 | \newcommand{\⇔}{\Leftrightarrow} 69 | \newcommand{\⇐}{\Leftarrow} 70 | \newcommand{\⟸}{\Longleftarrow} 71 | \newcommand{\⟹}{\Longrightarrow} 72 | \newcommand{\⟺}{\Longleftrightarrow} 73 | 74 | % Arrows 75 | \newcommand{\←}{\leftarrow} 76 | \newcommand{\→}{\rightarrow} 77 | \newcommand{\↖}{\nwarrow} 78 | \newcommand{\↗}{\nearrow} 79 | \newcommand{\↘}{\searrow} 80 | \newcommand{\↙}{\swarrow} 81 | \newcommand{\↑}{\uparrow} 82 | \newcommand{\↓}{\downarrow} 83 | \newcommand{\↦}{\mapsto} 84 | 85 | % Relation 86 | \newcommand{\∼}{\sim} 87 | \newcommand{\≃}{\simeq} 88 | \newcommand{\≠}{\neq} 89 | \newcommand{\∝}{\propto} 90 | \newcommand{\⨉}{\times} 91 | \newcommand{\⊕}{\oplus} 92 | \newcommand{\⊗}{\otimes} 93 | 94 | % misc 95 | \newcommand{\∞}{\infty} -------------------------------------------------------------------------------- /sty/envs.sty: -------------------------------------------------------------------------------- 1 | % \usepackage{amsthm} 2 | % below are just sample. 3 | % customise them yourself! 4 | \newtheorem{thm}{Theorem}[section] 5 | \newtheorem*{thm*}{Theorem} 6 | 7 | \newtheorem{prp}[thm]{Proposition} 8 | \newtheorem*{prp*}{Proposition} 9 | 10 | \newtheorem{cor}[thm]{Corollary} 11 | \newtheorem*{cor*}{Corollary} 12 | 13 | \newtheorem{lem}[thm]{Lemma} 14 | \newtheorem*{lem*}{Lemma} 15 | 16 | \newtheorem{dfn}[thm]{Definition} 17 | \newtheorem*{dfn*}{Definition} 18 | 19 | \theoremstyle{definition} 20 | \newtheorem*{rem*}{Remark} 21 | \newtheorem{rem}[thm]{Remark} 22 | 23 | \theoremstyle{definition} 24 | \newtheorem{ex}[thm]{Example} 25 | \newtheorem*{ex*}{Example} 26 | 27 | \theoremstyle{definition} 28 | \newtheorem{exe}{Exercise} 29 | 30 | % rename proof env as prf 31 | \let\oldproof\proof 32 | \let\endoldproof\endproof 33 | \renewenvironment{proof}{ 34 | \begin{prf} 35 | }{ 36 | \end{prf} 37 | } 38 | \newenvironment{prf}{\oldproof}{\endoldproof} -------------------------------------------------------------------------------- /table-generator/.python-version: -------------------------------------------------------------------------------- 1 | 3.11.4 2 | -------------------------------------------------------------------------------- /table-generator/data/commands.json: -------------------------------------------------------------------------------- 1 | { 2 | "imp": "\\implies", 3 | "imb": "\\impliedby", 4 | "ssb": "\\subset", 5 | "ssp": "\\supset", 6 | "stm": "\\setminus", 7 | "ee": "\\exists", 8 | "fa": "\\forall", 9 | "mpt": "\\mapsto", 10 | "uuto": "\\upuparrows", 11 | "ddto": "\\downdownarrows", 12 | "lra": "\\leftrightarrow", 13 | "Lra": "\\Leftrightarrow", 14 | "oo": "\\infty", 15 | "app": "\\approx", 16 | "xx": "\\times", 17 | "oxx": "\\otimes", 18 | "xto": "\\xrightarrow", 19 | "xot": "\\xleftarrow", 20 | "ovl": "\\overline", 21 | "ope": "\\interior", 22 | "mrm": "\\mathrm", 23 | "tit": "\\textit", 24 | "tbf": "\\textbf", 25 | "uset": "\\underset", 26 | "oset": "\\overset", 27 | "ff": "\\frac" 28 | } -------------------------------------------------------------------------------- /table-generator/data/table-commands.txt: -------------------------------------------------------------------------------- 1 | | snippet | body | appearance | 2 | |:----------|:------------------|:------------------| 3 | | imp | `\implies` | $\implies$ | 4 | | imb | `\impliedby` | $\impliedby$ | 5 | | ssb | `\subset` | $\subset$ | 6 | | ssp | `\supset` | $\supset$ | 7 | | stm | `\setminus` | $\setminus$ | 8 | | ee | `\exists` | $\exists$ | 9 | | fa | `\forall` | $\forall$ | 10 | | mpt | `\mapsto` | $\mapsto$ | 11 | | uuto | `\upuparrows` | $\upuparrows$ | 12 | | ddto | `\downdownarrows` | $\downdownarrows$ | 13 | | lra | `\leftrightarrow` | $\leftrightarrow$ | 14 | | Lra | `\Leftrightarrow` | $\Leftrightarrow$ | 15 | | oo | `\infty` | $\infty$ | 16 | | app | `\approx` | $\approx$ | 17 | | xx | `\times` | $\times$ | 18 | | oxx | `\otimes` | $\otimes$ | 19 | | xto | `\xrightarrow` | $\xrightarrow$ | 20 | | xot | `\xleftarrow` | $\xleftarrow$ | 21 | | ovl | `\overline` | $\overline$ | 22 | | ope | `\interior` | $\interior$ | 23 | | mrm | `\mathrm` | $\mathrm$ | 24 | | tit | `\textit` | $\textit$ | 25 | | tbf | `\textbf` | $\textbf$ | 26 | | uset | `\underset` | $\underset$ | 27 | | oset | `\overset` | $\overset$ | 28 | | ff | `\frac` | $\frac$ | -------------------------------------------------------------------------------- /table-generator/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "black" 5 | version = "23.7.0" 6 | description = "The uncompromising code formatter." 7 | optional = false 8 | python-versions = ">=3.8" 9 | files = [ 10 | {file = "black-23.7.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587"}, 11 | {file = "black-23.7.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f"}, 12 | {file = "black-23.7.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be"}, 13 | {file = "black-23.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc"}, 14 | {file = "black-23.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"}, 15 | {file = "black-23.7.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2"}, 16 | {file = "black-23.7.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd"}, 17 | {file = "black-23.7.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a"}, 18 | {file = "black-23.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926"}, 19 | {file = "black-23.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad"}, 20 | {file = "black-23.7.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f"}, 21 | {file = "black-23.7.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3"}, 22 | {file = "black-23.7.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6"}, 23 | {file = "black-23.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a"}, 24 | {file = "black-23.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320"}, 25 | {file = "black-23.7.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9"}, 26 | {file = "black-23.7.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3"}, 27 | {file = "black-23.7.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087"}, 28 | {file = "black-23.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91"}, 29 | {file = "black-23.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491"}, 30 | {file = "black-23.7.0-py3-none-any.whl", hash = "sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96"}, 31 | {file = "black-23.7.0.tar.gz", hash = "sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb"}, 32 | ] 33 | 34 | [package.dependencies] 35 | click = ">=8.0.0" 36 | mypy-extensions = ">=0.4.3" 37 | packaging = ">=22.0" 38 | pathspec = ">=0.9.0" 39 | platformdirs = ">=2" 40 | tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} 41 | 42 | [package.extras] 43 | colorama = ["colorama (>=0.4.3)"] 44 | d = ["aiohttp (>=3.7.4)"] 45 | jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] 46 | uvloop = ["uvloop (>=0.15.2)"] 47 | 48 | [[package]] 49 | name = "click" 50 | version = "8.1.6" 51 | description = "Composable command line interface toolkit" 52 | optional = false 53 | python-versions = ">=3.7" 54 | files = [ 55 | {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"}, 56 | {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"}, 57 | ] 58 | 59 | [package.dependencies] 60 | colorama = {version = "*", markers = "platform_system == \"Windows\""} 61 | 62 | [[package]] 63 | name = "colorama" 64 | version = "0.4.6" 65 | description = "Cross-platform colored terminal text." 66 | optional = false 67 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" 68 | files = [ 69 | {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, 70 | {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, 71 | ] 72 | 73 | [[package]] 74 | name = "flake8" 75 | version = "6.1.0" 76 | description = "the modular source code checker: pep8 pyflakes and co" 77 | optional = false 78 | python-versions = ">=3.8.1" 79 | files = [ 80 | {file = "flake8-6.1.0-py2.py3-none-any.whl", hash = "sha256:ffdfce58ea94c6580c77888a86506937f9a1a227dfcd15f245d694ae20a6b6e5"}, 81 | {file = "flake8-6.1.0.tar.gz", hash = "sha256:d5b3857f07c030bdb5bf41c7f53799571d75c4491748a3adcd47de929e34cd23"}, 82 | ] 83 | 84 | [package.dependencies] 85 | mccabe = ">=0.7.0,<0.8.0" 86 | pycodestyle = ">=2.11.0,<2.12.0" 87 | pyflakes = ">=3.1.0,<3.2.0" 88 | 89 | [[package]] 90 | name = "isort" 91 | version = "5.12.0" 92 | description = "A Python utility / library to sort Python imports." 93 | optional = false 94 | python-versions = ">=3.8.0" 95 | files = [ 96 | {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, 97 | {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, 98 | ] 99 | 100 | [package.extras] 101 | colors = ["colorama (>=0.4.3)"] 102 | pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] 103 | plugins = ["setuptools"] 104 | requirements-deprecated-finder = ["pip-api", "pipreqs"] 105 | 106 | [[package]] 107 | name = "mccabe" 108 | version = "0.7.0" 109 | description = "McCabe checker, plugin for flake8" 110 | optional = false 111 | python-versions = ">=3.6" 112 | files = [ 113 | {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, 114 | {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, 115 | ] 116 | 117 | [[package]] 118 | name = "mypy-extensions" 119 | version = "1.0.0" 120 | description = "Type system extensions for programs checked with the mypy type checker." 121 | optional = false 122 | python-versions = ">=3.5" 123 | files = [ 124 | {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, 125 | {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, 126 | ] 127 | 128 | [[package]] 129 | name = "packaging" 130 | version = "23.1" 131 | description = "Core utilities for Python packages" 132 | optional = false 133 | python-versions = ">=3.7" 134 | files = [ 135 | {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, 136 | {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, 137 | ] 138 | 139 | [[package]] 140 | name = "pathspec" 141 | version = "0.11.2" 142 | description = "Utility library for gitignore style pattern matching of file paths." 143 | optional = false 144 | python-versions = ">=3.7" 145 | files = [ 146 | {file = "pathspec-0.11.2-py3-none-any.whl", hash = "sha256:1d6ed233af05e679efb96b1851550ea95bbb64b7c490b0f5aa52996c11e92a20"}, 147 | {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"}, 148 | ] 149 | 150 | [[package]] 151 | name = "platformdirs" 152 | version = "3.10.0" 153 | description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." 154 | optional = false 155 | python-versions = ">=3.7" 156 | files = [ 157 | {file = "platformdirs-3.10.0-py3-none-any.whl", hash = "sha256:d7c24979f292f916dc9cbf8648319032f551ea8c49a4c9bf2fb556a02070ec1d"}, 158 | {file = "platformdirs-3.10.0.tar.gz", hash = "sha256:b45696dab2d7cc691a3226759c0d3b00c47c8b6e293d96f6436f733303f77f6d"}, 159 | ] 160 | 161 | [package.extras] 162 | docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] 163 | test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] 164 | 165 | [[package]] 166 | name = "pycodestyle" 167 | version = "2.11.0" 168 | description = "Python style guide checker" 169 | optional = false 170 | python-versions = ">=3.8" 171 | files = [ 172 | {file = "pycodestyle-2.11.0-py2.py3-none-any.whl", hash = "sha256:5d1013ba8dc7895b548be5afb05740ca82454fd899971563d2ef625d090326f8"}, 173 | {file = "pycodestyle-2.11.0.tar.gz", hash = "sha256:259bcc17857d8a8b3b4a2327324b79e5f020a13c16074670f9c8c8f872ea76d0"}, 174 | ] 175 | 176 | [[package]] 177 | name = "pyflakes" 178 | version = "3.1.0" 179 | description = "passive checker of Python programs" 180 | optional = false 181 | python-versions = ">=3.8" 182 | files = [ 183 | {file = "pyflakes-3.1.0-py2.py3-none-any.whl", hash = "sha256:4132f6d49cb4dae6819e5379898f2b8cce3c5f23994194c24b77d5da2e36f774"}, 184 | {file = "pyflakes-3.1.0.tar.gz", hash = "sha256:a0aae034c444db0071aa077972ba4768d40c830d9539fd45bf4cd3f8f6992efc"}, 185 | ] 186 | 187 | [[package]] 188 | name = "tabulate" 189 | version = "0.9.0" 190 | description = "Pretty-print tabular data" 191 | optional = false 192 | python-versions = ">=3.7" 193 | files = [ 194 | {file = "tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f"}, 195 | {file = "tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"}, 196 | ] 197 | 198 | [package.extras] 199 | widechars = ["wcwidth"] 200 | 201 | [[package]] 202 | name = "tomli" 203 | version = "2.0.1" 204 | description = "A lil' TOML parser" 205 | optional = false 206 | python-versions = ">=3.7" 207 | files = [ 208 | {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, 209 | {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, 210 | ] 211 | 212 | [metadata] 213 | lock-version = "2.0" 214 | python-versions = "^3.10" 215 | content-hash = "eaca2aa3be775a3d5de9c2b24864593b104fa46c45d799229aa14299d8cc3c99" 216 | -------------------------------------------------------------------------------- /table-generator/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "table-generator" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["shena <87386937+Shena4746@users.noreply.github.com>"] 6 | readme = "README.md" 7 | packages = [{include = "table_generator"}] 8 | 9 | [tool.poetry.dependencies] 10 | python = "^3.10" 11 | black = "^23.7.0" 12 | flake8 = "^6.1.0" 13 | isort = "^5.12.0" 14 | tabulate = "^0.9.0" 15 | click = "^8.1.6" 16 | 17 | 18 | [build-system] 19 | requires = ["poetry-core"] 20 | build-backend = "poetry.core.masonry.api" 21 | -------------------------------------------------------------------------------- /table-generator/scr/json2table.py: -------------------------------------------------------------------------------- 1 | import json 2 | import click 3 | from tabulate import tabulate 4 | 5 | @click.command() 6 | @click.argument('input_file', type=click.File('r')) 7 | @click.argument('output_file', type=click.File('w')) 8 | def json_to_markdown_table(input_file, output_file): 9 | """convert input json file into markdown table for cheat sheet, 10 | and save it to output file. 11 | 12 | Args: 13 | input_file (json): path to json file 14 | output_file (txt): path to output text file 15 | """ 16 | data = json.load(input_file) 17 | 18 | # Convert JSON data to a list of lists 19 | table_data = [[key, f"`{value}`", f"${value}$"] for key, value in data.items()] 20 | 21 | # Convert the list of lists to a markdown table 22 | table = tabulate(table_data, headers=["snippet", "", ""], tablefmt="pipe") 23 | 24 | # Write the markdown table to the output file 25 | output_file.write(table) 26 | click.echo("Markdown table successfully created!") 27 | 28 | if __name__ == '__main__': 29 | json_to_markdown_table() -------------------------------------------------------------------------------- /table-generator/usage.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | After completing a typical local installation of python by pyenv + poetry, just run 4 | 5 | ```bash 6 | poetry run python path/to/scr/json2table.py input.json output.txt 7 | ``` 8 | 9 | [data](./data/) directory contains sample files. 10 | 11 | ## NOTE 12 | 13 | This script is for writing a Markdown table in a cheat sheet. 14 | --------------------------------------------------------------------------------