Skip to content

Commit 1222e47

Browse files
committed
Merge branch 'pr/Blake-Madden/1221'
2 parents 9dd130e + e456a35 commit 1222e47

File tree

26 files changed

+77
-76
lines changed

26 files changed

+77
-76
lines changed

_freeze/docs/blog/posts/2022-02-17-advanced-layout/index/execute-results/html.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"hash": "8a1317ba31af020c6b35bf3c53f60b5c",
2+
"hash": "050f4857f79b6ad8db96b5cb0e3a9f1b",
33
"result": {
4-
"markdown": "---\ntitle: Positioning Content in the Margin\nsubtitle: Create 'Tufte' style documents with sidenotes, margin tables and figures, and other margin content\ndescription: |\n This post demonstrates a few of the capabilities for positioning content in the margin of the page. You can read more about the complete capabilities in the the [Article Layout Guide](/docs/authoring/article-layout.qmd).\nauthor: Charles Teague\ndate: 2/17/2022\ncategories:\n - Features\n - Layout\nimage: margin-content.png\nimage-alt: \"Screenshot of two sections of post: Margin Figures, which has a plot in the margin; and Arbitrary Margin Content, which has text with a LaTeX equation in the margin.\"\nreference-location: margin\ncitation-location: margin\n---\n\n\nQuarto supports a variety of page layout options that enable you to author content that\n\n- Fills the main content region\n- Overflows the content region\n- Spans the entire page\n- Occupies the document margin\n\nThis post will demonstrate a few of the capabilities for positioning content in the margin of the page. You can read more about the complete capabilities in the the [Article Layout Guide](/docs/authoring/article-layout.qmd).\\\n\n## Margin Figures\n\nFigures that you create using code cells can be placed in the margin by using the `column: margin` code cell option. If the code produces more than one figure, each of the figures will be placed in the margin.\n\n\n::: {.cell .column-margin}\n\n````{.cell-code}\n```{{r}}\n#| label: fig-mtcars\n#| fig-cap: \"MPG vs horsepower, colored by transmission.\"\n#| column: margin\n\nlibrary(ggplot2)\nmtcars2 <- mtcars\nmtcars2$am <- factor(\n mtcars$am, labels = c('automatic', 'manual')\n)\nggplot(mtcars2, aes(hp, mpg, color = am)) +\n geom_point() + geom_smooth(formula = y ~ x, method = \"loess\") +\n theme(legend.position = 'bottom')\n```\n````\n\n::: {.cell-output-display}\n![MPG vs horsepower, colored by transmission.](index_files/figure-html/fig-mtcars-1.png){#fig-mtcars width=672}\n:::\n:::\n\n\n## Margin Tables\n\nYou an also place tables in the margin of your document by specifying `column: margin`.\n\n\n::: {.cell .column-margin}\n\n````{.cell-code}\n```{{r}}\n#| column: margin\n\nknitr::kable(\n mtcars[1:3, 1:3]\n)\n```\n````\n\n::: {.cell-output-display}\n| | mpg| cyl| disp|\n|:-------------|----:|---:|----:|\n|Mazda RX4 | 21.0| 6| 160|\n|Mazda RX4 Wag | 21.0| 6| 160|\n|Datsun 710 | 22.8| 4| 108|\n:::\n:::\n\n\n## Other Content\n\nYou can also place content in the margin by targeting the margin column using a div with the .`column-margin` class. For example:\n\n``` md\n::: {.column-margin}\nWe know from *the first fundamental theorem of calculus* that for $x$ in $[a, b]$:\n\n\n$$\\frac{d}{dx}\\left( \\int_{a}^{x} f(u)\\,du\\right)=f(x).$$\n\n:::\n```\n\n::: column-margin\nWe know from *the first fundamental theorem of calculus* that for $x$ in $[a, b]$:\n\n\n$$\\frac{d}{dx}\\left( \\int_{a}^{x} f(u)\\,du\\right)=f(x).$$\n\n:::\n\n## Margin References\n\nFootnotes and the bibliography typically appear at the end of the document, but you can choose to have them placed in the margin by setting the following option\\[\\^1\\] in the document front matter:\n\n``` yaml\n---\nreference-location: margin\ncitation-location: margin\n---\n```\n\nWith these options set, footnotes and citations will (respectively) be automatically be placed in the margin of the document rather than the bottom of the page. As an example, when I cite @xie2018, the citation bibliography entry itself will now appear in the margin.\n\n### Asides\n\nAsides allow you to place content aside from the content it is placed in. Asides look like footnotes, but do not include the footnote mark (the superscript number). [This is a span that has the class `aside` which places it in the margin without a footnote number.]{.aside}\n\n``` markdown\n[This is a span that has the class aside which places it in the margin without a footnote number.]{.aside}\n```\n\n## Margin Captions\n\nFor figures and tables, you may leave the content in the body of the document while placing the caption in the margin of the document. Using `cap-location: margin` in a code cell or document front matter to control this. For example:\n\n\n::: {.cell .caption-margin}\n\n````{.cell-code}\n```{{r}}\n#| label: fig-cap-margin\n#| fig-cap: \"MPG vs horsepower, colored by transmission.\"\n#| cap-location: margin\n\nlibrary(ggplot2)\nmtcars2 <- mtcars\nmtcars2$am <- factor(\n mtcars$am, labels = c('automatic', 'manual')\n)\nggplot(mtcars2, aes(hp, mpg, color = am)) +\n geom_point() + geom_smooth(formula = y ~ x, method = \"loess\") +\n theme(legend.position = 'bottom')\n```\n````\n\n::: {.cell-output-display}\n![MPG vs horsepower, colored by transmission.](index_files/figure-html/fig-cap-margin-1.png){#fig-cap-margin width=672}\n:::\n:::\n",
4+
"engine": "knitr",
5+
"markdown": "---\ntitle: Positioning Content in the Margin\nsubtitle: Create 'Tufte' style documents with sidenotes, margin tables and figures, and other margin content\ndescription: |\n This post demonstrates a few of the capabilities for positioning content in the margin of the page. You can read more about the complete capabilities in the [Article Layout Guide](/docs/authoring/article-layout.qmd).\nauthor: Charles Teague\ndate: \"2/17/2022\"\ncategories:\n - Features\n - Layout\nimage: margin-content.png\nimage-alt: \"Screenshot of two sections of post: Margin Figures, which has a plot in the margin; and Arbitrary Margin Content, which has text with a LaTeX equation in the margin.\"\nreference-location: margin\ncitation-location: margin\n---\n\n\n\nQuarto supports a variety of page layout options that enable you to author content that\n\n- Fills the main content region\n- Overflows the content region\n- Spans the entire page\n- Occupies the document margin\n\nThis post will demonstrate a few of the capabilities for positioning content in the margin of the page. You can read more about the complete capabilities in the [Article Layout Guide](/docs/authoring/article-layout.qmd).\\\n\n## Margin Figures\n\nFigures that you create using code cells can be placed in the margin by using the `column: margin` code cell option. If the code produces more than one figure, each of the figures will be placed in the margin.\n\n\n\n::: {.cell .column-margin}\n\n````{.cell-code}\n```{{r}}\n#| label: fig-mtcars\n#| fig-cap: \"MPG vs horsepower, colored by transmission.\"\n#| column: margin\n\nlibrary(ggplot2)\nmtcars2 <- mtcars\nmtcars2$am <- factor(\n mtcars$am, labels = c('automatic', 'manual')\n)\nggplot(mtcars2, aes(hp, mpg, color = am)) +\n geom_point() +\n geom_smooth(formula = y ~ x, method = \"loess\") +\n theme(legend.position = 'bottom')\n```\n````\n\n::: {.cell-output-display}\n![MPG vs horsepower, colored by transmission.](index_files/figure-html/fig-mtcars-1.png){#fig-mtcars width=672}\n:::\n:::\n\n\n\n## Margin Tables\n\nYou an also place tables in the margin of your document by specifying `column: margin`.\n\n\n\n::: {.cell .column-margin}\n\n````{.cell-code}\n```{{r}}\n#| column: margin\n\nknitr::kable(\n mtcars[1:3, 1:3]\n)\n```\n````\n\n::: {.cell-output-display}\n\n\n| | mpg| cyl| disp|\n|:-------------|----:|---:|----:|\n|Mazda RX4 | 21.0| 6| 160|\n|Mazda RX4 Wag | 21.0| 6| 160|\n|Datsun 710 | 22.8| 4| 108|\n\n\n:::\n:::\n\n\n\n## Other Content\n\nYou can also place content in the margin by targeting the margin column using a div with the .`column-margin` class. For example:\n\n``` md\n::: {.column-margin}\nWe know from *the first fundamental theorem of calculus* that for $x$ in $[a, b]$:\n\n$$\\frac{d}{dx}\\left( \\int_{a}^{x} f(u)\\,du\\right)=f(x).$$\n:::\n```\n\n::: column-margin\nWe know from *the first fundamental theorem of calculus* that for $x$ in $[a, b]$:\n\n$$\\frac{d}{dx}\\left( \\int_{a}^{x} f(u)\\,du\\right)=f(x).$$\n:::\n\n## Margin References\n\nFootnotes and the bibliography typically appear at the end of the document, but you can choose to have them placed in the margin by setting the following option\\[\\^1\\] in the document front matter:\n\n``` yaml\n---\nreference-location: margin\ncitation-location: margin\n---\n```\n\nWith these options set, footnotes and citations will (respectively) be automatically be placed in the margin of the document rather than the bottom of the page. As an example, when I cite @xie2018, the citation bibliography entry itself will now appear in the margin.\n\n### Asides\n\nAsides allow you to place content aside from the content it is placed in. Asides look like footnotes, but do not include the footnote mark (the superscript number). [This is a span that has the class `aside` which places it in the margin without a footnote number.]{.aside}\n\n``` markdown\n[This is a span that has the class aside which places it in the margin without a footnote number.]{.aside}\n```\n\n## Margin Captions\n\nFor figures and tables, you may leave the content in the body of the document while placing the caption in the margin of the document. Using `cap-location: margin` in a code cell or document front matter to control this. For example:\n\n\n\n::: {.cell .caption-margin}\n\n````{.cell-code}\n```{{r}}\n#| label: fig-cap-margin\n#| fig-cap: \"MPG vs horsepower, colored by transmission.\"\n#| cap-location: margin\n\nlibrary(ggplot2)\nmtcars2 <- mtcars\nmtcars2$am <- factor(\n mtcars$am, labels = c('automatic', 'manual')\n)\nggplot(mtcars2, aes(hp, mpg, color = am)) +\n geom_point() +\n geom_smooth(formula = y ~ x, method = \"loess\") +\n theme(legend.position = 'bottom')\n```\n````\n\n::: {.cell-output-display}\n![MPG vs horsepower, colored by transmission.](index_files/figure-html/fig-cap-margin-1.png){#fig-cap-margin width=672}\n:::\n:::\n",
56
"supporting": [
67
"index_files"
78
],
-74.2 KB
Loading
-74.2 KB
Loading

docs/authoring/figures.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ The default LaTeX `figure` is a floating environment, so the specific location i
280280
\end{figure}
281281
```
282282

283-
You can specify `fig-pos` either at the document level, as a executable code block option, or within markdown. Here we do all three:
283+
You can specify `fig-pos` either at the document level, as an executable code block option, or within markdown. Here we do all three:
284284

285285
```` markdown
286286
---
@@ -309,7 +309,7 @@ If your figure was generated by an executable code block and the code was includ
309309
### Short Captions
310310

311311
You can provide a short caption that is used in the "List of Figures" using the `fig-scap` option.
312-
You can specify `fig-scap` as a executable code block option or as an attribute on an image:
312+
You can specify `fig-scap` as an executable code block option or as an attribute on an image:
313313

314314
````markdown
315315
```{{python}}

docs/authoring/notebook-embed.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ aliases:
88

99
## Overview
1010

11-
You can include the output of an another Quarto document (`.qmd` or `.ipynb`) with the `embed` shortcode. To embed the output of a code block or notebook cell, provide the path to document and an identifier for the block or cell. For example, this Jupyter notebook called `penguins.ipynb` has a cell labelled `fig-bill-scatter`:
11+
You can include the output of another Quarto document (`.qmd` or `.ipynb`) with the `embed` shortcode. To embed the output of a code block or notebook cell, provide the path to document and an identifier for the block or cell. For example, this Jupyter notebook called `penguins.ipynb` has a cell labelled `fig-bill-scatter`:
1212

1313
![](images/notebook-simple.png){fig-alt="A screenshot of a Jupyter Notebook with the name 'penguins.ipynb', with a cell highlighted that has the code chunk option label set to fig-bill-scatter. Below the cell is the resulting plot." width=80%}
1414

@@ -36,15 +36,15 @@ Beyond this basic usage, you can also:
3636

3737
- Include the code along with the output by adding an `echo` option to the shortcode, see [Embedding Code](#embedding-code).
3838

39-
- Customize or exclude the link to the the source notebook, see [Links to Source Notebooks](#linked-source-notebooks).
39+
- Customize or exclude the link to the source notebook, see [Links to Source Notebooks](#linked-source-notebooks).
4040

4141
## Specifying Cells {#specifying-cells}
4242

4343
The `embed` shortcode specifies source notebooks using a relative path followed by a cell or code block identifier (e.g. `penguins.ipynb#fig-bill-scatter`). If the identifier is omitted, all of the cells or code blocks in the notebook will be embedded in the document.
4444

4545
### Quarto Documents
4646

47-
When the source is a Quarto document (`.qmd`), use the `label` of the code block as the identifer. For example, if the source document `penguins.qmd` contained the following code block:
47+
When the source is a Quarto document (`.qmd`), use the `label` of the code block as the identifier. For example, if the source document `penguins.qmd` contained the following code block:
4848

4949
````{.markdown filename="penguins.qmd"}
5050
```{{r}}

docs/blog/posts/2022-02-17-advanced-layout/index.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Positioning Content in the Margin
33
subtitle: Create 'Tufte' style documents with sidenotes, margin tables and figures, and other margin content
44
description: |
5-
This post demonstrates a few of the capabilities for positioning content in the margin of the page. You can read more about the complete capabilities in the the [Article Layout Guide](/docs/authoring/article-layout.qmd).
5+
This post demonstrates a few of the capabilities for positioning content in the margin of the page. You can read more about the complete capabilities in the [Article Layout Guide](/docs/authoring/article-layout.qmd).
66
author: Charles Teague
77
date: "2/17/2022"
88
categories:
@@ -21,7 +21,7 @@ Quarto supports a variety of page layout options that enable you to author conte
2121
- Spans the entire page
2222
- Occupies the document margin
2323

24-
This post will demonstrate a few of the capabilities for positioning content in the margin of the page. You can read more about the complete capabilities in the the [Article Layout Guide](/docs/authoring/article-layout.qmd).\
24+
This post will demonstrate a few of the capabilities for positioning content in the margin of the page. You can read more about the complete capabilities in the [Article Layout Guide](/docs/authoring/article-layout.qmd).\
2525

2626
## Margin Figures
2727

docs/blog/posts/2024-05-28-conf-workshops/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ In the afternoon, you'll use the same authoring approaches to create slide prese
5151

5252
You already analyze and summarize your data in computational notebooks with R and/or Python. What's next? 
5353

54-
You can share your insights or allow others to make their own conclusions in eye-catching dasboards and straight-forward to author, design, and deploy Quarto Dashboards, regardless of the language of your data processing, visualization, analysis, etc. With Quarto Dashboards, you can create elegant and production-ready dashboards using a variety of components, including static graphics (ggplot2, Matplotlib, Seaborn, etc.), interactive widgets (Plotly, Leaflet, Jupyter Widgets, htmlwidgets, etc.), tabular data, value boxes, text annotations, and more. Additionally, with intelligent resizing of components, your Quarto Dashboards look great on devices of all sizes.
54+
You can share your insights or allow others to make their own conclusions in eye-catching dashboards and straight-forward to author, design, and deploy Quarto Dashboards, regardless of the language of your data processing, visualization, analysis, etc. With Quarto Dashboards, you can create elegant and production-ready dashboards using a variety of components, including static graphics (ggplot2, Matplotlib, Seaborn, etc.), interactive widgets (Plotly, Leaflet, Jupyter Widgets, htmlwidgets, etc.), tabular data, value boxes, text annotations, and more. Additionally, with intelligent resizing of components, your Quarto Dashboards look great on devices of all sizes.
5555

5656
And importantly, you can author Quarto Dashboards without leaving the comfort of your “home” – in plain text markdown with any text editor (VS Code, RStudio, Neovim, etc.) or any notebook editor (JupyterLab, etc.). This workshop will walk you through building an increasingly complex dashboard using various layout options and deploying them as static web pages (with no special server required), as well as with a Shiny Server on the backend for enhanced interactivity.
5757

docs/computations/python.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You can produce a wide variety of output types from executable code blocks, incl
5656

5757
There are many options which control the behavior of code execution and output, you can read more about them in the article on [Execution Options](execution-options.qmd).
5858

59-
In addition to code blocks which interupt the flow of markdown, you can also include code inline. Read more about inline code in the [Inline Code](inline-code.qmd) article.
59+
In addition to code blocks which interrupt the flow of markdown, you can also include code inline. Read more about inline code in the [Inline Code](inline-code.qmd) article.
6060

6161
{{< include _jupyter-rendering.md >}}
6262

docs/computations/r.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ You can produce a wide variety of output types from executable code blocks, incl
4949

5050
There are many options which control the behavior of code execution and output, you can read more about them in the article on [Execution Options](execution-options.qmd).
5151

52-
In addition to code blocks which interupt the flow of markdown, you can also include code inline. Read more about inline code in the [Inline Code](inline-code.qmd) article.
52+
In addition to code blocks which interrupt the flow of markdown, you can also include code inline. Read more about inline code in the [Inline Code](inline-code.qmd) article.
5353

5454
### Rendering
5555

docs/dashboards/_examples/gapminder-content.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ px.line(df, x="year", y="lifeExp", color="continent",
2929

3030
Gapminder combines data from multiple sources into
3131
unique coherent time-series that can’t be found
32-
elsewhere. Learn more about the Gampminder dataset at
32+
elsewhere. Learn more about the Gapminder dataset at
3333
<https://www.gapminder.org/data/>.
3434

3535
:::

0 commit comments

Comments
 (0)