| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341 |
- {
- "ipython_interactive": {
- "prefix": ["ipyinteractive"],
- "body": [
- "```{python}",
- "from IPython.core.getipython import get_ipython",
- "ip = get_ipython()",
- "interactive = False",
- "if ip is not None and 'interactiveshell.TerminalInteractiveShell' in str(ip):",
- " interactive = True",
- "```"
- ]
- },
- "<style": {
- "prefix": ["<style"],
- "body": [
- "<style>",
- "$1",
- "</style>"
- ]
- },
- "style": {
- "prefix": ["style"],
- "body": [
- "<style>",
- "$1",
- "</style>"
- ]
- },
- "iframe": {
- "prefix": ["iframe"],
- "body": [
- "::: {#fig-${1:cap}}",
- "",
- "${2:paste embed info}",
- "",
- "${3:Caption}",
- ":::"
- ]
- },
- "tabset": {
- "prefix": ["tabset"],
- "body": [
- ":::: {.panel-tabset}",
- "",
- "### $1",
- "",
- "$2",
- "",
- "### $3",
- "",
- "$4",
- "",
- "::::"
- ]
- },
- "fig3": {
- "prefix": ["fig3"],
- "body": [
- ":::: {#fig-${1:label} layout=\"[[1, 1], [1]]\"}",
- "",
- "{#fig-$2}",
- "",
- "{#fig-$4}",
- "",
- "{#fig-$6}",
- "",
- "${8:caption}",
- "::::"
- ]
- },
- "fig2": {
- "prefix": ["fig2"],
- "body": [
- ":::: {#fig-${1:label} layout=\"[1,1]\"}",
- "",
- "{#fig-$2}",
- "",
- "{#fig-$4}",
- "",
- "${6:caption}",
- "::::"
- ]
- },
- "pycode": {
- "prefix": ["pyc"],
- "body": ["```{python} ", "$1", "```"]
- },
- "rcode": {
- "prefix": ["rco"],
- "body": ["```{r} ", "$1", "```"]
- },
- "bashcode": {
- "prefix": ["bco"],
- "body": ["```{bash} ", "$1", "```"]
- },
- "code": {
- "prefix": ["code"],
- "body": ["```{$1} ", "$2", "```", "$0"]
- },
- "pyfig2": {
- "prefix": ["pyfig2"],
- "body": [
- "```{python} ",
- "#| label: fig-$1",
- "#| fig-cap: \"$2\"",
- "#| fig-subcap: ",
- "#| - \"$3\"",
- "#| - \"$4\"",
- "#| layout-ncol: 2",
- "",
- "import numpy as np",
- "import matplotlib.pyplot as plt",
- "plt.style.use(['science', 'ieee'])",
- "$5",
- "plt.legend()",
- "plt.show()",
- "",
- "$6",
- "plt.legend()",
- "plt.show()",
- "```"
- ]
- },
- "pyfig1": {
- "prefix": ["pyfig1"],
- "body": [
- "```{python}",
- "#| label: fig-$1",
- "#| fig-cap: \"$2\"",
- "",
- "import numpy as np",
- "import matplotlib.pyplot as plt",
- "",
- "plt.style.use(['science', 'ieee'])",
- "$3",
- "plt.show()",
- "```"
- ]
- },
- "div": {
- "prefix": ["div"],
- "body": ["::: {$1}", "$0", ":::"]
- },
- "figref": {
- "prefix": ["figref"],
- "body": ["@fig-$1"]
- },
- "tblref": {
- "prefix": ["tblref"],
- "body": ["@tbl-$1"]
- },
- "eqnref": {
- "prefix": ["eqnref"],
- "body": ["@eq-$1"]
- },
- "secref": {
- "prefix": ["secref"],
- "body": ["@sec-$1"]
- },
- "crossref": {
- "prefix": ["crossref"],
- "body": [
- "crossref:",
- " fig-title: Figure",
- " tbl-title: Table",
- " title-delim: .",
- " fig-prefix: Figure",
- " tbl-prefix: Table",
- " eq-prefix: Eq."
- ]
- },
- "fig": {
- "prefix": ["fig"],
- "body": ["{#fig-$3}"]
- },
- "background image": {
- "prefix": ["bgimg"],
- "body": [
- "{data-background-image=\"$1\" background-position=center background-size=contain}"
- ]
- },
- "background video": {
- "prefix": ["bgvid"],
- "body": [
- "{background-video=\"$1\" background-size=contain}"
- ]
- },
- "background iframe": {
- "prefix": ["bgiframe"],
- "body": [
- "{background-iframe=\"$1\" background-interactive=true}"
- ]
- },
- "background color": {
- "prefix": ["bgcol"],
- "body": [
- "{background-color=\"$1\"}"
- ]
- },
- "autoanimate": {
- "prefix": ["anim"],
- "body": [
- "{auto-animate=true}"
- ]
- },
- "pl": {
- "prefix": ["pl"],
- "body": ["::: {.pull-left}", "$0", ":::"]
- },
- "pr": {
- "prefix": ["pr"],
- "body": ["::: {.pull-right}", "$0", ":::"]
- },
- "container": {
- "prefix": ["con"],
- "body": ["::: {.container}", "$1", ":::"]
- },
- "incremental": {
- "prefix": ["inc"],
- "body": ["::: {.incremental}", "-$1", ":::"]
- },
- "nonincremental": {
- "prefix": ["noninc"],
- "body": ["::: {.nonincremental}", "-$1", ":::"]
- },
- "pause": {
- "prefix": ["pause"],
- "body": [". . ."]
- },
- "2col": {
- "prefix": ["2col"],
- "body": [
- "::: {.columns}",
- "::: {.column width=50%}",
- "$1",
- ":::",
- "::: {.column width=50%}",
- "$2",
- ":::",
- ":::"
- ]
- },
- "cols": {
- "prefix": ["cols"],
- "body": [
- "::: {.columns}",
- "::: {.column width=\"$1\"}",
- "$2",
- ":::",
- "::: {.column width=\"$3\"}",
- "$4",
- ":::",
- ":::"
- ]
- },
- "lay": {
- "prefix": ["lay"],
- "body": ["::: {layout=\"[$1]\"}", "$0", ":::"]
- },
- "layout-valign": {
- "prefix": ["valign"],
- "body": ["layout-valign=\"$0\""]
- },
- "callout": {
- "prefix": ["call"],
- "body": ["::: {.callout-$1}", "$0", ":::"]
- },
- "col2": {
- "prefix": ["col2"],
- "body": ["::: {layout-ncol=2}", "$0", ":::"]
- },
- "col3": {
- "prefix": ["col3"],
- "body": ["::: {layout-ncol=3}", "$0", ":::"]
- },
- "absolute": {
- "prefix": ["absolute"],
- "body": ["{.absolute top=$1 left=$2 width=\"$3\" height=\"$4\"}"]
- },
- "width": {
- "prefix": ["width"],
- "body": ["{width=\"$3\"}"]
- },
- "hidden": {
- "prefix": ["hidden"],
- "body": ["{visibility=\"hidden\"}"]
- },
- "uncount": {
- "prefix": ["uncount"],
- "body": ["{visibility=\"uncounted\"}"]
- },
- "align": {
- "prefix": ["align"],
- "body": ["{fig-align=\"center\"}"]
- },
- "fragment": {
- "prefix": ["frag"],
- "body": ["::: {.fragment}", "$0", ":::"]
- },
- "notes": {
- "prefix": ["notes"],
- "body": ["::: {.notes}", "$0", ":::"]
- },
- "aside": {
- "prefix": ["aside"],
- "body": ["::: {.aside}", "$0", ":::"]
- },
- "alert": {
- "prefix": ["alert"],
- "body": ["[$0]{.alert}"]
- },
- "importmarkdown": {
- "prefix": ["importmd"],
- "body": ["from IPython.display import display, Markdown"]
- },
- "pymarkdown": {
- "prefix": ["pymd"],
- "body": ["display(Markdown(\"\"\"", "{$1}", "\"\"\".format($1 = $1)))", ""]
- },
- "bibliography": {
- "body": "bibliography: references.bib",
- "description": "add bibliography yaml",
- "prefix": "bib"
- },
- "diary header": {
- "body": ["---", "title: \"$1\"", "date: \"$2\"", "categories: [$3]", "---"],
- "description": "Add minimal yaml header",
- "prefix": "diary"
- },
- "yaml header": {
- "body": ["---", "title: $1", "format: $2", "---"],
- "description": "Add minimal yaml header",
- "prefix": "yml"
- },
- "ref a wrap figure": {
- "body": "Fig. \\ref{fig-$1}",
- "description": "refer to a label for a wrap figure",
- "prefix": "@wrap"
- }
- }
|