You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/quarto_features.qmd
+348-2Lines changed: 348 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,14 @@
1
1
---
2
2
title: Quarto features
3
+
bibliography: quarto_features/references.bib
3
4
---
4
5
6
+
In the last page, you worked with Markdown, which is a simple way to format text that works in lots of tools. Quarto lets you keep using that same Markdown, but it also adds extra features on top.
7
+
8
+
Behind the scenes, Quarto uses a program called Pandoc. Pandoc takes your Markdown and converts it into many different formats (for example, HTML, PDF, Word, or slides). On top of Pandoc, Quarto adds its own features and settings (for example, callouts, columns, citations, and cross‑references) that you control from a single `.qmd` file.
9
+
10
+
This page gives a quick tour of some of those "Quarto extras" that go beyond plain Markdown.
11
+
5
12
## Callouts
6
13
7
14
Quarto extends Markdown with **callouts**, which are highlighted boxes you can use for notes, tips, or warnings.
@@ -139,7 +146,7 @@ You can also set the callout to collapse:
This extra information is hidden until you click the arrow.
145
152
:::
@@ -229,7 +236,7 @@ Default callout with icon removed
229
236
230
237
::: {.pale-blue}
231
238
232
-
**Task:** In `markdown.qmd`:
239
+
**Task:** In `quarto_features.qmd`:
233
240
234
241
*[ ] Add a callout of type `tip` with a short title (e.g., "Helpful tip").
235
242
*[ ] Inside the callout, write one sentence of advice (e.g., "Take short breaks when you are concentrating.").
@@ -238,3 +245,342 @@ Default callout with icon removed
238
245
:::
239
246
240
247
## Columns
248
+
249
+
You can create columns using the same `::: ... :::` fenced blocks, with a `.columns` container and one or more `.column` blocks inside.
250
+
251
+
For example:
252
+
253
+
```markdown
254
+
:::: {.columns}
255
+
256
+
::: {.column}
257
+
{fig-alt="Photograph of South Cloisters"}
258
+
:::
259
+
260
+
::: {.column}
261
+
**South Cloisters**, University of Exeter, St Luke's Campus, Heavitree Road, Exeter EX1 2LU
262
+
:::
263
+
264
+
::::
265
+
```
266
+
267
+
:::: {.columns}
268
+
269
+
::: {.column}
270
+
271
+
{fig-alt="Photograph of South Cloisters"}
272
+
273
+
:::
274
+
275
+
::: {.column}
276
+
277
+
**South Cloisters**, University of Exeter, St Luke's Campus, Heavitree Road, Exeter EX1 2LU
278
+
279
+
:::
280
+
281
+
::::
282
+
283
+
By default, columns share the space equally. You can control their width by adding `width=` percentages to each column. For example:
284
+
285
+
```markdown
286
+
:::: {.columns}
287
+
288
+
::: {.column width=60%}
289
+
:::
290
+
291
+
::: {.column width=5%}
292
+
:::
293
+
294
+
::: {.column width=35%}
295
+
:::
296
+
297
+
::::
298
+
```
299
+
300
+
::: {.pale-blue}
301
+
302
+
**Task:** In `quarto_features.qmd`:
303
+
304
+
*[ ] Create two columns with some text in each.
305
+
*[ ] Change one column to 70% width and the other to 30% width.
306
+
307
+
:::
308
+
309
+
## Footnotes
310
+
311
+
```markdown
312
+
Here is some text with a footnote.[^1]
313
+
314
+
[^1]: This is the content of the footnote.
315
+
316
+
You can include additional details by going two line below and tab indent.
317
+
```
318
+
319
+
Here is some text with a footnote.[^1]
320
+
321
+
[^1]: This is the content of the footnote.
322
+
323
+
You can include additional details by going two line below and tab indent.
324
+
325
+
::: {.pale-blue}
326
+
327
+
**Task:** In `quarto_features.qmd`:
328
+
329
+
*[ ] Add one footnote to a sentence and put a little extra detail into the footnote text.
330
+
331
+
:::
332
+
333
+
## Citations
334
+
335
+
With a bibliography file (e.g., `references.bib`), Quarto can automatically format citations and a reference list.
336
+
337
+
A bibliography file (with extension `.bib`) is a text file that stores information about your sources (for example, author, year, title, journal). Each source has a short key, like `@feng_ultrasonic_2006`, that you can use in your writing. Reference managers such as [Zotero](https://www.zotero.org/) can export your library to a `.bib` file, so you do not have to type these entries by hand.
Provide the path to your bibliography in the YAML metadata for the page e.g.,:
346
+
347
+
```yaml
348
+
---
349
+
title: "My Document"
350
+
bibliography: references.bib
351
+
---
352
+
```
353
+
354
+
A simple in-text citation looks like this...
355
+
can wrap in () and [] if want...
356
+
use @ and identifier...
357
+
358
+
:::: {.columns}
359
+
::: {.column width=47%}
360
+
```markdown
361
+
Some frogs can communicate using ultrasonic calls that are far above the range of human hearing (@feng_ultrasonic_2006).
362
+
```
363
+
:::
364
+
::: {.column width=6%}
365
+
:::
366
+
::: {.column width=47%}
367
+
Some frogs can communicate using ultrasonic calls that are far above the range of human hearing (@feng_ultrasonic_2006).
368
+
:::
369
+
::::
370
+
371
+
Multiple citations can be combined, use semicolon to separate
372
+
373
+
:::: {.columns}
374
+
::: {.column width=47%}
375
+
```markdown
376
+
Ultrasonic communication in frogs shows that amphibian hearing and vocal behaviour are more flexible than scientists once thought (@feng_ultrasonic_2006; @starnberger_uni-_2014).
377
+
```
378
+
:::
379
+
::: {.column width=6%}
380
+
:::
381
+
::: {.column width=47%}
382
+
Ultrasonic communication in frogs shows that amphibian hearing and vocal behaviour are more flexible than scientists once thought (@feng_ultrasonic_2006; @starnberger_uni-_2014).
383
+
:::
384
+
::::
385
+
386
+
By default, a list of works cited will be placed at the end of the document. You can change where this is by provided `refs` div -
387
+
388
+
::::: {.columns}
389
+
:::: {.column width=30%}
390
+
391
+
```markdown
392
+
::: {#refs}
393
+
:::
394
+
```
395
+
396
+
::::
397
+
398
+
:::: {.column width=5%}
399
+
::::
400
+
401
+
:::: {.column width=65%}
402
+
403
+
::: {#refs}
404
+
:::
405
+
406
+
::::
407
+
:::::
408
+
409
+
::: {.pale-blue}
410
+
411
+
**Task:** In `quarto_features.qmd`:
412
+
413
+
*[ ] A bib file is provided... add citation using key from file...
414
+
415
+
:::
416
+
417
+
## Cross-references
418
+
419
+
TODO: explain this better... how to do with figures, tables and equation...
420
+
421
+
Quarto can automatically number and cross‑reference figures, tables, sections, and equations.
422
+
423
+
To make something cross‑referenceable, you give it an identifier, then refer to it with `@id`. For example, a section:
424
+
425
+
```markdown
426
+
## Results {#sec-results}
427
+
428
+
As shown in @sec-results, we found that ...
429
+
```
430
+
431
+
::: {.pale-blue}
432
+
433
+
**Task:** In `quarto_features.qmd`:
434
+
435
+
*[ ] Add an ID to one heading then write a sentence later that references it.
436
+
437
+
:::
438
+
439
+
## Math
440
+
441
+
Quarto supports LaTeX‑style math notation for inline and display equations.
442
+
443
+
LaTeX is a markup language commonly used for writing mathematics. Quarto understands a subset of LaTeX math syntax so you can write formulas directly in your text. Inline math appears inside a sentence (for example, `$y = mx + c$`), and display math appears on its own line, centred and spaced out, using `$$ ... $$`.
444
+
445
+
In-line math:
446
+
447
+
:::: {.columns}
448
+
::: {.column width=60%}
449
+
```markdown
450
+
The solution is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
451
+
```
452
+
:::
453
+
::: {.column width=5%}
454
+
:::
455
+
::: {.column width=35%}
456
+
The solution is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
457
+
:::
458
+
::::
459
+
460
+
Display math:
461
+
462
+
:::: {.columns}
463
+
::: {.column width=60%}
464
+
```markdown
465
+
$$
466
+
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
467
+
$$
468
+
```
469
+
:::
470
+
::: {.column width=5%}
471
+
:::
472
+
::: {.column width=35%}
473
+
$$
474
+
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
475
+
$$
476
+
:::
477
+
::::
478
+
479
+
::: {.pale-blue}
480
+
481
+
**Task:** In `quarto_features.qmd`:
482
+
483
+
*[ ] Add one short inline formula and one display formula (e.g., `y = mx + c`)
484
+
485
+
:::
486
+
487
+
## Definition lists
488
+
489
+
Definition lists are useful for small glossaries or when you want to introduce a few key concepts with short explanations. To creat them, write therm term on online line, then start the defintion on the next line with a colon `:` and space.
490
+
491
+
:::: {.columns}
492
+
::: {.column width=40%}
493
+
```markdown
494
+
Thing 1
495
+
: Definition of thing 1
496
+
497
+
Thing 2
498
+
: Definition of thing 2
499
+
```
500
+
:::
501
+
::: {.column width=5%}
502
+
:::
503
+
::: {.column width=55%}
504
+
<br>
505
+
506
+
Thing 1
507
+
: Definition of thing 1
508
+
509
+
Thing 2
510
+
: Definition of thing 2
511
+
:::
512
+
::::
513
+
514
+
::: {.pale-blue}
515
+
516
+
**Task:** In `quarto_features.qmd`:
517
+
518
+
*[ ] Create a short definition list with two terms and one-sentence definitions for each.
519
+
520
+
:::
521
+
522
+
## Line blocks
523
+
524
+
By default, Markdown ignores most extra spaces at the start of a line and treats single line breaks as part of the same paragraph. Line blocks give you precise control: they keep each line and its leading spaces exactly as you typed them.
525
+
526
+
Default:
527
+
528
+
:::: {.columns}
529
+
::: {.column width=45%}
530
+
```markdown
531
+
South Cloisters,
532
+
University of Exeter,
533
+
St Luke's Campus,
534
+
Heavitree Road,
535
+
Exeter EX1 2LU
536
+
```
537
+
:::
538
+
::: {.column width=10%}
539
+
:::
540
+
::: {.column width=45%}
541
+
South Cloisters,
542
+
University of Exeter,
543
+
St Luke's Campus,
544
+
Heavitree Road,
545
+
Exeter EX1 2LU
546
+
:::
547
+
::::
548
+
549
+
Line block:
550
+
551
+
:::: {.columns}
552
+
::: {.column width=45%}
553
+
```markdown
554
+
| South Cloisters,
555
+
| University of Exeter,
556
+
| St Luke's Campus,
557
+
| Heavitree Road,
558
+
| Exeter EX1 2LU
559
+
```
560
+
:::
561
+
::: {.column width=10%}
562
+
:::
563
+
::: {.column width=45%}
564
+
| South Cloisters,
565
+
| University of Exeter,
566
+
| St Luke's Campus,
567
+
| Heavitree Road,
568
+
| Exeter EX1 2LU
569
+
:::
570
+
::::
571
+
572
+
::: {.pale-blue}
573
+
574
+
**Task:** In `quarto_features.qmd`:
575
+
576
+
*[ ] Write a three‑line address or short poem using a line block and check that the line breaks are preserved after rendering.
0 commit comments