Quarto Profile picture
Scientific and technical publishing system

Jun 28, 2022, 32 tweets

Today we begin a new series: “A Quarto tip a day keeps the docs away” -- a playful attempt to share Quarto tips daily for the next month. Follow along:

🐦 #quartotip
🔗 rstd.io/quartotip

And, of course, don't keep the docs away, they're incredibly helpful and thorough!

#quartotip 1: Use the layout-ncol chunk option to organize output in columns, e.g. layout-ncol: 2 for two tables side-by-side.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 2: Use the echo: fenced chunk option to display the fences around your code chunks in your output. Super useful for teaching Quarto!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 3: Use the freeze: true or freeze: auto execution option for finer control over when documents in Quarto projects are re-rendered. Especially helpful for not accidentally re-running code in old blog posts!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 4: Use the include shortcode to include content from a file in another file. Helpful for including repeated content in multiple documents.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 5: Use the output-location chunk option to control where code output is shown:

- fragment: delayed
- slide: in the next slide
- column: in the next column
- column-fragment: delayed + in the next column

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 6: Customize which documents are included in a listing by using the contents option, which allows you to provide a set of input files (or globs of input files) that should be included in the listing.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 7: Use the chalkboard: true option for revealjs slides to annotate your slides by drawing on them or opening up an empty chalkboard within your presentation.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 8: Switching over from #rmarkdown to Quarto? Read the reading the FAQ for R Markdown Users!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 9: If you want to create an entirely self-contained HTML document (with images, CSS, etc. embedded into the HTML file), set self-contained: true in the YAML of your document.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 10: To publish a file not explicitly linked from pages in your Quarto site (or if the auto-detection of a linked file fails), add a resources entry to the _quarto.yml file of your project or an individual page's metadata.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 11: You can apply styles to inline text by creating spans using [] to surround the text you want to style and {} to define the style you want to apply.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 12: Want to embed an iframe on a webpage or a slide deck? Plop the sharing code in a raw html block!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 13: If you’re a Homebrew person, chances are you’d like to install and update Quarto with Homebrew. Read on for a couple options for doing so!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 14: Yet another way to highlight a portion of a slide: slide zoom with Alt+Click!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

--

Alt-text for GIF below: Find the bunny among the cats slide from the post, being zoomed in and out three times.

#quartotip 15: Need help with something Quarto related? Post a question on GitHub Discussions or open an issue!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 16: Link to the source code on your document using code-tools: true, or customize how you link to it with various options.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 17: Quarto websites support light and dark themes and automatically add a light/dark toggle if you supply both themes.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

---

Alt-text for GIF: Switching between light and dark mode using the toggle on the blog homepage navbar.

#quartotip 18: Including Font Awesome icons in Quarto documents is now easy peasy lemon squeezy 🍋 with the Font Awesome extension.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 19: Want to see examples of what others are creating with Quarto? And how they're creating them? Browse the newly refreshed Quarto Gallery!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

---

Alt-text for GIF: Scrolling through the Quarto Gallery at quarto.org/docs/gallery.

#quartotip 20: YAML intelligence, including completion and diagnostics, make writing project files, YAML front matter, and executable cell options easy for experts and new learners. Available in @rstudio and @code!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 21: Create diagrams in Quarto documents using Mermaid or Graphviz in executable code cells, similar to how you create figures.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 22: You can create interactive Quarto documents using Shiny. To do so:

- add server: shiny to the YAML of your document
- define Shiny UI elements in plain code chunks
- place Shiny server code in chunks with option context: server

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 23: If you have revealjs slides with no titles and you want them to have informative URLs and placeholder titles on the presentation outline, define a slide ID and data-menu-title.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

#quartotip 24: Add citations with @rstudio's Visual Editor directly from a DOI. Paste DOI and let it find the reference and place in a bib file for you!

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

---

Alt-text for GIF: Inserting citation from DOI with Visual Editor. Steps in blog post.

@rstudio #quartotip 25: Add aria-labels to your navigation icons to make them accessible to screen readers as a YAML field.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

@rstudio #quartotip 26: Add alt-text to images that will be displayed in places like blog post thumbnails, social cards, etc. with image-alt.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

@rstudio #quartotip 27: Add audio indicator to your slides that plays as you progress from one slide to next or from incremental build to next.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

@rstudio #quartotip 28: Add alternative text to figures created in Knitr, Jupyter, and Observable chunks with fig-alt.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

@rstudio #quartotip 29: Use a11y as an accessible syntax highlighting style and have it automatically adapt to light/dark setting of your webpage.

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

@rstudio #quartotip 30: Curious about Quarto? Browse @thomas_mock 's slides from Day 1 of #rstudioconf2022 and don't miss Day 2 Quarto talks!

Link to slides: rstd.io/quarto-curious

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

@rstudio @thomas_mock #quartotip 31: Don't miss @juliesquid and I talk about Quarto at #rstudioconf2022 at 9am ET today! Join us in Potomac A or on the live stream at rstd.io/conf. #rstudioconf #rstats

Link to slides: mine.quarto.pub/hello-quarto

Read more: mine-cetinkaya-rundel.github.io/quarto-tip-a-d…

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling