361 lines
8.7 KiB
JSON
361 lines
8.7 KiB
JSON
{
|
|
// Place your snippets for latex here. Each snippet is defined under a snippet name and has a prefix, body and
|
|
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
|
|
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
|
|
// same ids are connected.
|
|
// Example:
|
|
// "Print to console": {
|
|
// "prefix": "log",
|
|
// "body": [
|
|
// "console.log('$1');",
|
|
// "$2"
|
|
// ],
|
|
// "description": "Log output to console"
|
|
// }
|
|
// Place your snippets for tex here. Each snippet is defined under a snippet name and has a prefix, body and
|
|
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
|
|
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
|
|
// same ids are connected.
|
|
// Example:
|
|
// "Print to console": {
|
|
// "prefix": "log",
|
|
// "body": [
|
|
// "console.log('$1');",
|
|
// "$2"
|
|
// ],
|
|
// "description": "Log output to console"
|
|
// }
|
|
"Formula (old)": {
|
|
"prefix": "formulaBare",
|
|
"body": [
|
|
"\\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=Formula: $1]",
|
|
"\t$2",
|
|
"\\end{tcolorbox}",
|
|
],
|
|
"description": "Red tcolorbox to provide a formula (without the default setup)"
|
|
},
|
|
"Prepare Latex doc (old)": {
|
|
"prefix": "LaTeX-Prepare-Old",
|
|
"body": [
|
|
"\\documentclass{article}\n",
|
|
"% Imports %",
|
|
"\\usepackage{amsmath}",
|
|
"\\usepackage{graphicx}",
|
|
"\\usepackage{subcaption}",
|
|
"\\usepackage[export]{adjustbox}",
|
|
"\\usepackage{tcolorbox}",
|
|
"\\usepackage{xcolor}",
|
|
"\\usepackage{cancel}",
|
|
"\\usepackage{dsfont}",
|
|
"\\usepackage{amssymb}",
|
|
"\\usepackage[a4paper]{geometry}",
|
|
"\\usepackage{parskip}\n",
|
|
"% Setup %",
|
|
"\\title{\\Huge \\textbf{$1}}",
|
|
"\\author{Janis Hutz}\n",
|
|
"% Configuring %",
|
|
"\\addtolength{\\oddsidemargin}{-0.75in}",
|
|
"\\addtolength{\\textwidth}{1.5in}",
|
|
"\\addtolength{\\evensidemargin}{-0.75in}",
|
|
"\\addtolength{\\topmargin}{-1in}",
|
|
"\\addtolength{\\textheight}{2in}\n",
|
|
"% Main doc %",
|
|
"\\begin{document}",
|
|
"\\maketitle",
|
|
"$2",
|
|
"\\end{document}",
|
|
],
|
|
"description": "Prepare a LaTeX Document with all relevant imports"
|
|
},
|
|
"prepare LaTeX Document (New)": {
|
|
"prefix": "latex-prepare",
|
|
"body": [
|
|
"\\documentclass{article}\n",
|
|
"\\input{~/projects/generalSchool/helpers.tex}\n",
|
|
"\\setup{$1}\n",
|
|
"\\begin{document}",
|
|
"\\maketitle",
|
|
"\\pagestyle{fancy}",
|
|
"\\thispagestyle{fancy}\n\n",
|
|
"$2\n\n",
|
|
"\\end{document}"
|
|
],
|
|
"description": "Prepares a full LaTeX Document for use and compiling"
|
|
},
|
|
"Fancy table": {
|
|
"prefix": "table",
|
|
"body": [
|
|
"\\begin{tabular}[h!]{|$1|}",
|
|
"\t\\hline",
|
|
"\t\\rowcolor{$2}\\multicolumn{$3}{|c|}{$4}\\",
|
|
"\t\\hline",
|
|
"\t$5\\\\\\",
|
|
"\t\\hline",
|
|
"\\end{tabular}"
|
|
],
|
|
"description": "Inserts a tcolorbox to provide a formula (red)"
|
|
},
|
|
"Formula (new)": {
|
|
"prefix": "formula",
|
|
"body": [
|
|
"\\begin{formula}[]{$1}",
|
|
"\t$2",
|
|
"\\end{formula}"
|
|
],
|
|
"description": "Inserts a tcolorbox to provide a formula (red)"
|
|
},
|
|
"Definition (new)": {
|
|
"prefix": "definition",
|
|
"body": [
|
|
"\\begin{definition}[]{$1}",
|
|
"\t$2",
|
|
"\\end{definition}"
|
|
],
|
|
"description": "Inserts a tcolorbox to provide a definition (blue)"
|
|
},
|
|
"Recall (new)": {
|
|
"prefix": "recall",
|
|
"body": [
|
|
"\\begin{recall}[]{$1}",
|
|
"\t$2",
|
|
"\\end{recall}"
|
|
],
|
|
"description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)"
|
|
},
|
|
"Important Remarks (new)": {
|
|
"prefix": "remarks",
|
|
"body": [
|
|
"\\begin{remarks}[]{$1}",
|
|
"\t$2",
|
|
"\\end{remarks}"
|
|
],
|
|
"description": "Inserts a tcolorbox to provide remarks (green)"
|
|
},
|
|
"Guides (new)": {
|
|
"prefix": "guides",
|
|
"body": [
|
|
"\\begin{guides}[]{$1}{${2:Usage}}",
|
|
"\t$2",
|
|
"\\end{guides}"
|
|
],
|
|
"description": "Inserts a tcolorbox to provide guides / instructions on how to use (purple)"
|
|
},
|
|
"Properties (new)": {
|
|
"prefix": "properties",
|
|
"body": [
|
|
"\\begin{properties}[]{$1}",
|
|
"\t$2",
|
|
"\\end{properties}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about properties / restrictions / limitations"
|
|
},
|
|
"Restrictions (new)": {
|
|
"prefix": "restrictions",
|
|
"body": [
|
|
"\\begin{restrictions}[]{$1}",
|
|
"\t$2",
|
|
"\\end{restrictions}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about restrictions"
|
|
},
|
|
"Limitations (new)": {
|
|
"prefix": "limitations",
|
|
"body": [
|
|
"\\begin{limitations}[]{$1}",
|
|
"\t$2",
|
|
"\\end{limitations}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about limitations"
|
|
},
|
|
"Theorem (new)": {
|
|
"prefix": "theorem",
|
|
"body": [
|
|
"\\begin{theorem}[]{$1}",
|
|
"\t$2",
|
|
"\\end{theorem}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about theorems"
|
|
},
|
|
"Lemma (new)": {
|
|
"prefix": "lemma",
|
|
"body": [
|
|
"\\begin{lemma}[]{$1}",
|
|
"\t$2",
|
|
"\\end{lemma}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about lemmas"
|
|
},
|
|
"Corollary (new)": {
|
|
"prefix": "corollary",
|
|
"body": [
|
|
"\\begin{corollary}[]{$1}",
|
|
"\t$2",
|
|
"\\end{corollary}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about corollaries"
|
|
},
|
|
"Terms (new)": {
|
|
"prefix": "terms",
|
|
"body": [
|
|
"\\begin{terms}[]{$1}",
|
|
"\t$2",
|
|
"\\end{terms}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about terms"
|
|
},
|
|
"Proof (new)": {
|
|
"prefix": "proof",
|
|
"body": [
|
|
"\\begin{proof}[]{$1}",
|
|
"\t$2",
|
|
"\\end{proof}"
|
|
],
|
|
"description": "Inserts a tcolorbox to show a proof"
|
|
},
|
|
"Axiom (new)": {
|
|
"prefix": "axiom",
|
|
"body": [
|
|
"\\begin{axiom}[]{$1}",
|
|
"\t$2",
|
|
"\\end{axiom}"
|
|
],
|
|
"description": "Inserts a tcolorbox to show an axiom"
|
|
},
|
|
"Notation (new)": {
|
|
"prefix": "notation",
|
|
"body": [
|
|
"\\begin{notation}[]{$1}",
|
|
"\t$2",
|
|
"\\end{notation}"
|
|
],
|
|
"description": "Inserts a tcolorbox to show notation"
|
|
},
|
|
"Example (new)": {
|
|
"prefix": "example",
|
|
"body": [
|
|
"\\begin{example}[]{$1}",
|
|
"\t$2",
|
|
"\\end{example}"
|
|
],
|
|
"description": "Inserts a tcolorbox to show example"
|
|
},
|
|
"Usage (languages, new)": {
|
|
"prefix": "usage",
|
|
"body": [
|
|
"\\begin{usage}[]{$1}",
|
|
"\t$2",
|
|
"\\end{usage}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about usage in a language context"
|
|
},
|
|
"Conjugation (languages, new)": {
|
|
"prefix": "conjugation",
|
|
"body": [
|
|
"\\begin{conjugation}[]{$1}",
|
|
"\t$2",
|
|
"\\end{conjugation}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about conjugation"
|
|
},
|
|
"Forms (languages, new)": {
|
|
"prefix": "forms",
|
|
"body": [
|
|
"\\begin{forms}[]{$1}",
|
|
"\t$2",
|
|
"\\end{forms}"
|
|
],
|
|
"description": "Inserts a tcolorbox to inform about forms of e.g. grammatical structures"
|
|
},
|
|
"General-Tcolorbox (new)": {
|
|
"prefix": "general-tcb",
|
|
"body": [
|
|
"\\begin{general}[]{${1:title}}{${2:second title}}{${3|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}",
|
|
"\t$4",
|
|
"\\end{general}"
|
|
],
|
|
"description": "Inserts a tcolorbox for general purposes. First bracket is title, second one is second title, third one colour"
|
|
},
|
|
"Derivative": {
|
|
"prefix": "derivative",
|
|
"body": [
|
|
"\\frac{\\mbox{d}}{\\mbox{d}x}$1"
|
|
]
|
|
},
|
|
"Example (inline)": {
|
|
"prefix": "example-inline",
|
|
"body": [
|
|
"\\inlineex"
|
|
]
|
|
},
|
|
"bold": {
|
|
"prefix": "#bold",
|
|
"body": [
|
|
"\\textbf{$1}"
|
|
]
|
|
},
|
|
"italic": {
|
|
"prefix": "#i",
|
|
"body": [
|
|
"\\textit{$1}"
|
|
]
|
|
},
|
|
"bolditalic": {
|
|
"prefix": "#bi",
|
|
"body": [
|
|
"\\textbf{\\textit{$1}}"
|
|
]
|
|
},
|
|
"underlinie": {
|
|
"prefix": "#u",
|
|
"body": [
|
|
"\\underbar{$1}"
|
|
]
|
|
},
|
|
"algebra": {
|
|
"prefix": "algebra",
|
|
"body": [
|
|
"\\langle $1 \\rangle"
|
|
]
|
|
},
|
|
"fill-width": {
|
|
"prefix": "#fill",
|
|
"body": [
|
|
"\\hspace{\\fill}$1"
|
|
]
|
|
},
|
|
"Latex-Colour": {
|
|
"prefix": "colour",
|
|
"body": [
|
|
"${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}"
|
|
]
|
|
},
|
|
"Latex-Text-Colour": {
|
|
"prefix": "colour-text",
|
|
"body": [
|
|
"\\color{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}"
|
|
]
|
|
},
|
|
"German doc": {
|
|
"prefix": "latex-german",
|
|
"body": [
|
|
"\\usepackage[ngerman]{babel}",
|
|
"\\setcounter{lang}{2} % Move below \\begin{document}",
|
|
]
|
|
},
|
|
"Letter": {
|
|
"prefix": "latex-letter",
|
|
"body": [
|
|
"\\documentclass[12pt,a4paper]{scrlttr2}\n",
|
|
"\\input{~/projects/generalSchool/letter-helpers.tex}\n",
|
|
"% Subject",
|
|
"\\setkomavar{subject}{$1}",
|
|
"\\begin{document}\\raggedright",
|
|
"\t\\begin{letter}{Company \\\\\\ Name \\\\\\ Address \\\\\\ CH-Place}",
|
|
"\t\t\\opening{Intro}\n",
|
|
"\t\t$2\n",
|
|
"\t\t\\closing{Mit freundlichen Grüssen}",
|
|
"\t\\end{letter}",
|
|
"\\end{document}",
|
|
]
|
|
},
|
|
} |