
Output Rendering
Subtitle is skipped from the TOC
Author is skipped from the TOC
Date is skipped from the TOC
Source:vignettes/test/rendering.Rmd
rendering.RmdThis vignette tests pkgdown output rendering for several use cases.
Footnotes
Yay1
Details tag
Multiple paragraphs
First paragraph
Second paragraphSome R code
1 + 2
#> [1] 3Tables
| col 1 | col 2 | col 3 | col 4 |
|---|---|---|---|
| Brightness | Total brightness, total reflectance, spectral intensity | \[y = x^2\] | test |
Math
\[f(x) = \dfrac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x-\mu^2)}{2\sigma^2}}\]
Inline equations: \(y=x^2\)
Code
Line width
pkgdown:::ruler()
#> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
#> 12345678901234567890123456789012345678901234567890123456789012345678901234567890
cat(rep("x ", 100), sep = "")
#> x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
cat(rep("xy", 100), sep = "")
#> xyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyShould be highlighted
Valid R code in \preformatted{}:
mean(a + 1)
R code in R block:
mean(a + 1)R code in r block:
mean(a + 1)Yaml
pre blocks
Testing margins and copy buttons on small screens.
txt <- "Not wrapped; check the copy button behavior."Wrapped in a <section>
(e.g. section > div > pre)
txt <- "Wrapped in section"This is a blockquote with enough text to test the width of the code block and verify whether it aligns with the paragraph width.
txt <- "Wrapped in blockquote; margins are preserved."Continue…
-
This list item includes enough text to test the width of the code block and check whether it matches the paragraph width.
txt <- "Wrapped in li; margins are preserved." -
Another bullet.
Nested list.
-
Second level item with enough text to test the width of the code block and confirm alignment with the paragraph.
txt <- "Wrapped in li; margins are preserved." Nested list continues.
<pre> block inside a <details>
element.
txt <- "Wrapped in details"Crayon
cat(cli::col_red("This is red"), "\n")
#> This is red
cat(cli::col_blue("This is blue\n"), "\n")
#> This is blue
#>
message(cli::col_green("This is green"))
#> This is green
warning(cli::style_bold("This is bold"))
#> Warning: This is boldSome text
stop(cli::style_italic("This is italic"))
#> Error:
#> ! This is italicSome more text
Quoted text
Single-line quote about something miscellaneous.
1 space indent
2 space indent
3 space indent


