quarto.json 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. {
  2. "ipython_interactive": {
  3. "prefix": ["ipyinteractive"],
  4. "body": [
  5. "```{python}",
  6. "from IPython.core.getipython import get_ipython",
  7. "ip = get_ipython()",
  8. "interactive = False",
  9. "if ip is not None and 'interactiveshell.TerminalInteractiveShell' in str(ip):",
  10. " interactive = True",
  11. "```"
  12. ]
  13. },
  14. "<style": {
  15. "prefix": ["<style"],
  16. "body": [
  17. "<style>",
  18. "$1",
  19. "</style>"
  20. ]
  21. },
  22. "style": {
  23. "prefix": ["style"],
  24. "body": [
  25. "<style>",
  26. "$1",
  27. "</style>"
  28. ]
  29. },
  30. "iframe": {
  31. "prefix": ["iframe"],
  32. "body": [
  33. "::: {#fig-${1:cap}}",
  34. "",
  35. "${2:paste embed info}",
  36. "",
  37. "${3:Caption}",
  38. ":::"
  39. ]
  40. },
  41. "tabset": {
  42. "prefix": ["tabset"],
  43. "body": [
  44. ":::: {.panel-tabset}",
  45. "",
  46. "### $1",
  47. "",
  48. "$2",
  49. "",
  50. "### $3",
  51. "",
  52. "$4",
  53. "",
  54. "::::"
  55. ]
  56. },
  57. "fig3": {
  58. "prefix": ["fig3"],
  59. "body": [
  60. ":::: {#fig-${1:label} layout=\"[[1, 1], [1]]\"}",
  61. "",
  62. "![${2:subcap1}](${3:figure}){#fig-$2}",
  63. "",
  64. "![${4:subcap1}](${5:figure}){#fig-$4}",
  65. "",
  66. "![${6:subcap1}](${7:figure}){#fig-$6}",
  67. "",
  68. "${8:caption}",
  69. "::::"
  70. ]
  71. },
  72. "fig2": {
  73. "prefix": ["fig2"],
  74. "body": [
  75. ":::: {#fig-${1:label} layout=\"[1,1]\"}",
  76. "",
  77. "![${2:subcap1}](${3:figure}){#fig-$2}",
  78. "",
  79. "![${4:subcap1}](${5:figure}){#fig-$4}",
  80. "",
  81. "${6:caption}",
  82. "::::"
  83. ]
  84. },
  85. "pycode": {
  86. "prefix": ["pyc"],
  87. "body": ["```{python} ", "$1", "```"]
  88. },
  89. "rcode": {
  90. "prefix": ["rco"],
  91. "body": ["```{r} ", "$1", "```"]
  92. },
  93. "bashcode": {
  94. "prefix": ["bco"],
  95. "body": ["```{bash} ", "$1", "```"]
  96. },
  97. "code": {
  98. "prefix": ["code"],
  99. "body": ["```{$1} ", "$2", "```", "$0"]
  100. },
  101. "pyfig2": {
  102. "prefix": ["pyfig2"],
  103. "body": [
  104. "```{python} ",
  105. "#| label: fig-$1",
  106. "#| fig-cap: \"$2\"",
  107. "#| fig-subcap: ",
  108. "#| - \"$3\"",
  109. "#| - \"$4\"",
  110. "#| layout-ncol: 2",
  111. "",
  112. "import numpy as np",
  113. "import matplotlib.pyplot as plt",
  114. "plt.style.use(['science', 'ieee'])",
  115. "$5",
  116. "plt.legend()",
  117. "plt.show()",
  118. "",
  119. "$6",
  120. "plt.legend()",
  121. "plt.show()",
  122. "```"
  123. ]
  124. },
  125. "pyfig1": {
  126. "prefix": ["pyfig1"],
  127. "body": [
  128. "```{python}",
  129. "#| label: fig-$1",
  130. "#| fig-cap: \"$2\"",
  131. "",
  132. "import numpy as np",
  133. "import matplotlib.pyplot as plt",
  134. "",
  135. "plt.style.use(['science', 'ieee'])",
  136. "$3",
  137. "plt.show()",
  138. "```"
  139. ]
  140. },
  141. "div": {
  142. "prefix": ["div"],
  143. "body": ["::: {$1}", "$0", ":::"]
  144. },
  145. "figref": {
  146. "prefix": ["figref"],
  147. "body": ["@fig-$1"]
  148. },
  149. "tblref": {
  150. "prefix": ["tblref"],
  151. "body": ["@tbl-$1"]
  152. },
  153. "eqnref": {
  154. "prefix": ["eqnref"],
  155. "body": ["@eq-$1"]
  156. },
  157. "secref": {
  158. "prefix": ["secref"],
  159. "body": ["@sec-$1"]
  160. },
  161. "crossref": {
  162. "prefix": ["crossref"],
  163. "body": [
  164. "crossref:",
  165. " fig-title: Figure",
  166. " tbl-title: Table",
  167. " title-delim: .",
  168. " fig-prefix: Figure",
  169. " tbl-prefix: Table",
  170. " eq-prefix: Eq."
  171. ]
  172. },
  173. "fig": {
  174. "prefix": ["fig"],
  175. "body": ["![${1:cap1}](${2:figure}){#fig-$3}"]
  176. },
  177. "background image": {
  178. "prefix": ["bgimg"],
  179. "body": [
  180. "{data-background-image=\"$1\" background-position=center background-size=contain}"
  181. ]
  182. },
  183. "background video": {
  184. "prefix": ["bgvid"],
  185. "body": [
  186. "{background-video=\"$1\" background-size=contain}"
  187. ]
  188. },
  189. "background iframe": {
  190. "prefix": ["bgiframe"],
  191. "body": [
  192. "{background-iframe=\"$1\" background-interactive=true}"
  193. ]
  194. },
  195. "background color": {
  196. "prefix": ["bgcol"],
  197. "body": [
  198. "{background-color=\"$1\"}"
  199. ]
  200. },
  201. "autoanimate": {
  202. "prefix": ["anim"],
  203. "body": [
  204. "{auto-animate=true}"
  205. ]
  206. },
  207. "pl": {
  208. "prefix": ["pl"],
  209. "body": ["::: {.pull-left}", "$0", ":::"]
  210. },
  211. "pr": {
  212. "prefix": ["pr"],
  213. "body": ["::: {.pull-right}", "$0", ":::"]
  214. },
  215. "container": {
  216. "prefix": ["con"],
  217. "body": ["::: {.container}", "$1", ":::"]
  218. },
  219. "incremental": {
  220. "prefix": ["inc"],
  221. "body": ["::: {.incremental}", "-$1", ":::"]
  222. },
  223. "nonincremental": {
  224. "prefix": ["noninc"],
  225. "body": ["::: {.nonincremental}", "-$1", ":::"]
  226. },
  227. "pause": {
  228. "prefix": ["pause"],
  229. "body": [". . ."]
  230. },
  231. "2col": {
  232. "prefix": ["2col"],
  233. "body": [
  234. "::: {.columns}",
  235. "::: {.column width=50%}",
  236. "$1",
  237. ":::",
  238. "::: {.column width=50%}",
  239. "$2",
  240. ":::",
  241. ":::"
  242. ]
  243. },
  244. "cols": {
  245. "prefix": ["cols"],
  246. "body": [
  247. "::: {.columns}",
  248. "::: {.column width=\"$1\"}",
  249. "$2",
  250. ":::",
  251. "::: {.column width=\"$3\"}",
  252. "$4",
  253. ":::",
  254. ":::"
  255. ]
  256. },
  257. "lay": {
  258. "prefix": ["lay"],
  259. "body": ["::: {layout=\"[$1]\"}", "$0", ":::"]
  260. },
  261. "layout-valign": {
  262. "prefix": ["valign"],
  263. "body": ["layout-valign=\"$0\""]
  264. },
  265. "callout": {
  266. "prefix": ["call"],
  267. "body": ["::: {.callout-$1}", "$0", ":::"]
  268. },
  269. "col2": {
  270. "prefix": ["col2"],
  271. "body": ["::: {layout-ncol=2}", "$0", ":::"]
  272. },
  273. "col3": {
  274. "prefix": ["col3"],
  275. "body": ["::: {layout-ncol=3}", "$0", ":::"]
  276. },
  277. "absolute": {
  278. "prefix": ["absolute"],
  279. "body": ["{.absolute top=$1 left=$2 width=\"$3\" height=\"$4\"}"]
  280. },
  281. "width": {
  282. "prefix": ["width"],
  283. "body": ["{width=\"$3\"}"]
  284. },
  285. "hidden": {
  286. "prefix": ["hidden"],
  287. "body": ["{visibility=\"hidden\"}"]
  288. },
  289. "uncount": {
  290. "prefix": ["uncount"],
  291. "body": ["{visibility=\"uncounted\"}"]
  292. },
  293. "align": {
  294. "prefix": ["align"],
  295. "body": ["{fig-align=\"center\"}"]
  296. },
  297. "fragment": {
  298. "prefix": ["frag"],
  299. "body": ["::: {.fragment}", "$0", ":::"]
  300. },
  301. "notes": {
  302. "prefix": ["notes"],
  303. "body": ["::: {.notes}", "$0", ":::"]
  304. },
  305. "aside": {
  306. "prefix": ["aside"],
  307. "body": ["::: {.aside}", "$0", ":::"]
  308. },
  309. "alert": {
  310. "prefix": ["alert"],
  311. "body": ["[$0]{.alert}"]
  312. },
  313. "importmarkdown": {
  314. "prefix": ["importmd"],
  315. "body": ["from IPython.display import display, Markdown"]
  316. },
  317. "pymarkdown": {
  318. "prefix": ["pymd"],
  319. "body": ["display(Markdown(\"\"\"", "{$1}", "\"\"\".format($1 = $1)))", ""]
  320. },
  321. "bibliography": {
  322. "body": "bibliography: references.bib",
  323. "description": "add bibliography yaml",
  324. "prefix": "bib"
  325. },
  326. "diary header": {
  327. "body": ["---", "title: \"$1\"", "date: \"$2\"", "categories: [$3]", "---"],
  328. "description": "Add minimal yaml header",
  329. "prefix": "diary"
  330. },
  331. "yaml header": {
  332. "body": ["---", "title: $1", "format: $2", "---"],
  333. "description": "Add minimal yaml header",
  334. "prefix": "yml"
  335. },
  336. "ref a wrap figure": {
  337. "body": "Fig. \\ref{fig-$1}",
  338. "description": "refer to a label for a wrap figure",
  339. "prefix": "@wrap"
  340. }
  341. }