You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced/typst/brand-yaml.qmd
-25Lines changed: 0 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -17,31 +17,6 @@ Brand YAML palette and theme colors are available in Typst `brand-color`, e.g. `
17
17
18
18
Lighter versions of the colors, suitable as background colors, are available in `brand-background-color`, e.g. `brand-background-color.success`.
19
19
20
-
## Logo
21
-
22
-
The `logo` option allows extra customization in Typst for full control over layout.
23
-
24
-
In all formats, `logo` can be the path to a logo or the name of a `brand.logo` resource, i.e. `small`, `medium`, or `large`. It can also be an object with
25
-
26
-
`path`
27
-
: Image path or name of `brand.logo` resource
28
-
`alt`
29
-
: Alt text for the logo image
30
-
31
-
The Typst implementation also supports
32
-
33
-
`width`
34
-
: Width in CSS units. Default `1.5in`.
35
-
36
-
`location`
37
-
: Location on the page in X and Y using CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) and [`text-vertical-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) keyword values, specifically
38
-
`left`, `center`, `right` and `top`, `middle`, and `bottom`.
39
-
The X and Y components are combined with a dash, e.g. `left-top` (the default), `center-middle`, etc.
40
-
Applied as Typst [`align`](https://typst.app/docs/reference/layout/align/).
: Amount of padding to add to each side of the logo, using CSS [`padding`](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) conventions. Due to a limitation in the Lua implementation of YAML, multiple padding options are applied in alphabetical order instead of the order of the YAML object. Applied as Typst [`block.inset`](https://typst.app/docs/reference/layout/block/#parameters-inset). Default `padding: 0.75in`.
44
-
45
20
## Typography
46
21
47
22
Brand YAML is specified for the following elements and Brand YAML properties. Combinations that are not supported are marked NA.
Copy file name to clipboardExpand all lines: docs/authoring/brand.qmd
+74-9Lines changed: 74 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -244,6 +244,63 @@ The **brand.yml** specification allows you to specify a `light` and `dark` versi
244
244
245
245
:::
246
246
247
+
#### Document logo customization
248
+
249
+
The document `logo` option allows extra customization of the logo.
250
+
251
+
To choose a brand logo resource:
252
+
```{.yaml filename="document.qmd"}
253
+
---
254
+
logo: large
255
+
---
256
+
```
257
+
258
+
To choose a brand logo resource and change the alt text:
259
+
260
+
```{.yaml filename="document.qmd"}
261
+
---
262
+
logo:
263
+
path: large
264
+
alt: Alternate alternate text
265
+
---
266
+
```
267
+
268
+
::: {.callout-warning}
269
+
270
+
## Limitation
271
+
272
+
It is [not currently possible](https://github.com/quarto-dev/quarto-cli/issues/11309) to customize the logo for a specific page within a website. Only the project's `_brand.yml` is applied.
273
+
274
+
:::
275
+
276
+
The Typst implementation allows customization of the logo position at the document level:
|`padding`, `padding-top`,| Amount of padding to add to each side of the logo, using CSS [`padding`](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) conventions.|
298
+
|`padding-right`, | Padding options are applied in alphabetical order. |
299
+
|`padding-bottom`, | Applied as Typst [`block.inset`](https://typst.app/docs/reference/layout/block/#parameters-inset). |
[Typography in the **brand.yml** docs](https://posit-dev.github.io/brand-yml/brand/typography.html){.external}
@@ -360,6 +417,11 @@ The supported fields are generally described as follows:
360
417
361
418
:::
362
419
420
+
#### Typst
421
+
422
+
See [the Advanced documentation](/docs/advanced/typst/brand-yaml.qmd#typography) for more details on the Typst implementation, and troubleshooting tips for fonts.
423
+
424
+
363
425
### Defaults
364
426
365
427
[Defaults in the **brand.yml** docs](https://posit-dev.github.io/brand-yml/brand/defaults.html){.external}
@@ -523,14 +585,6 @@ You can learn more about layering themes in [More About Quarto Themes](/docs/out
523
585
524
586
### Typst
525
587
526
-
If the document has [both light and dark brands](#dark-brand), use `brand-mode: dark` to produce a dark-background PDF that matches the dark brand of your website.
527
-
528
-
```yaml
529
-
format:
530
-
typst:
531
-
brand-mode: dark
532
-
```
533
-
534
588
In Typst documents, brand colors are set in a [dictionary](https://typst.app/docs/reference/foundations/dictionary/) called `brand-color`.
535
589
You can access them directory in raw Typst blocks using the syntax `brand-color.COLOR_NAME`.
536
590
For example, you could make a rectangle filled with your `primary` brand color:
@@ -607,4 +661,15 @@ theme:
607
661
- brand
608
662
```
609
663
610
-
Learn more about how Quarto generates styles in [More About Quarto Themes](/docs/output-formats/html-themes-more.qmd).
664
+
Learn more about how Quarto generates styles in [More About Quarto Themes](/docs/output-formats/html-themes-more.qmd).
665
+
666
+
## Choosing light or dark brand in Typst
667
+
668
+
If the document has [both light and dark brands](#dark-brand), use `brand-mode: dark` to produce a dark-background PDF that matches the dark brand of your website.
0 commit comments