[Snippets] Update

This commit is contained in:
2026-02-21 17:11:21 +01:00
parent 14e3825368
commit 28301eb82d

View File

@@ -1,200 +1,198 @@
{ {
"prepare LaTeX Document": { "prepare LaTeX Document": {
"prefix": "latex-prepare", "prefix": "latex-prepare",
"body": [ "body": [
"\\documentclass{article}\n", "\\documentclass{article}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!", "\\newcommand{\\input}{~/projects/latex/janishutz-helpers.tex}\n",
"\\input{\\dir/include.tex}", "\\usepackage{lmodern}",
"\\load{recommended}\n", "\\setFontType{sans}\n",
"\\setup{$1}\n", "\\setup{$1}\n",
"\\begin{document}", "\\begin{document}",
"\\startDocument", "\\startDocument\n\n",
"\\usetcolorboxes", "\\vspace{2cm}",
"$2\n\n", "\\begin{center}\n\n",
"\\end{document}" "\\includegraphics[width=0.6\\linewidth]{~/projects/latex/assets/logo.jpg}",
], "\\end{center}\n\n",
"description": "Prepares a full LaTeX Document for use and compiling" "\\vspace{3cm}",
}, "\\begin{center}",
"Fancy table": { "\t\\begin{Large}",
"prefix": "table", "\t\t\\quote{A funny quote by a professor}",
"body": [ "\t\\end{Large}",
"\\begin{tables}{$1}{$2}\n", "\\hspace{3cm} - Prof. Dr. Professor Name, YEAR",
"\t$3\\\\", "\\end{center}\n",
"\\end{tables}" "\\vspace{2cm}",
], "\\begin{center}",
"description": "Insert a table (without environment)" "\tSEMESTER, ETHZ\\\\[0.2cm]",
}, "\t\\begin{Large}",
"Formula": { "\t\tSummary of the Script and Lectures",
"prefix": "formula", "\t\\end{Large}\\\\[0.2cm]",
"body": [ "\\end{center}",
"\\begin{formula}[]{$1}", "\\end{document}"
"\t$2", ],
"\\end{formula}" "description": "Prepares a full LaTeX Document for use and compiling"
], },
"description": "Inserts a tcolorbox to provide a formula (red)" "Fancy table": {
}, "prefix": "table",
"Definition": { "body": [
"prefix": "definition", "\\begin{tables}{$1}{$2}\n",
"body": [ "\t$3\\\\",
"\\begin{definition}[]{$1}", "\\end{tables}"
"\t$2", ],
"\\end{definition}" "description": "Insert a table (without environment)"
], },
"description": "Inserts a tcolorbox to provide a definition (blue)" "Formula": {
}, "prefix": "formula",
"Recall": { "body": [
"prefix": "recall", "\\begin{formula}[]{$1}",
"body": [ "\t$2",
"\\begin{recall}[]{$1}", "\\end{formula}"
"\t$2", ],
"\\end{recall}" "description": "Inserts a tcolorbox to provide a formula (red)"
], },
"description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)" "Definition": {
}, "prefix": "definition",
"Important Remarks": { "body": [
"prefix": "remarks", "\\begin{definition}[]{$1}",
"body": [ "\t$2",
"\\begin{remark}[]{$1}", "\\end{definition}"
"\t$2", ],
"\\end{remark}" "description": "Inserts a tcolorbox to provide a definition (blue)"
], },
"description": "Inserts a tcolorbox to provide remarks (green), but here numbered" "Recall": {
}, "prefix": "recall",
"Remark (numbered)": { "body": [
"prefix": "remark", "\\begin{recall}[]{$1}",
"body": [ "\t$2",
"\\begin{remarks}[]{$1}", "\\end{recall}"
"\t$2", ],
"\\end{remarks}" "description": "Inserts a tcolorbox to point out / revise of previous knowledge (yellow)"
], },
"description": "Inserts a tcolorbox to provide remarks (green)" "Remark": {
}, "prefix": "remark",
"Guides": { "body": [
"prefix": "guides", "\\begin{remarks}[]{$1}",
"body": [ "\t$2",
"\\begin{guides}[]{$1}{${2:Usage}}", "\\end{remarks}"
"\t$2", ],
"\\end{guides}" "description": "Inserts a tcolorbox to provide remarks (green)"
], },
"description": "Inserts a tcolorbox to provide guides / instructions on how to use (red)" "Properties": {
}, "prefix": "properties",
"Properties": { "body": [
"prefix": "properties", "\\begin{properties}[]{$1}",
"body": [ "\t$2",
"\\begin{properties}[]{$1}", "\\end{properties}"
"\t$2", ],
"\\end{properties}" "description": "Inserts a tcolorbox to inform about properties"
], },
"description": "Inserts a tcolorbox to inform about properties" "Restrictions": {
}, "prefix": "restrictions",
"Restrictions": { "body": [
"prefix": "restrictions", "\\begin{restrictions}[]{$1}",
"body": [ "\t$2",
"\\begin{restrictions}[]{$1}", "\\end{restrictions}"
"\t$2", ],
"\\end{restrictions}" "description": "Inserts a tcolorbox to inform about restrictions"
], },
"description": "Inserts a tcolorbox to inform about restrictions" "Intuition": {
}, "prefix": "restrictions",
"Intuition": { "body": [
"prefix": "restrictions", "\\begin{intuition}[]{$1}",
"body": [ "\t$2",
"\\begin{intuition}[]{$1}", "\\end{intuition}"
"\t$2", ],
"\\end{intuition}" "description": "Tcolorbox to highlight sections about intuition"
], },
"description": "Tcolorbox to highlight sections about intuition" "Limitations": {
}, "prefix": "limitations",
"Limitations": { "body": [
"prefix": "limitations", "\\begin{limitations}[]{$1}",
"body": [ "\t$2",
"\\begin{limitations}[]{$1}", "\\end{limitations}"
"\t$2", ],
"\\end{limitations}" "description": "Inserts a tcolorbox to inform about limitations"
], },
"description": "Inserts a tcolorbox to inform about limitations" "Theorem": {
}, "prefix": "theorem",
"Theorem": { "body": [
"prefix": "theorem", "\\begin{theorem}[]{$1}",
"body": [ "\t$2",
"\\begin{theorem}[]{$1}", "\\end{theorem}"
"\t$2", ],
"\\end{theorem}" "description": "Inserts a tcolorbox to state a theorem"
], },
"description": "Inserts a tcolorbox to inform about theorems" "Lemma": {
}, "prefix": "lemma",
"Lemma": { "body": [
"prefix": "lemma", "\\begin{lemma}[]{$1}",
"body": [ "\t$2",
"\\begin{lemma}[]{$1}", "\\end{lemma}"
"\t$2", ],
"\\end{lemma}" "description": "Inserts a tcolorbox to state a lemma"
], },
"description": "Inserts a tcolorbox to inform about lemmas" "Corollary": {
}, "prefix": "corollary",
"Corollary": { "body": [
"prefix": "corollary", "\\begin{corollary}[]{$1}",
"body": [ "\t$2",
"\\begin{corollary}[]{$1}", "\\end{corollary}"
"\t$2", ],
"\\end{corollary}" "description": "Inserts a tcolorbox to state a corollary"
], },
"description": "Inserts a tcolorbox to inform about corollaries" "Proposition": {
}, "prefix": "proposition",
"Proposition": { "body": [
"prefix": "proposition", "\\begin{proposition}[]{$1}",
"body": [ "\t$2",
"\\begin{proposition}[]{$1}", "\\end{proposition}"
"\t$2", ],
"\\end{proposition}" "description": "Inserts a tcolorbox to state a proposition"
], },
"description": "Inserts a tcolorbox to inform about propositions" "Fact": {
}, "prefix": "fact",
"Fact": { "body": [
"prefix": "fact", "\\begin{fact}[]{$1}",
"body": [ "\t$2",
"\\begin{fact}[]{$1}", "\\end{fact}"
"\t$2", ],
"\\end{fact}" "description": "Inserts a tcolorbox to state a fact"
], },
"description": "Inserts a tcolorbox to inform about facts" "Terms": {
}, "prefix": "terms",
"Terms": { "body": [
"prefix": "terms", "\\begin{terms}[]{$1}",
"body": [ "\t$2",
"\\begin{terms}[]{$1}", "\\end{terms}"
"\t$2", ],
"\\end{terms}" "description": "Inserts a tcolorbox to inform about terms"
], },
"description": "Inserts a tcolorbox to inform about terms" "Proof": {
}, "prefix": "proof",
"Proof": { "body": [
"prefix": "proof", "\\begin{proof}[]{$1}",
"body": [ "\t$2",
"\\begin{proof}[]{$1}", "\\end{proof}"
"\t$2", ],
"\\end{proof}" "description": "Inserts a tcolorbox to show a proof"
], },
"description": "Inserts a tcolorbox to show a proof" "Axiom": {
}, "prefix": "axiom",
"Axiom": { "body": [
"prefix": "axiom", "\\begin{axiom}[]{$1}",
"body": [ "\t$2",
"\\begin{axiom}[]{$1}", "\\end{axiom}"
"\t$2", ],
"\\end{axiom}" "description": "Inserts a tcolorbox to show an axiom"
], },
"description": "Inserts a tcolorbox to show an axiom" "Notation": {
}, "prefix": "notation",
"Notation": { "body": [
"prefix": "notation", "\\begin{notation}[]{$1}",
"body": [ "\t$2",
"\\begin{notation}[]{$1}", "\\end{notation}"
"\t$2", ],
"\\end{notation}" "description": "Inserts a tcolorbox to show notation"
], },
"description": "Inserts a tcolorbox to show notation"
},
"Example": { "Example": {
"prefix": "example", "prefix": "example",
"body": [ "body": [
@@ -213,235 +211,103 @@
], ],
"description": "Inserts a tcolorbox to show example" "description": "Inserts a tcolorbox to show example"
}, },
"Usage": { "Usage": {
"prefix": "usage", "prefix": "usage",
"body": [ "body": [
"\\begin{usage}[]{$1}", "\\begin{usage}[]{$1}",
"\t$2", "\t$2",
"\\end{usage}" "\\end{usage}"
], ],
"description": "Inserts a tcolorbox to inform about usage" "description": "Inserts a tcolorbox to inform about usage"
}, },
"Conjugation": { "General-Tcolorbox": {
"prefix": "conjugation", "prefix": "general-tcb",
"body": [ "body": [
"\\begin{conjugation}[]{$1}", "\\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$2", "\t$4",
"\\end{conjugation}" "\\end{general}"
], ],
"description": "Inserts a tcolorbox to inform about conjugation" "description": "Inserts a tcolorbox for general purposes. First bracket is title, second one is second title, third one colour"
}, },
"Forms": { "Simple-Tcolorbox": {
"prefix": "forms", "prefix": "simple-tcb",
"body": [ "body": [
"\\begin{forms}[]{$1}", "\\begin{simplebox}[]{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}",
"\t$2", "\t$2",
"\\end{forms}" "\\end{simplebox}"
], ],
"description": "Inserts a tcolorbox to inform about forms of e.g. grammatical structures" "description": "Inserts a simple tcolorbox. No title, first argument the colour colour"
}, },
"General-Tcolorbox": { "bold": {
"prefix": "general-tcb", "prefix": "#bold",
"body": [ "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|}}", "\\textbf{$1}"
"\t$4", ]
"\\end{general}" },
], "italic": {
"description": "Inserts a tcolorbox for general purposes. First bracket is title, second one is second title, third one colour" "prefix": "#i",
}, "body": [
"Simple-Tcolorbox": { "\\textit{$1}"
"prefix": "simple-tcb", ]
"body": [ },
"\\begin{simplebox}[]{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}", "bolditalic": {
"\t$2", "prefix": "#bi",
"\\end{simplebox}" "body": [
], "\\textbf{\\textit{$1}}"
"description": "Inserts a simple tcolorbox. No title, first argument the colour colour" ]
}, },
"Derivative": { "underlinie": {
"prefix": "derivative", "prefix": "#u",
"body": [ "body": [
"\\frac{\\mbox{d}}{\\mbox{d}x}$1" "\\underbar{$1}"
] ]
}, },
"Example (inline)": { "angles": {
"prefix": "example-inline", "prefix": "angles",
"body": [ "body": [
"\\inlineex" "\\langle $1 \\rangle"
] ]
}, },
"Example (short)": { "fill-width": {
"prefix": "example-short", "prefix": "#fill",
"body": [ "body": [
"\\shortex" "\\hspace{\\fill}$1"
] ]
}, },
"Definition (inline)": { "Latex-Colour": {
"prefix": "definition-inline", "prefix": "colour",
"body": [ "body": [
"\\inlinedef" "${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}"
] ]
}, },
"Definition (short)": { "Latex-Text-Colour": {
"prefix": "definition-short", "prefix": "colour-text",
"body": [ "body": [
"\\shortdef" "\\color{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}"
] ]
}, },
"Theorem (inline)": { "Set Language": {
"prefix": "theorem-inline", "prefix": "setLang",
"body": [ "body": [
"\\inlinetheorem" "\\setLang{$1}"
] ]
}, },
"Theorem (short)": { "Letter": {
"prefix": "theorem-short", "prefix": "latex-letter",
"body": [ "body": [
"\\shorttheorem" "\\documentclass[12pt,a4paper]{scrlttr2}\n",
] "\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
}, "\\input{\\dir/include.tex}",
"Lemma (inline)": { "\\load{letter}\n",
"prefix": "lemma-inline", "% Subject",
"body": [ "\\setkomavar{subject}{$1}",
"\\inlinelemma" "\\begin{document}\\raggedright",
] "\t\\begin{letter}{Company \\\\\\ Name \\\\\\ Address \\\\\\ CH-Place}",
}, "\t\t\\opening{Intro}\n",
"Lemma (short)": { "\t\t$2\n",
"prefix": "lemma-short", "\t\t\\closing{Kind regards}",
"body": [ "\t\\end{letter}",
"\\shortlemma" "\\end{document}"
] ]
}, }
"Corollary (inline)": {
"prefix": "corollary-inline",
"body": [
"\\inlinecorollary"
]
},
"Corollary (short)": {
"prefix": "corollary-short",
"body": [
"\\shortcorollary"
]
},
"Proposition (inline)": {
"prefix": "proposition-inline",
"body": [
"\\inlineproposition"
]
},
"Proposition (short)": {
"prefix": "proposition-short",
"body": [
"\\shortproposition"
]
},
"Fact (inline)": {
"prefix": "fact-inline",
"body": [
"\\inlinefact"
]
},
"Fact (short)": {
"prefix": "fact-short",
"body": [
"\\shortfact"
]
},
"Axiom (inline)": {
"prefix": "axiom-inline",
"body": [
"\\inlineaxiom"
]
},
"Axiom (short)": {
"prefix": "axiom-short",
"body": [
"\\shortaxiom"
]
},
"Proof (inline)": {
"prefix": "proof-inline",
"body": [
"\\inlineproof"
]
},
"Proof (short)": {
"prefix": "proof-short",
"body": [
"\\shortproof"
]
},
"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}"
]
},
"angles": {
"prefix": "angles",
"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|}}"
]
},
"Set Language": {
"prefix": "setLang",
"body": [
"\\setLang{$1}"
]
},
"Letter": {
"prefix": "latex-letter",
"body": [
"\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}",
"\\load{letter}\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{Kind regards}",
"\t\\end{letter}",
"\\end{document}"
]
}
} }