Docs for Snippets
178 |Cheat sheet and reference for snippets in shena4746's GitHub repository.
179 | 180 | 181 |├── table-generator ├── .python-version ├── usage.md ├── pyproject.toml ├── data │ ├── commands.json │ └── table-commands.txt ├── scr │ └── json2table.py └── poetry.lock ├── .gitignore ├── demo ├── demo-tex.png ├── 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 ├── latex-snippets-for-vscode.code-workspace ├── docs ├── gitbook │ ├── images │ │ ├── favicon.ico │ │ └── apple-touch-icon-precomposed-152.png │ ├── fonts │ │ └── fontawesome │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ ├── honkit-plugin-katex │ │ ├── fonts │ │ │ ├── KaTeX_Main-Bold.ttf │ │ │ ├── KaTeX_Main-Bold.woff │ │ │ ├── KaTeX_AMS-Regular.ttf │ │ │ ├── KaTeX_AMS-Regular.woff │ │ │ ├── KaTeX_Fraktur-Bold.ttf │ │ │ ├── KaTeX_Main-Bold.woff2 │ │ │ ├── KaTeX_Main-Italic.ttf │ │ │ ├── KaTeX_Main-Italic.woff │ │ │ ├── KaTeX_Main-Regular.ttf │ │ │ ├── KaTeX_Math-Italic.ttf │ │ │ ├── KaTeX_Math-Italic.woff │ │ │ ├── KaTeX_AMS-Regular.woff2 │ │ │ ├── KaTeX_Fraktur-Bold.woff │ │ │ ├── KaTeX_Fraktur-Bold.woff2 │ │ │ ├── KaTeX_Fraktur-Regular.ttf │ │ │ ├── KaTeX_Main-BoldItalic.ttf │ │ │ ├── KaTeX_Main-Italic.woff2 │ │ │ ├── KaTeX_Main-Regular.woff │ │ │ ├── KaTeX_Main-Regular.woff2 │ │ │ ├── KaTeX_Math-BoldItalic.ttf │ │ │ ├── KaTeX_Math-Italic.woff2 │ │ │ ├── KaTeX_SansSerif-Bold.ttf │ │ │ ├── KaTeX_SansSerif-Bold.woff │ │ │ ├── KaTeX_Script-Regular.ttf │ │ │ ├── KaTeX_Script-Regular.woff │ │ │ ├── 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_Caligraphic-Bold.ttf │ │ │ ├── KaTeX_Caligraphic-Bold.woff │ │ │ ├── KaTeX_Fraktur-Regular.woff │ │ │ ├── KaTeX_Fraktur-Regular.woff2 │ │ │ ├── KaTeX_Main-BoldItalic.woff │ │ │ ├── KaTeX_Main-BoldItalic.woff2 │ │ │ ├── KaTeX_Math-BoldItalic.woff │ │ │ ├── KaTeX_Math-BoldItalic.woff2 │ │ │ ├── KaTeX_SansSerif-Bold.woff2 │ │ │ ├── KaTeX_SansSerif-Italic.ttf │ │ │ ├── KaTeX_SansSerif-Italic.woff │ │ │ ├── KaTeX_SansSerif-Regular.ttf │ │ │ ├── KaTeX_Script-Regular.woff2 │ │ │ ├── KaTeX_Caligraphic-Bold.woff2 │ │ │ ├── KaTeX_Caligraphic-Regular.ttf │ │ │ ├── KaTeX_Caligraphic-Regular.woff │ │ │ ├── KaTeX_SansSerif-Italic.woff2 │ │ │ ├── KaTeX_SansSerif-Regular.woff │ │ │ ├── KaTeX_SansSerif-Regular.woff2 │ │ │ ├── KaTeX_Typewriter-Regular.ttf │ │ │ ├── KaTeX_Typewriter-Regular.woff │ │ │ ├── KaTeX_Typewriter-Regular.woff2 │ │ │ └── KaTeX_Caligraphic-Regular.woff2 │ │ └── katex.min.css │ ├── gitbook-plugin-search │ │ ├── search.css │ │ ├── search-engine.js │ │ ├── search.js │ │ └── lunr.min.js │ ├── gitbook-plugin-lunr │ │ ├── search-lunr.js │ │ └── lunr.min.js │ ├── @honkit │ │ └── honkit-plugin-highlight │ │ │ └── ebook.css │ └── gitbook-plugin-fontsettings │ │ ├── fontsettings.js │ │ └── website.css ├── index.html └── reference │ └── snippets-reference.html ├── _docs ├── SUMMARY.md ├── README.md ├── reference │ └── snippets-reference.md └── cheatsheet │ └── cheatsheet.md ├── .vscode ├── settings.json ├── keybindings.json ├── utf_latex.hsnips ├── latex.code-snippets └── latex.hsnips ├── script └── rename.sh ├── book.json ├── sty ├── envs.sty ├── commands.sty └── commands_UTF.sty ├── package.json ├── .github └── workflows │ └── release.yml ├── CHANGELOG.md ├── LICENSE ├── cheatsheet.md └── README.md /table-generator/.python-version: -------------------------------------------------------------------------------- 1 | 3.11.4 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.history/ 2 | /node_modules 3 | /**/.venv -------------------------------------------------------------------------------- /demo/demo-tex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-tex.png -------------------------------------------------------------------------------- /latex-snippets-for-vscode.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | } -------------------------------------------------------------------------------- /demo/demo-continuity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-continuity.gif -------------------------------------------------------------------------------- /demo/demo-continuity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-continuity.png -------------------------------------------------------------------------------- /demo/demo-dual-basis.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-dual-basis.gif -------------------------------------------------------------------------------- /demo/demo-dual-basis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-dual-basis.png -------------------------------------------------------------------------------- /demo/demo-math-mode.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-math-mode.gif -------------------------------------------------------------------------------- /demo/demo-taylor-expansion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-taylor-expansion.gif -------------------------------------------------------------------------------- /demo/demo-taylor-expansion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-taylor-expansion.png -------------------------------------------------------------------------------- /docs/gitbook/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/images/favicon.ico -------------------------------------------------------------------------------- /demo/demo-tensor-isomorphism.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-tensor-isomorphism.gif -------------------------------------------------------------------------------- /demo/demo-tensor-isomorphism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/demo/demo-tensor-isomorphism.png -------------------------------------------------------------------------------- /_docs/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | * [Cheat Sheet](cheatsheet/cheatsheet.md) 4 | * [Snippets Reference](reference/snippets-reference.md) 5 | -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/fonts/fontawesome/FontAwesome.otf -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | // if you write unicode on source codes 3 | "editor.unicodeHighlight.ambiguousCharacters": false, 4 | //"hsnips.hsnipsPath": ".vscode", 5 | } -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/fonts/fontawesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/fonts/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/gitbook/images/apple-touch-icon-precomposed-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/images/apple-touch-icon-precomposed-152.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /_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/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/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/HEAD/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/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenapse/latex-snippets-for-vscode/HEAD/docs/gitbook/honkit-plugin-katex/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | } -------------------------------------------------------------------------------- /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} -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /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} -------------------------------------------------------------------------------- /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() -------------------------------------------------------------------------------- /.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 -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/) 6 | and this project adheres to [Semantic Versioning](http://semver.org/). 7 | 8 | ## [Unreleased] 9 | 10 | ### Add 11 | 12 | - new snippets to overwrite last element of subscript and superscript 13 | - modification of superscript (an obvious counterpart of modification of subscript) 14 | 15 | - lower priority 16 | - more UTF coverage of UTF snippets and commands (lower priority) 17 | - make UTF snippets trigger consistent with traditional ones 18 | 19 | ### Fix 20 | 21 | - code for modification of superscript 22 | - code for repeat by ldots. (currently it is nearly a copy & paste from codes for subscript) 23 | 24 | ## [0.1.0] - 2022-08-20 25 | 26 | ### Added 27 | 28 | - re-organize latex.hsnips 29 | - markdown cheat sheet 30 | - reference for dynamic snippets 31 | - supplementary sty files: envs, commands 32 | - UTF snippets and commands 33 | - python script to help write Markdown table from JSON 34 | - detailed README 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Shena 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/gitbook/gitbook-plugin-search/search.css: -------------------------------------------------------------------------------- 1 | /* 2 | This CSS only styled the search results section, not the search input 3 | It defines the basic interraction to hide content when displaying results, etc 4 | */ 5 | #book-search-results .search-results { 6 | display: none; 7 | } 8 | #book-search-results .search-results ul.search-results-list { 9 | list-style-type: none; 10 | padding-left: 0; 11 | } 12 | #book-search-results .search-results ul.search-results-list li { 13 | margin-bottom: 1.5rem; 14 | padding-bottom: 0.5rem; 15 | /* Highlight results */ 16 | } 17 | #book-search-results .search-results ul.search-results-list li p em { 18 | background-color: rgba(255, 220, 0, 0.4); 19 | font-style: normal; 20 | } 21 | #book-search-results .search-results .no-results { 22 | display: none; 23 | } 24 | #book-search-results.open .search-results { 25 | display: block; 26 | } 27 | #book-search-results.open .search-noresults { 28 | display: none; 29 | } 30 | #book-search-results.no-results .search-results .has-results { 31 | display: none; 32 | } 33 | #book-search-results.no-results .search-results .no-results { 34 | display: block; 35 | } 36 | -------------------------------------------------------------------------------- /.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 | ] -------------------------------------------------------------------------------- /docs/gitbook/gitbook-plugin-search/search-engine.js: -------------------------------------------------------------------------------- 1 | require([ 2 | 'gitbook', 3 | 'jquery' 4 | ], function(gitbook, $) { 5 | // Global search objects 6 | var engine = null; 7 | var initialized = false; 8 | 9 | // Set a new search engine 10 | function setEngine(Engine, config) { 11 | initialized = false; 12 | engine = new Engine(config); 13 | 14 | init(config); 15 | } 16 | 17 | // Initialize search engine with config 18 | function init(config) { 19 | if (!engine) throw new Error('No engine set for research. Set an engine using gitbook.research.setEngine(Engine).'); 20 | 21 | return engine.init(config) 22 | .then(function() { 23 | initialized = true; 24 | gitbook.events.trigger('search.ready'); 25 | }); 26 | } 27 | 28 | // Launch search for query q 29 | function query(q, offset, length) { 30 | if (!initialized) throw new Error('Search has not been initialized'); 31 | return engine.search(q, offset, length); 32 | } 33 | 34 | // Get stats about search 35 | function getEngine() { 36 | return engine? engine.name : null; 37 | } 38 | 39 | function isInitialized() { 40 | return initialized; 41 | } 42 | 43 | // Initialize gitbook.search 44 | gitbook.search = { 45 | setEngine: setEngine, 46 | getEngine: getEngine, 47 | query: query, 48 | isInitialized: isInitialized 49 | }; 50 | }); -------------------------------------------------------------------------------- /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$ | -------------------------------------------------------------------------------- /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 | % ------------------------------------------------ -------------------------------------------------------------------------------- /docs/gitbook/gitbook-plugin-lunr/search-lunr.js: -------------------------------------------------------------------------------- 1 | require([ 2 | 'gitbook', 3 | 'jquery' 4 | ], function(gitbook, $) { 5 | // Define global search engine 6 | function LunrSearchEngine() { 7 | this.index = null; 8 | this.store = {}; 9 | this.name = 'LunrSearchEngine'; 10 | } 11 | 12 | // Initialize lunr by fetching the search index 13 | LunrSearchEngine.prototype.init = function() { 14 | var that = this; 15 | var d = $.Deferred(); 16 | 17 | $.getJSON(gitbook.state.basePath+'/search_index.json') 18 | .then(function(data) { 19 | // eslint-disable-next-line no-undef 20 | that.index = lunr.Index.load(data.index); 21 | that.store = data.store; 22 | d.resolve(); 23 | }); 24 | 25 | return d.promise(); 26 | }; 27 | 28 | // Search for a term and return results 29 | LunrSearchEngine.prototype.search = function(q, offset, length) { 30 | var that = this; 31 | var results = []; 32 | 33 | if (this.index) { 34 | results = $.map(this.index.search(q), function(result) { 35 | var doc = that.store[result.ref]; 36 | 37 | return { 38 | title: doc.title, 39 | url: doc.url, 40 | body: doc.summary || doc.body 41 | }; 42 | }); 43 | } 44 | 45 | return $.Deferred().resolve({ 46 | query: q, 47 | results: results.slice(0, length), 48 | count: results.length 49 | }).promise(); 50 | }; 51 | 52 | // Set gitbook research 53 | gitbook.events.bind('start', function(e, config) { 54 | var engine = gitbook.search.getEngine(); 55 | if (!engine) { 56 | gitbook.search.setEngine(LunrSearchEngine, config); 57 | } 58 | }); 59 | }); 60 | -------------------------------------------------------------------------------- /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} -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /.vscode/utf_latex.hsnips: -------------------------------------------------------------------------------- 1 | # `_`: snippet argument, T: trigger key needed 2 | 3 | global 4 | function math(context) { 5 | return context.scopes.some(s => 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(?`, `}`, `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 | -------------------------------------------------------------------------------- /cheatsheet.md: -------------------------------------------------------------------------------- 1 | # CHEAT SHEET 2 | 3 | 20 | 21 |
').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/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/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |Cheat sheet and reference for snippets in shena4746's GitHub repository.
179 | 180 | 181 |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 |\mathxxx{}\mathxxx{}\mathxxx{}\mathbb{A}, \mathcal{A}, \mathscr{A}, respR# -> \mathbb{R}Acal -> \mathcal{A}B@ -> \mathscr{B}\mathxxx{}\mathxxx{} + #\mathbb -> \mathcal -> \mathscr -> \mathbb\mathbb{A}# -> \mathcal{A}za -> \alphazG -> \Gammax1 -> x_1\ell23 -> \ell_{23}xNN -> x_nqKK -> q_kx_kp1 -> x_{k+1}C_{m}mk -> C_{m-k}A^{\ell+1}tt -> A_{\ell+1}, and conversely.A_{i_1}^{j_1},, -> A_{i_1}^{j_1}, \ldots, A_{i_1}^{j_1}\ell\ell_{i_1}^{j_1},, does not work as they are not properly separated.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).
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.
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.