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
@@ -242,6 +242,63 @@ The **brand.yml** specification allows you to specify a `light` and `dark` versi
242
242
243
243
:::
244
244
245
+
#### Document logo customization
246
+
247
+
The document `logo` option allows extra customization of the logo.
248
+
249
+
To choose a brand logo resource:
250
+
```{.yaml filename="document.qmd"}
251
+
---
252
+
logo: large
253
+
---
254
+
```
255
+
256
+
To choose a brand logo resource and change the alt text:
257
+
258
+
```{.yaml filename="document.qmd"}
259
+
---
260
+
logo:
261
+
path: large
262
+
alt: Alternate alternate text
263
+
---
264
+
```
265
+
266
+
::: {.callout-warning}
267
+
268
+
## Limitation
269
+
270
+
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.
271
+
272
+
:::
273
+
274
+
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.|
296
+
|`padding-right`, | Padding options are applied in alphabetical order. |
297
+
|`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}
@@ -358,6 +415,11 @@ The supported fields are generally described as follows:
358
415
359
416
:::
360
417
418
+
#### Typst
419
+
420
+
See [the Advanced documentation](/docs/advanced/typst/brand-yaml.qmd#typography) for more details on the Typst implementation, and troubleshooting tips for fonts.
421
+
422
+
361
423
### Defaults
362
424
363
425
[Defaults in the **brand.yml** docs](https://posit-dev.github.io/brand-yml/brand/defaults.html){.external}
@@ -521,14 +583,6 @@ You can learn more about layering themes in [More About Quarto Themes](/docs/out
521
583
522
584
### Typst
523
585
524
-
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.
525
-
526
-
```yaml
527
-
format:
528
-
typst:
529
-
brand-mode: dark
530
-
```
531
-
532
586
In Typst documents, brand colors are set in a [dictionary](https://typst.app/docs/reference/foundations/dictionary/) called `brand-color`.
533
587
You can access them directory in raw Typst blocks using the syntax `brand-color.COLOR_NAME`.
534
588
For example, you could make a rectangle filled with your `primary` brand color:
@@ -605,4 +659,15 @@ theme:
605
659
- brand
606
660
```
607
661
608
-
Learn more about how Quarto generates styles in [More About Quarto Themes](/docs/output-formats/html-themes-more.qmd).
662
+
Learn more about how Quarto generates styles in [More About Quarto Themes](/docs/output-formats/html-themes-more.qmd).
663
+
664
+
## Choosing light or dark brand in Typst
665
+
666
+
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