10:00
Overview
Course materials can be found at:
https://github.com/USFWS/intro-to-quarto .
“Help!”
“All done!”
10:00
Yet Another Markup Language = document metadata!
key: value
that can nesthtml
, docx
)theme
, fig-width
)Another option: Use your friendly assistant!
tab
to complete or …Ctrl+space
to see available options.
10:00
This is an example of how you could change
inline elements of text body Markdown in a FWS
report. You can make a word *italicized* or
**bold**. You can also display code, such as
`exp(10) + 1`. You can even ~~strikethrough~~
and make something a subscript~1~ or
superscript^1^. For more advanced customization,
you can use [spans]{.mark} to apply
custom-defined or built-in attributes to
[inline elements]{style="color:blue;"}.
This is an example of how you could change
inline elements of text body Markdown in a FWS report. You can make a word italicized or
bold. You can also display code, such as
exp(10) + 1
. You can even strikethrough
and make something a subscript1 or superscript1. For more advanced customization, you can use spans to apply custom-defined or built-in attributes to inline elements.
with LaTex!
For more information on how to use Quarto,
check out the Quarto webpage.
Here’s an image that is inline with
my text .
Here's a paragraph. To separate it from the next
paragraph, you need to add one or more empty
lines.
This is a new paragraph. A paragraph is an
example of a block element. You can format each
paragraph (or a set of paragraphs) independently,
using divs to group regions of content and apply
styling.
::: {.callout-tip}
## Custom block element
Here's an example of a block with custom
formatting. Everything in this block has this
format. Specifically, this is a "callout block",
which is a built-in feature of Quarto that uses
div syntax.
:::
Here’s a paragraph. To separate it from the next paragraph, you need to add one or more empty lines.
This is a new paragraph. A paragraph is an
example of a block element. You can format each
paragraph (or a set of paragraphs) independently, using divs to group regions of content and apply styling.
Custom block element
Here’s an example of a block with custom formatting. Everything in this block has this format. Specifically, this is a “callout block”, which is a built-in feature of Quarto that uses div syntax.
Markdown Syntax | Output |
---|---|
|
Header 1 |
|
Header 2 |
|
Header 3 |
|
Header 4 |
with LaTex!
The Cauchy-Schwarz Inequality
\[ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \] is an upper bound on the inner product between two vectors in an inner product space in terms of the product of the vector norms.
Here’s a paragraph of text. We describe
something of great importance. So great,
in fact, that we need to also include an image.
Moving along, we will describe something else.
10:00
```
{}
#|
Avoid using underscores (_) in labels and IDs.
This can cause problems when rendering to PDF with LaTeX.
Option | Description |
---|---|
eval |
Evaluate the code chunk (if false , just echos the code into the output). |
echo |
Include the source code in output |
output |
Include the results of executing the code in the output (true , false , or asis to indicate that the output is raw markdown and should not have any of Quarto’s standard enclosing markdown). |
warning |
Include warnings in the output. |
error |
Include errors in the output. |
include |
Catch all for preventing any output (code or results) from being included (e.g. include: false suppresses all output from the code block). |
Tab Completion is your friend!
This is an example of how you could use code to calculate and report that species in the iris dataset with the longest sepal length is the virginica.
10:00
Leading to… efficiency, standardization, reduced error, reproducible science, innovation!
10:00