Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita40cb18

Browse files
authored
add: quarto snippets for footnotes and citations (rafamadriz#438)
* feat: add citation snippet* feat: add snippet for inline foot note* feat: add snippet for longer foot note* feat: add various qurto snippets from jmbuhr/quarto-nvim-kickstarter
1 parentdd2fd12 commita40cb18

File tree

1 file changed

+334
-1
lines changed

1 file changed

+334
-1
lines changed

‎snippets/quarto.json‎

Lines changed: 334 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,338 @@
124124
":::"
125125
],
126126
"description":"Insert callout block"
127-
}
127+
},
128+
"Insert citation": {
129+
"prefix":"cite",
130+
"body": [
131+
"[@${1:city-key}]"
132+
],
133+
"description":"Insert a citation"
134+
},
135+
"Insert an inline footnote": {
136+
"prefix":"footnote-inline",
137+
"body": [
138+
"[^${1:note text}]"
139+
],
140+
"description":"Insert an inline footnote"
141+
},
142+
"Insert a footnote": {
143+
"prefix":"footnote",
144+
"body": [
145+
"[^${1:note identifier}]",
146+
"[^$1]: ${2:note text}"
147+
],
148+
"description":"Insert an inline footnote"
149+
},
150+
"iframe": {
151+
"prefix": ["iframe"],
152+
"body": [
153+
"::: {#fig-${1:cap}}",
154+
"",
155+
"${2:paste embed info}",
156+
"",
157+
"${3:Caption}",
158+
":::"
159+
]
160+
},
161+
"tabset": {
162+
"prefix": ["tabset"],
163+
"body": [
164+
":::: {.panel-tabset}",
165+
"",
166+
"### $1",
167+
"",
168+
"$2",
169+
"",
170+
"### $3",
171+
"",
172+
"$4",
173+
"",
174+
"::::"
175+
]
176+
},
177+
"fig3": {
178+
"prefix": ["fig3"],
179+
"body": [
180+
":::: {#fig-${1:label} layout=\"[[1, 1], [1]]\"}",
181+
"",
182+
"![${2:subcap1}](${3:figure}){#fig-$2}",
183+
"",
184+
"![${4:subcap1}](${5:figure}){#fig-$4}",
185+
"",
186+
"![${6:subcap1}](${7:figure}){#fig-$6}",
187+
"",
188+
"${8:caption}",
189+
"::::"
190+
]
191+
},
192+
"fig2": {
193+
"prefix": ["fig2"],
194+
"body": [
195+
":::: {#fig-${1:label} layout=\"[1,1]\"}",
196+
"",
197+
"![${2:subcap1}](${3:figure}){#fig-$2}",
198+
"",
199+
"![${4:subcap1}](${5:figure}){#fig-$4}",
200+
"",
201+
"${6:caption}",
202+
"::::"
203+
]
204+
},
205+
"pycode": {
206+
"prefix": ["pyc"],
207+
"body": ["```{python}","$1","```"]
208+
},
209+
"rcode": {
210+
"prefix": ["rco"],
211+
"body": ["```{r}","$1","```"]
212+
},
213+
"bashcode": {
214+
"prefix": ["bco"],
215+
"body": ["```{bash}","$1","```"]
216+
},
217+
"code": {
218+
"prefix": ["code"],
219+
"body": ["```{$1}","$2","```","$0"]
220+
},
221+
"pyfig2": {
222+
"prefix": ["pyfig2"],
223+
"body": [
224+
"```{python}",
225+
"#| label: fig-$1",
226+
"#| fig-cap:\"$2\"",
227+
"#| fig-subcap:",
228+
"#| -\"$3\"",
229+
"#| -\"$4\"",
230+
"#| layout-ncol: 2",
231+
"",
232+
"import numpy as np",
233+
"import matplotlib.pyplot as plt",
234+
"plt.style.use(['science', 'ieee'])",
235+
"$5",
236+
"plt.legend()",
237+
"plt.show()",
238+
"",
239+
"$6",
240+
"plt.legend()",
241+
"plt.show()",
242+
"```"
243+
]
244+
},
245+
"pyfig1": {
246+
"prefix": ["pyfig1"],
247+
"body": [
248+
"```{python}",
249+
"#| label: fig-$1",
250+
"#| fig-cap:\"$2\"",
251+
"",
252+
"import numpy as np",
253+
"import matplotlib.pyplot as plt",
254+
"",
255+
"plt.style.use(['science', 'ieee'])",
256+
"$3",
257+
"plt.show()",
258+
"```"
259+
]
260+
},
261+
"div": {
262+
"prefix": ["div"],
263+
"body": ["::: {$1}","$0",":::"]
264+
},
265+
"figref": {
266+
"prefix": ["figref"],
267+
"body": ["@fig-$1"]
268+
},
269+
"tblref": {
270+
"prefix": ["tblref"],
271+
"body": ["@tbl-$1"]
272+
},
273+
"eqnref": {
274+
"prefix": ["eqnref"],
275+
"body": ["@eq-$1"]
276+
},
277+
"secref": {
278+
"prefix": ["secref"],
279+
"body": ["@sec-$1"]
280+
},
281+
"crossref": {
282+
"prefix": ["crossref"],
283+
"body": [
284+
"crossref:",
285+
" fig-title: Figure",
286+
" tbl-title: Table",
287+
" title-delim: .",
288+
" fig-prefix: Figure",
289+
" tbl-prefix: Table",
290+
" eq-prefix: Eq."
291+
]
292+
},
293+
"fig": {
294+
"prefix": ["fig"],
295+
"body": ["![${1:cap1}](${2:figure}){#fig-$3}"]
296+
},
297+
"background image": {
298+
"prefix": ["bgimg"],
299+
"body": [
300+
"{data-background-image=\"$1\" background-position=center background-size=contain}"
301+
]
302+
},
303+
"background video": {
304+
"prefix": ["bgvid"],
305+
"body": [
306+
"{background-video=\"$1\" background-size=contain}"
307+
]
308+
},
309+
"background iframe": {
310+
"prefix": ["bgiframe"],
311+
"body": [
312+
"{background-iframe=\"$1\" background-interactive=true}"
313+
]
314+
},
315+
"background color": {
316+
"prefix": ["bgcol"],
317+
"body": [
318+
"{background-color=\"$1\"}"
319+
]
320+
},
321+
"autoanimate": {
322+
"prefix": ["anim"],
323+
"body": [
324+
"{auto-animate=true}"
325+
]
326+
},
327+
"pl": {
328+
"prefix": ["pl"],
329+
"body": ["::: {.pull-left}","$0",":::"]
330+
},
331+
"pr": {
332+
"prefix": ["pr"],
333+
"body": ["::: {.pull-right}","$0",":::"]
334+
},
335+
"container": {
336+
"prefix": ["con"],
337+
"body": ["::: {.container}","$1",":::"]
338+
},
339+
"incremental": {
340+
"prefix": ["inc"],
341+
"body": ["::: {.incremental}","-$1",":::"]
342+
},
343+
"nonincremental": {
344+
"prefix": ["noninc"],
345+
"body": ["::: {.nonincremental}","-$1",":::"]
346+
},
347+
"pause": {
348+
"prefix": ["pause"],
349+
"body": [". . ."]
350+
},
351+
"2col": {
352+
"prefix": ["2col"],
353+
"body": [
354+
"::: {.columns}",
355+
"::: {.column width=50%}",
356+
"$1",
357+
":::",
358+
"::: {.column width=50%}",
359+
"$2",
360+
":::",
361+
":::"
362+
]
363+
},
364+
"cols": {
365+
"prefix": ["cols"],
366+
"body": [
367+
"::: {.columns}",
368+
"::: {.column width=\"$1\"}",
369+
"$2",
370+
":::",
371+
"::: {.column width=\"$3\"}",
372+
"$4",
373+
":::",
374+
":::"
375+
]
376+
},
377+
"lay": {
378+
"prefix": ["lay"],
379+
"body": ["::: {layout=\"[$1]\"}","$0",":::"]
380+
},
381+
"layout-valign": {
382+
"prefix": ["valign"],
383+
"body": ["layout-valign=\"$0\""]
384+
},
385+
"callout": {
386+
"prefix": ["call"],
387+
"body": ["::: {.callout-$1}","$0",":::"]
388+
},
389+
"col2": {
390+
"prefix": ["col2"],
391+
"body": ["::: {layout-ncol=2}","$0",":::"]
392+
},
393+
"col3": {
394+
"prefix": ["col3"],
395+
"body": ["::: {layout-ncol=3}","$0",":::"]
396+
},
397+
"absolute": {
398+
"prefix": ["absolute"],
399+
"body": ["{.absolute top=$1 left=$2 width=\"$3\" height=\"$4\"}"]
400+
},
401+
"width": {
402+
"prefix": ["width"],
403+
"body": ["{width=\"$3\"}"]
404+
},
405+
"hidden": {
406+
"prefix": ["hidden"],
407+
"body": ["{visibility=\"hidden\"}"]
408+
},
409+
"uncount": {
410+
"prefix": ["uncount"],
411+
"body": ["{visibility=\"uncounted\"}"]
412+
},
413+
"align": {
414+
"prefix": ["align"],
415+
"body": ["{fig-align=\"center\"}"]
416+
},
417+
"fragment": {
418+
"prefix": ["frag"],
419+
"body": ["::: {.fragment}","$0",":::"]
420+
},
421+
"notes": {
422+
"prefix": ["notes"],
423+
"body": ["::: {.notes}","$0",":::"]
424+
},
425+
"aside": {
426+
"prefix": ["aside"],
427+
"body": ["::: {.aside}","$0",":::"]
428+
},
429+
"alert": {
430+
"prefix": ["alert"],
431+
"body": ["[$0]{.alert}"]
432+
},
433+
"importmarkdown": {
434+
"prefix": ["importmd"],
435+
"body": ["from IPython.display import display, Markdown"]
436+
},
437+
"pymarkdown": {
438+
"prefix": ["pymd"],
439+
"body": ["display(Markdown(\"\"\"","{$1}","\"\"\".format($1 = $1)))",""]
440+
},
441+
"bibliography": {
442+
"body":"bibliography: references.bib",
443+
"description":"add bibliography yaml",
444+
"prefix":"bib"
445+
},
446+
"diary header": {
447+
"body": ["---","title:\"$1\"","date:\"$2\"","categories: [$3]","---"],
448+
"description":"Add minimal yaml header",
449+
"prefix":"diary"
450+
},
451+
"yaml header": {
452+
"body": ["---","title: $1","format: $2","---"],
453+
"description":"Add minimal yaml header",
454+
"prefix":"yml"
455+
},
456+
"ref a wrap figure": {
457+
"body":"Fig.\\ref{fig-$1}",
458+
"description":"refer to a label for a wrap figure",
459+
"prefix":"@wrap"
460+
}
128461
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp