[Snippets] Update

This commit is contained in:
2026-02-23 08:50:57 +01:00
parent 2db6ae625a
commit cb4057298d

View File

@@ -1,198 +1,198 @@
{ {
"prepare LaTeX Document": { "prepare LaTeX Document": {
"prefix": "latex-prepare", "prefix": "latex-prepare",
"body": [ "body": [
"\\documentclass{article}\n", "\\documentclass{article}\n",
"\\input{~/projects/latex/dist/recommended.tex}\n", "\\newcommand{\\input}{~/projects/latex/janishutz-helpers.tex}\n",
"\\setup{$1}\n", "\\usepackage{lmodern}",
"\\begin{document}", "\\setFontType{sans}\n",
"\\startDocument", "\\setup{$1}\n",
"\\usetcolorboxes", "\\begin{document}",
"$2\n\n", "\\startDocument\n\n",
"\\end{document}" "\\vspace{2cm}",
], "\\begin{center}\n\n",
"description": "Prepares a full LaTeX Document for use and compiling" "\\includegraphics[width=0.6\\linewidth]{~/projects/latex/assets/logo.jpg}",
}, "\\end{center}\n\n",
"Fancy table": { "\\vspace{3cm}",
"prefix": "table", "\\begin{center}",
"body": [ "\t\\begin{Large}",
"\\begin{tables}{$1}{$2}\n", "\t\t\\quote{A funny quote by a professor}",
"\t$3\\\\", "\t\\end{Large}",
"\\end{tables}" "\\hspace{3cm} - Prof. Dr. Professor Name, YEAR",
], "\\end{center}\n",
"description": "Insert a table (without environment)" "\\vspace{2cm}",
}, "\\begin{center}",
"Formula": { "\tSEMESTER, ETHZ\\\\[0.2cm]",
"prefix": "formula", "\t\\begin{Large}",
"body": [ "\t\tSummary of the Script and Lectures",
"\\begin{formula}[]{$1}", "\t\\end{Large}\\\\[0.2cm]",
"\t$2", "\\end{center}",
"\\end{formula}" "\\end{document}"
], ],
"description": "Inserts a tcolorbox to provide a formula (red)" "description": "Prepares a full LaTeX Document for use and compiling"
}, },
"Definition": { "Fancy table": {
"prefix": "definition", "prefix": "table",
"body": [ "body": [
"\\begin{definition}[]{$1}", "\\begin{tables}{$1}{$2}\n",
"\t$2", "\t$3\\\\",
"\\end{definition}" "\\end{tables}"
], ],
"description": "Inserts a tcolorbox to provide a definition (blue)" "description": "Insert a table (without environment)"
}, },
"Recall": { "Formula": {
"prefix": "recall", "prefix": "formula",
"body": [ "body": [
"\\begin{recall}[]{$1}", "\\begin{formula}[]{$1}",
"\t$2", "\t$2",
"\\end{recall}" "\\end{formula}"
], ],
"description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)" "description": "Inserts a tcolorbox to provide a formula (red)"
}, },
"Important Remarks": { "Definition": {
"prefix": "remarks", "prefix": "definition",
"body": [ "body": [
"\\begin{remark}[]{$1}", "\\begin{definition}[]{$1}",
"\t$2", "\t$2",
"\\end{remark}" "\\end{definition}"
], ],
"description": "Inserts a tcolorbox to provide remarks (green), but here numbered" "description": "Inserts a tcolorbox to provide a definition (blue)"
}, },
"Remark (numbered)": { "Recall": {
"prefix": "remark", "prefix": "recall",
"body": [ "body": [
"\\begin{remarks}[]{$1}", "\\begin{recall}[]{$1}",
"\t$2", "\t$2",
"\\end{remarks}" "\\end{recall}"
], ],
"description": "Inserts a tcolorbox to provide remarks (green)" "description": "Inserts a tcolorbox to point out / revise of previous knowledge (yellow)"
}, },
"Guides": { "Remark": {
"prefix": "guides", "prefix": "remark",
"body": [ "body": [
"\\begin{guides}[]{$1}{${2:Usage}}", "\\begin{remarks}[]{$1}",
"\t$2", "\t$2",
"\\end{guides}" "\\end{remarks}"
], ],
"description": "Inserts a tcolorbox to provide guides / instructions on how to use (red)" "description": "Inserts a tcolorbox to provide remarks (green)"
}, },
"Properties": { "Properties": {
"prefix": "properties", "prefix": "properties",
"body": [ "body": [
"\\begin{properties}[]{$1}", "\\begin{properties}[]{$1}",
"\t$2", "\t$2",
"\\end{properties}" "\\end{properties}"
], ],
"description": "Inserts a tcolorbox to inform about properties" "description": "Inserts a tcolorbox to inform about properties"
}, },
"Restrictions": { "Restrictions": {
"prefix": "restrictions", "prefix": "restrictions",
"body": [ "body": [
"\\begin{restrictions}[]{$1}", "\\begin{restrictions}[]{$1}",
"\t$2", "\t$2",
"\\end{restrictions}" "\\end{restrictions}"
], ],
"description": "Inserts a tcolorbox to inform about restrictions" "description": "Inserts a tcolorbox to inform about restrictions"
}, },
"Intuition": { "Intuition": {
"prefix": "restrictions", "prefix": "restrictions",
"body": [ "body": [
"\\begin{intuition}[]{$1}", "\\begin{intuition}[]{$1}",
"\t$2", "\t$2",
"\\end{intuition}" "\\end{intuition}"
], ],
"description": "Tcolorbox to highlight sections about intuition" "description": "Tcolorbox to highlight sections about intuition"
}, },
"Limitations": { "Limitations": {
"prefix": "limitations", "prefix": "limitations",
"body": [ "body": [
"\\begin{limitations}[]{$1}", "\\begin{limitations}[]{$1}",
"\t$2", "\t$2",
"\\end{limitations}" "\\end{limitations}"
], ],
"description": "Inserts a tcolorbox to inform about limitations" "description": "Inserts a tcolorbox to inform about limitations"
}, },
"Theorem": { "Theorem": {
"prefix": "theorem", "prefix": "theorem",
"body": [ "body": [
"\\begin{theorem}[]{$1}", "\\begin{theorem}[]{$1}",
"\t$2", "\t$2",
"\\end{theorem}" "\\end{theorem}"
], ],
"description": "Inserts a tcolorbox to inform about theorems" "description": "Inserts a tcolorbox to state a theorem"
}, },
"Lemma": { "Lemma": {
"prefix": "lemma", "prefix": "lemma",
"body": [ "body": [
"\\begin{lemma}[]{$1}", "\\begin{lemma}[]{$1}",
"\t$2", "\t$2",
"\\end{lemma}" "\\end{lemma}"
], ],
"description": "Inserts a tcolorbox to inform about lemmas" "description": "Inserts a tcolorbox to state a lemma"
}, },
"Corollary": { "Corollary": {
"prefix": "corollary", "prefix": "corollary",
"body": [ "body": [
"\\begin{corollary}[]{$1}", "\\begin{corollary}[]{$1}",
"\t$2", "\t$2",
"\\end{corollary}" "\\end{corollary}"
], ],
"description": "Inserts a tcolorbox to inform about corollaries" "description": "Inserts a tcolorbox to state a corollary"
}, },
"Proposition": { "Proposition": {
"prefix": "proposition", "prefix": "proposition",
"body": [ "body": [
"\\begin{proposition}[]{$1}", "\\begin{proposition}[]{$1}",
"\t$2", "\t$2",
"\\end{proposition}" "\\end{proposition}"
], ],
"description": "Inserts a tcolorbox to inform about propositions" "description": "Inserts a tcolorbox to state a proposition"
}, },
"Fact": { "Fact": {
"prefix": "fact", "prefix": "fact",
"body": [ "body": [
"\\begin{fact}[]{$1}", "\\begin{fact}[]{$1}",
"\t$2", "\t$2",
"\\end{fact}" "\\end{fact}"
], ],
"description": "Inserts a tcolorbox to inform about facts" "description": "Inserts a tcolorbox to state a fact"
}, },
"Terms": { "Terms": {
"prefix": "terms", "prefix": "terms",
"body": [ "body": [
"\\begin{terms}[]{$1}", "\\begin{terms}[]{$1}",
"\t$2", "\t$2",
"\\end{terms}" "\\end{terms}"
], ],
"description": "Inserts a tcolorbox to inform about terms" "description": "Inserts a tcolorbox to inform about terms"
}, },
"Proof": { "Proof": {
"prefix": "proof", "prefix": "proof",
"body": [ "body": [
"\\begin{proof}[]{$1}", "\\begin{proof}[]{$1}",
"\t$2", "\t$2",
"\\end{proof}" "\\end{proof}"
], ],
"description": "Inserts a tcolorbox to show a proof" "description": "Inserts a tcolorbox to show a proof"
}, },
"Axiom": { "Axiom": {
"prefix": "axiom", "prefix": "axiom",
"body": [ "body": [
"\\begin{axiom}[]{$1}", "\\begin{axiom}[]{$1}",
"\t$2", "\t$2",
"\\end{axiom}" "\\end{axiom}"
], ],
"description": "Inserts a tcolorbox to show an axiom" "description": "Inserts a tcolorbox to show an axiom"
}, },
"Notation": { "Notation": {
"prefix": "notation", "prefix": "notation",
"body": [ "body": [
"\\begin{notation}[]{$1}", "\\begin{notation}[]{$1}",
"\t$2", "\t$2",
"\\end{notation}" "\\end{notation}"
], ],
"description": "Inserts a tcolorbox to show notation" "description": "Inserts a tcolorbox to show notation"
}, },
"Example": { "Example": {
"prefix": "example", "prefix": "example",
"body": [ "body": [
@@ -211,233 +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",
"\\input{~/projects/latex/dist/letter.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{Kind regards}",
"\t\\end{letter}",
"\\end{document}"
]
}
} }