diff options
| author | Martin Haug <mhaug@live.de> | 2023-09-04 11:43:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-04 11:43:11 +0200 |
| commit | ba043a8d70052a15d0c664c6dc6ca2091ec2c475 (patch) | |
| tree | 3b8e414b209d797bbeb978c61c3550275024f0ac /crates | |
| parent | c0b332a4c07b95c0c3196d0d7b149560dcef67fa (diff) | |
Add a page setup guide (#1911)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-docs/src/lib.rs | 6 | ||||
| -rw-r--r-- | crates/typst-library/src/layout/columns.rs | 3 | ||||
| -rw-r--r-- | crates/typst-library/src/layout/page.rs | 10 |
3 files changed, 15 insertions, 4 deletions
diff --git a/crates/typst-docs/src/lib.rs b/crates/typst-docs/src/lib.rs index 6d67ffad..96ae460c 100644 --- a/crates/typst-docs/src/lib.rs +++ b/crates/typst-docs/src/lib.rs @@ -167,8 +167,10 @@ fn reference_pages(resolver: &dyn Resolver) -> PageModel { /// Build the guides section. fn guides_pages(resolver: &dyn Resolver) -> PageModel { let mut page = markdown_page(resolver, "/docs/", "guides/welcome.md"); - page.children = - vec![markdown_page(resolver, "/docs/guides/", "guides/guide-for-latex-users.md")]; + page.children = vec![ + markdown_page(resolver, "/docs/guides/", "guides/guide-for-latex-users.md"), + markdown_page(resolver, "/docs/guides/", "guides/page-setup.md"), + ]; page } diff --git a/crates/typst-library/src/layout/columns.rs b/crates/typst-library/src/layout/columns.rs index d2138491..6645ba9e 100644 --- a/crates/typst-library/src/layout/columns.rs +++ b/crates/typst-library/src/layout/columns.rs @@ -9,6 +9,9 @@ use crate::text::TextElem; /// height on the page. The columns function can break across pages if /// necessary. /// +/// If you need to insert columns across your whole document, you can use the +/// [`{page}` function's `columns` parameter]($func/page.columns) instead. +/// /// ## Example { #example } /// ```example /// = Towards Advanced Deep Learning diff --git a/crates/typst-library/src/layout/page.rs b/crates/typst-library/src/layout/page.rs index a4324b0c..8e73c3b3 100644 --- a/crates/typst-library/src/layout/page.rs +++ b/crates/typst-library/src/layout/page.rs @@ -12,8 +12,11 @@ use crate::text::TextElem; /// properties, it can also be used to explicitly render its argument onto /// a set of pages of its own. /// -/// Pages can be set to use `{auto}` as their width or height. In this case, -/// the pages will grow to fit their content on the respective axis. +/// Pages can be set to use `{auto}` as their width or height. In this case, the +/// pages will grow to fit their content on the respective axis. +/// +/// The [Guide for Page Setup]($guides/page-setup-guide) explains how to use +/// this and related functions to set up a document with many examples. /// /// ## Example { #example } /// ```example @@ -140,6 +143,9 @@ pub struct PageElem { /// How many columns the page has. /// + /// If you need to insert columns into a page or other container, you can + /// also use the [`columns` function]($func/columns). + /// /// ```example:single /// #set page(columns: 2, height: 4.8cm) /// Climate change is one of the most |
