Skip to content

Commit 5f2680a

Browse files
document various limitations
html brand font source: file not supported yet revealjs does not support light/dark mode switching can't combine renderings with *-cap or label
1 parent 4822582 commit 5f2680a

File tree

2 files changed

+54
-3
lines changed

2 files changed

+54
-3
lines changed

docs/authoring/brand.qmd

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ brand:
109109
dark: dark-brand.yml
110110
```
111111

112+
113+
::: {.callout-warning}
114+
115+
## Limitation
116+
117+
The `revealjs` format does not support switching between light and dark modes.
118+
119+
:::
120+
121+
112122
#### Typst
113123

114124
To choose a dark brand in Typst output use `brand-mode: dark`:
@@ -331,6 +341,14 @@ typography:
331341

332342
The properties you can set for a font under `fonts` depends on the `source`. You can see the other properties available in our [Reference for Brand](/docs/reference/metadata/brand.qmd#font-resource-definitions).
333343

344+
345+
::: {.callout-warning}
346+
## Limitation
347+
348+
HTML formats do not currently support `source: file`.
349+
:::
350+
351+
334352
You can then refer to fonts by `family` in the remaining typography options:
335353

336354
``` {.yaml filename="_brand.yml"}
@@ -516,8 +534,10 @@ Beyond the automatic application of your brand file, you can also directly acces
516534

517535
Some values from the `_brand.yml` configuration file can be accessed via the `brand` shortcode. In particular, you can access colors and logos by name:
518536

519-
- Use `{{{< brand color COLOR_NAME BRAND_MODE >}}}` to return the brand color named `COLOR_NAME` as a string. The `BRAND_MODE` is optional and defaults to `light`. To return the color from the [dark brand](#dark-brand) use `dark`.
520-
- Use `{{{< brand logo LOGO_NAME >}}}` to return the brand logo named `LOGO_NAME` as an image.
537+
- Use `{{{< brand color COLOR_NAME BRAND_MODE >}}}` to return the brand color named `COLOR_NAME` as a string.
538+
- Use `{{{< brand logo LOGO_NAME BRAND_MODE >}}}` to return the brand logo named `LOGO_NAME` as an image.
539+
540+
The `BRAND_MODE` is optional and defaults to `light`. To return the color from the [dark brand](#dark-brand) use `dark`.
521541

522542
For example, you could use the shortcode to place a brand image you've named `icon` in a dashboard sidebar:
523543

@@ -542,6 +562,7 @@ format: revealjs
542562
## Slide Title {background-color='{{< brand color primary >}}'}
543563
````
544564

565+
545566
::: {.callout-warning}
546567
## Limitation
547568

docs/computations/execution-options.qmd

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ plot(1:10) # Shown in `dark` mode
9393
```
9494
````
9595

96-
9796
::: {layout-ncol=2}
9897

9998
![light rendering](images/renderings-light-mode.png)
@@ -102,6 +101,37 @@ plot(1:10) # Shown in `dark` mode
102101

103102
:::
104103

104+
`renderings` does not currently work correctly with the cell options `label` or `fig-cap`, `tbl-cap`, etc. To combine `renderings` with crossrefs and/or captions, use the fenced div syntax:
105+
106+
107+
````
108+
---
109+
title: "Dark mode"
110+
format:
111+
html:
112+
theme:
113+
light: flatly
114+
dark: darkly
115+
---
116+
117+
::: {#fig-caption-crossref}
118+
119+
```{{r}}
120+
#| renderings: [light, dark]
121+
par(bg = "#FFFFFF", fg = "#000000")
122+
plot(1:10) # Shown in `light` mode
123+
124+
125+
par(bg = "#000000", fg = "#FFFFFF", col.axis = "#FFFFFF")
126+
plot(1:10) # Shown in `dark` mode
127+
```
128+
129+
Light and dark renderings with a caption and crossref
130+
131+
:::
132+
````
133+
134+
105135
::: callout-tip
106136
When using the Knitr engine, you can also use any of the available native options (e.g. `collapse`, `tidy`, `comment`, etc.). See the [Knitr options documentation](https://yihui.org/knitr/options/) for additional details. You can include these native options in option comment blocks as shown above, or on the same line as the `{r}` as shown in the Knitr documentation.
107137
:::

0 commit comments

Comments
 (0)