Appendix C: Callout boxes

C.1 Introduction

Overview

I have embedded most of the pre-defined cross-references in callout boxes. The exceptions are figure (fig) and table (tbl)

What follows is an overview of

  • the cross-reference abbreviation,
  • the (changed) title and
  • the appearance of the different callout boxes.
- crossref-cnj-title: "R Code"             # replaces "Conjecture"
- crossref-cor-title: "Assessment"         # replaces "Corollary"
- crossref-def-title: "Experiment"         # remains  "Definition"
- crossref-exm-title: "R Code Collection"  # replaces  "Example"
- crossref-exr-title: "Exercise"           # remains  "Exercise"
- crossref-fig-title: "Screenshot"         # replaces "Figure"
- crossref-rem-title: "Remark  "           # remains  "Remark"
- crossref-lem-title: "Resource"           # replaces "Lemma"
- crossref-lst-title: "Listing / Output"   # replaces  "Listing"
- crossref-prp-title: "Procedure"          # replaces "Proposition"
- crossref-sol-title: "Solution"           # remains  "Solution"
- crossref-tbl-title: "Table"              # remains  "Table"
- crossref-thm-title: "Formula"            # replaces "Theorem" (needs "formula")

The following table lists all callout boxes. Besides of the difference between numbered boxes and unnumbered boxes there are two different types of (numbered) boxes:

  • Boxes with cross-references that are pre-defined in Quarto. They are listed in the Quarto documentation under Theorems and Proofs. Examples are Exercise (exr), Definition (def) and Conjecture (con).
    • I have redefined most of the pre-defines labels in quarto.yml under the metadata heading language. For instance I replaced Definition with Experiment, Conjecture with R Code, but kept Exercise.
    • The first three columns in (tbl?)–callout-boxes reflect these changes and document the current status. I have sorted the table by my box titles (first column).
  • Boxes that use cross-references defined by me. Examples are Bullet Lists (bul) and Checklists (tdo).

The fourth column snippet shows the shortcut to call the Markdown snippet I have prepared. (Learn more about RStudio code snippets.) For each of these snippets there exist a corresponding CSS style. As I am not very experienced in CSS I gratefully adapted code by Andreas Handel (2023). (I just noticed there there was recently an update (2025) that I still need to read.)

The fifth column is a reference to an empty example showing just the bones of the callout-boxes. It is not necessary to jump to the location. If you hover with the mouse over the link Quarto will show you a small version of the callout box.

Table C.1: Overview of call-out boxes metadata used in this book
My Title Quarto Ref Snippet Reference to example
Assessment Corollary my-assessment Section C.2.1
Assessment Corollary cor num-assessment Section C.2.2
Bullet List ———- my-bullet Section C.3.1
Bullet List ———- bul num-bullet Section C.3.2
Checklist ———- my-check Section C.4.1
Checklist ———- tdo num-check Section C.4.2
Exercise Exercise my-exercise Section C.5.1
Exercise Exercise exr num-exercise Section C.5.2
Exercise Exercise exr ab-exercise Section C.5.3
Exercise Exercise exr abc-exercise Section C.5.4
Experiment Definition my-experiment Section C.6.1
Experiment Definition def num-experiment Section C.6.2
Important ———- my-important Section C.7.1
Listing / Output Listing lst ——————- Section C.14
Objectives ———- obj my-objectives Section C.8.1
Package Profile ———- my-package Section C.9.1
Package Profile ———- packagebox Section C.9.2
Procedure Proposition my-procedure Section C.10.1
Procedure Proposition prp num-procedure Section C.10.2
R Code Conjecture my-r-code Section C.11.1
R Code Conjecture cnj num-r-code Section C.11.2
R Code Conjecture cnj num-r-code-listing Section C.11.3
R Code Collection Example exm ab-code Section C.12.3
R Code Collection2 ———- col ab-code2 Section C.12.4
R Code Shiny Conjecture cnj num-r-shiny Section C.18.1
Remark Remark my-remark Section C.15.1
Remark Remark rem num-remark Section C.15.2
Report ———- rep num-report Section C.16.1
Resource Lemma my-resource Section C.17.1
Resource num-resource Section C.17.2
Screenshot Figure figure Section C.13.1
Screenshot figure-border Section C.13.2
Solution sr2 Section C.19.1
Solution my-solution Section C.19.2
Solution num-solution Section C.19.3
Table Table ——————- Section C.20
Tip ———- my-tip Section C.21.1
Typo ———- my-typo Section C.23.1
Theorem Theorem formula Section C.22.1
Theorem Theorem my-theorem Section C.22.2
Theorem Theorem num-theorem Section C.22.3
Watch Out ———- my-watch Section C.24.1
Watch Out ———- num-watch Section C.24.2

C.2 Assesment

C.2.1 my-assessment

Title for assessment comes here

Here include text for assessment

C.2.2 num-assessment

Assessment C.1 : Numbered Assessment Title

Here include assessment text

C.3 Bullet

C.3.1 my-bullet

Title for bullet text

Here include bullet text

C.3.2 num-bullet

Bullet List C.1

: Title for bullet text

Here include bullet text

C.4 Check

C.4.1 my-check

Title for checklist text

Here include checklist text

C.4.2 num-check

Checklist C.1

: Title for checklist text

Here include checklist text

C.5 Exercise

C.5.1 my-exercise

Exercise Title

Here include exercise text

C.5.2 num-exercise

Exercise C.1 : Numbered Exercise Title

Here include exercise text

C.5.3 ab-exercise

Exercise C.2 : Numbered Exercise Title

R Code C.1 : Numbered R Code Title 1

Code
1 + 1
#> [1] 2

R Code C.2 b: Numbered R Code Title (Tidyverse)

Code
1 + 1
#> [1] 2

C.5.4 abc-exercise

Exercise C.3 : Title of abc-exercise

R Code C.3 : Title of code exercise

Solution C.1. : Title of solution

Solution C.2. : Title of Shiny app

#| '!! shinylive warning !!': |
#|   shinylive does not work in self-contained HTML documents.
#|   Please set `embed-resources: false` in your metadata.
#| standalone: true
#| viewerHeight: 550
#| components: [editor, viewer]

C.6 Experiment

C.6.1 my-experiment

Title of Experiment

Here include text for experiment

C.6.2 num-experiment

Experiment C.1 : Numbered Experiment Title

Here include text for experiment

C.7 Important

C.7.1 my-important

Important Title

Here include text for important box

C.8 Objectives

C.8.1 my-objectives

Learning Objectives:

Here include text for objectives

C.9 Package

C.9.1 my-package

Package Name

Here include package description

C.9.2 packagebox

C.9.2.1 package-name

Package Profile: package-name


title (Wickham et al. 2023)

(There is no HEXAGON sticker available for {package-name}.)

short description


personal comment

This above snippets generates also a level two header and is intended for my annex chapter Appendix A. I have changed the level two header to a level four header, otherwise it would destroy my section structure of this chapter.

Additionally this snippets needs an image (or the deletion of the corresponding code lines) and bibliography (reference tot the author of the package).

C.10 Proposition / Procedure

C.10.1 my-procedure

Procedure Title

Here include procedure text

C.10.2 num-procedure

Procedure C.1 : Numbered Procedure Title

Here include procedure text

C.11 R Code

C.11.1 my-r-code

Title for R-Code

Here include code lines

C.11.2 num-r-code

R Code C.4 : Numbered R Code Title

Code
1 + 1
#> [1] 2

C.11.3 num-r-code-listing

R Code C.5 : Numbered R Code Listing Title

Listing / Output C.1: Listing title
Code
1 + 1
#> [1] 2

C.12 R Code Collection

C.12.1 my-example

Title for my example

Here include text

C.12.2 num-example

Code Collection C.1 : Numbered Example Title

Here include example text

C.12.3 ab-code

Code Collection C.2 : Title for code collection

R Code C.6 : Numbered R Code Title (Original)

Code
1 + 1
#> [1] 2

R Code C.7 : Numbered R Code Title (Tidyverse)

Code
1 + 1
#> [1] 2

C.12.4 ab-code2

Collection Code C.1

R Code C.8 : Numbered R Code Title (Original)

Listing / Output C.2: Listing text
Code
1 + 1
#> [1] 2

R Code C.9 : Numbered R Code Title (Tidyverse)

Listing / Output C.3: Listing text
Code
1 + 1
#> [1] 2

C.13 Screenshot

C.13.1 figure

alt-text
Screenshot C.1: Demonstration

C.13.2 figure-border

alt-text
Screenshot C.2: title

C.14 Listing / Listing/Output

There is no snippet for listings. Listings is included in num-r-code-listing (see: Section C.11.3).

C.15 Remark

C.15.1 my-remark

Title for remark

Here include remark lines

C.15.2 num-remark

Remark C.1. : Numbered Remark Title

Here include remark text

C.16 Report

C.16.1 num-report

Report C.1

: Numbered Reportbox Title

Here include report box text

C.17 Resource

C.17.1 my-resource

Title for resource

Here include resource text

C.17.2 num-resource

Resource C.1 : Numbered Resource Title

Here include text for the resource

C.18 R Code Shiny

C.18.1 num-r-shiny

R Code C.10 : Numbered R Code Title

#| '!! shinylive warning !!': |
#|   shinylive does not work in self-contained HTML documents.
#|   Please set `embed-resources: false` in your metadata.
#| standalone: true
#| viewerHeight: 550
#| components: [editor, viewer]
#| layout: vertical

library(shiny)

start coding here

C.19 Solution

C.19.1 sr2

Exercise ID: Header

Description more in Detail


My Solution

Here comes the solution

The above box is intended for the text description of a task or challenge, followed by the R code as the solution. But it has no numbering!

C.19.2 my-solution

Solution:

Here include solution text

C.19.3 num-solution

Solution C.3. : Numbered Solution Title

Here include text for the solution

C.20 Table / Table

No changes, no snippet.

C.21 Tip

C.21.1 my-tip

Title for Tip / Hint

Here include text for tip / hint box

C.22 Theorem

C.22.1 formula

\[ \begin{align*} formula \end{align*} \tag{C.1}\]

Read Mathematics in R Markdown

The numbering for theorems / formula is different than from the other cross-references / callout boxes.

C.22.2 my-theorem

Title of theorem

Here include theorem text

C.22.3 num-theorem

Formula C.1 : Numbered Theorem Title

\[ \begin{align*} \text{Here include text for the theorem} \end{align*} \tag{C.2}\]

C.23 Typo

C.23.1 my-typo

Typo Title

Here include typo text

C.24 Watch

C.24.1 my-watch

Title for watch-out text

Here include watch-out text

C.24.2 num-watch

Watch-out C.1

: Title for watch-out text

Here include watch-out text

C.25 Glossary Entries

term definition
CSS Cascading Style Sheets (CSS) is a style sheet language used for specifying the presentation and styling of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript. CSS is designed to enable the separation of content and presentation, including layout, colors, and fonts. (<a href="https://en.wikipedia.org/wiki/CSS">Wikipedia</a>)

Session Info

Session Info

Code
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.5.0 (2025-04-11)
#>  os       macOS Sequoia 15.5
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       Europe/Vienna
#>  date     2025-06-23
#>  pandoc   3.7.0.2 @ /opt/homebrew/bin/ (via rmarkdown)
#>  quarto   1.8.4 @ /usr/local/bin/quarto
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package      * version    date (UTC) lib source
#>  cli            3.6.5      2025-04-23 [1] CRAN (R 4.5.0)
#>  commonmark     1.9.5      2025-03-17 [1] CRAN (R 4.5.0)
#>  curl           6.3.0      2025-06-06 [1] CRAN (R 4.5.0)
#>  dichromat      2.0-0.1    2022-05-02 [1] CRAN (R 4.5.0)
#>  digest         0.6.37     2024-08-19 [1] CRAN (R 4.5.0)
#>  evaluate       1.0.3      2025-01-10 [1] CRAN (R 4.5.0)
#>  farver         2.1.2      2024-05-13 [1] CRAN (R 4.5.0)
#>  fastmap        1.2.0      2024-05-15 [1] CRAN (R 4.5.0)
#>  glossary     * 1.0.0.9003 2025-06-08 [1] local
#>  glue           1.8.0      2024-09-30 [1] CRAN (R 4.5.0)
#>  htmltools      0.5.8.1    2024-04-04 [1] CRAN (R 4.5.0)
#>  htmlwidgets    1.6.4      2023-12-06 [1] CRAN (R 4.5.0)
#>  jsonlite       2.0.0      2025-03-27 [1] CRAN (R 4.5.0)
#>  kableExtra     1.4.0      2024-01-24 [1] CRAN (R 4.5.0)
#>  knitr          1.50       2025-03-16 [1] CRAN (R 4.5.0)
#>  lifecycle      1.0.4      2023-11-07 [1] CRAN (R 4.5.0)
#>  litedown       0.7        2025-04-08 [1] CRAN (R 4.5.0)
#>  magrittr       2.0.3      2022-03-30 [1] CRAN (R 4.5.0)
#>  markdown       2.0        2025-03-23 [1] CRAN (R 4.5.0)
#>  R6             2.6.1      2025-02-15 [1] CRAN (R 4.5.0)
#>  RColorBrewer   1.1-3      2022-04-03 [1] CRAN (R 4.5.0)
#>  rlang          1.1.6      2025-04-11 [1] CRAN (R 4.5.0)
#>  rmarkdown      2.29       2024-11-04 [1] CRAN (R 4.5.0)
#>  rstudioapi     0.17.1     2024-10-22 [1] CRAN (R 4.5.0)
#>  rversions      2.1.2      2022-08-31 [1] CRAN (R 4.5.0)
#>  scales         1.4.0      2025-04-24 [1] CRAN (R 4.5.0)
#>  sessioninfo    1.2.3      2025-02-05 [1] CRAN (R 4.5.0)
#>  stringi        1.8.7      2025-03-27 [1] CRAN (R 4.5.0)
#>  stringr        1.5.1      2023-11-14 [1] CRAN (R 4.5.0)
#>  svglite        2.2.1      2025-05-12 [1] CRAN (R 4.5.0)
#>  systemfonts    1.2.3      2025-04-30 [1] CRAN (R 4.5.0)
#>  textshaping    1.0.1      2025-05-01 [1] CRAN (R 4.5.0)
#>  vctrs          0.6.5      2023-12-01 [1] CRAN (R 4.5.0)
#>  viridisLite    0.4.2      2023-05-02 [1] CRAN (R 4.5.0)
#>  xfun           0.52       2025-04-02 [1] CRAN (R 4.5.0)
#>  xml2           1.3.8      2025-03-14 [1] CRAN (R 4.5.0)
#>  yaml           2.3.10     2024-07-26 [1] CRAN (R 4.5.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.5-arm64/library
#>  [2] /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
#>  * ── Packages attached to the search path.
#> 
#> ──────────────────────────────────────────────────────────────────────────────

References

Handel, Andreas. 2023. “How to Make Custom Callouts for Quarto Andreas Handel.” https://www.andreashandel.com/posts/2023-06-13-custom-callouts-quarto/.
———. 2025. “Custom Formatting of Components in Quarto with Divs Andreas Handel.” https://www.andreashandel.com/posts/2025-03-05-custom-quarto-divs/.
Wickham, Hadley, Romain François, Lionel Henry, Kirill Müller, and Davis Vaughan. 2023. “Dplyr: A Grammar of Data Manipulation.” https://doi.org/10.32614/CRAN.package.dplyr.