Writing text
Text
Quarto builds on Pandoc Markdown, which supports inline formatting for emphasis, code, strikethrough, and superscript/subscript.
Do: Run this in your own Quarto document and see how it looks.
*italics*
**bold**See: In visual mode, or when rendering the document, you should see this:
italics bold
Predict: now suppose you wrap a word in three asterisks instead of one or two, like ***word***. Do you expect this to render as italics, bold, or both combined?
Explain:
***bold italics***bold italics
As predicted, combining the two markers combines both effects.
A few other inline formatting options are useful to know:
- Strikethrough:
~~text~~→text. - Inline (verbatim) code: enclose text in backticks, e.g.
`my_var <- 10`→my_var <- 10. - Superscript / subscript:
superscript^2^→ superscript²,subscript~2~→ subscript₂.
Lists
Quarto supports unordered and ordered lists, including nested lists.
Unordered lists start lines with
*,+, or-:* Item A * Item B + Sub-item B1 * Item C- Item A
- Item B
- Sub-item B1
- Item C
Ordered lists use numbers followed by a dot:
1. First step 2. Second step 3. Third step- First step
- Second step
- Third step
Task lists use
[ ]or[x]:- [ ] Task 1 - [x] Task 2 (done)
Quarto requires a blank line before a list for it to render correctly. Without it, the list items may appear as ordinary text rather than a formatted list. If a list isn’t rendering the way you expect, check for a missing blank line above it first.
Links and Equations
- Inline link:
[Quarto](https://quarto.org)→ Quarto - Autolink URL:
<https://quarto.org>→ https://quarto.org
Quarto supports LaTeX-style math using $ and $$ delimiters:
Inline math:
This is inline: $E = mc^2$.→ This is inline: \(E = mc^2\).Display math, on its own centered line:
$$ E = mc^2 $$\[ E = mc^2 \]
Write the Markdown syntax for a sentence that is both bold and italicized, ending with a variable name written as verbatim code, x, followed by a superscript 2.
***This sentence is bold and italicized***, using `x`^2^.This sentence is bold and italicized, using x2.