diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-03-15 15:47:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-15 14:47:41 +0000 |
| commit | faca50a240b25a935f9ce310af55d0be51f64303 (patch) | |
| tree | 725ffb16336cdf36bede8d1ce2ce8f6cb188a627 | |
| parent | 9bd14514520684955570bc87ef79b7b08b35f7c4 (diff) | |
Final touches (#3678)
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | crates/typst-cli/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst-ide/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst-macros/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst-pdf/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst-render/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst-svg/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst-syntax/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst-timing/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/typst/src/layout/grid/mod.rs | 4 | ||||
| -rw-r--r-- | crates/typst/src/model/table.rs | 10 | ||||
| -rw-r--r-- | crates/typst/src/visualize/mod.rs | 2 | ||||
| -rw-r--r-- | docs/changelog.md | 36 | ||||
| -rw-r--r-- | docs/guides/guide-for-latex-users.md | 6 | ||||
| -rw-r--r-- | docs/reference/scripting.md | 2 | ||||
| -rw-r--r-- | docs/src/link.rs | 2 |
17 files changed, 45 insertions, 28 deletions
@@ -10,10 +10,10 @@ authors = ["The Typst Project Developers"] edition = "2021" homepage = "https://typst.app" repository = "https://github.com/typst/typst" -readme = "README.md" license = "Apache-2.0" categories = ["compilers"] keywords = ["typst"] +readme = "README.md" [workspace.dependencies] typst = { path = "crates/typst" } diff --git a/crates/typst-cli/Cargo.toml b/crates/typst-cli/Cargo.toml index 74c53e46..57251a64 100644 --- a/crates/typst-cli/Cargo.toml +++ b/crates/typst-cli/Cargo.toml @@ -10,6 +10,7 @@ edition = { workspace = true } homepage = { workspace = true } repository = { workspace = true } license = { workspace = true } +readme = { workspace = true } [[bin]] name = "typst" diff --git a/crates/typst-ide/Cargo.toml b/crates/typst-ide/Cargo.toml index 28083af4..b2927562 100644 --- a/crates/typst-ide/Cargo.toml +++ b/crates/typst-ide/Cargo.toml @@ -10,6 +10,7 @@ repository = { workspace = true } license = { workspace = true } categories = { workspace = true } keywords = { workspace = true } +readme = { workspace = true } [lib] test = false diff --git a/crates/typst-macros/Cargo.toml b/crates/typst-macros/Cargo.toml index a7f130ec..caef7eb4 100644 --- a/crates/typst-macros/Cargo.toml +++ b/crates/typst-macros/Cargo.toml @@ -10,6 +10,7 @@ repository = { workspace = true } license = { workspace = true } categories = { workspace = true } keywords = { workspace = true } +readme = { workspace = true } [lib] proc-macro = true diff --git a/crates/typst-pdf/Cargo.toml b/crates/typst-pdf/Cargo.toml index 61b84498..709ed108 100644 --- a/crates/typst-pdf/Cargo.toml +++ b/crates/typst-pdf/Cargo.toml @@ -10,6 +10,7 @@ repository = { workspace = true } license = { workspace = true } categories = { workspace = true } keywords = { workspace = true } +readme = { workspace = true } [lib] doctest = false diff --git a/crates/typst-render/Cargo.toml b/crates/typst-render/Cargo.toml index 28033b3e..2db9b5ed 100644 --- a/crates/typst-render/Cargo.toml +++ b/crates/typst-render/Cargo.toml @@ -10,6 +10,7 @@ repository = { workspace = true } license = { workspace = true } categories = { workspace = true } keywords = { workspace = true } +readme = { workspace = true } [lib] doctest = false diff --git a/crates/typst-svg/Cargo.toml b/crates/typst-svg/Cargo.toml index a0acff95..143e88ed 100644 --- a/crates/typst-svg/Cargo.toml +++ b/crates/typst-svg/Cargo.toml @@ -10,6 +10,7 @@ repository = { workspace = true } license = { workspace = true } categories = { workspace = true } keywords = { workspace = true } +readme = { workspace = true } [lib] doctest = false diff --git a/crates/typst-syntax/Cargo.toml b/crates/typst-syntax/Cargo.toml index 708f7de8..f92b6d9b 100644 --- a/crates/typst-syntax/Cargo.toml +++ b/crates/typst-syntax/Cargo.toml @@ -10,6 +10,7 @@ repository = { workspace = true } license = { workspace = true } categories = { workspace = true } keywords = { workspace = true } +readme = { workspace = true } [lib] doctest = false diff --git a/crates/typst-timing/Cargo.toml b/crates/typst-timing/Cargo.toml index 557561ea..525d65c5 100644 --- a/crates/typst-timing/Cargo.toml +++ b/crates/typst-timing/Cargo.toml @@ -10,6 +10,7 @@ repository = { workspace = true } license = { workspace = true } categories = { workspace = true } keywords = { workspace = true } +readme = { workspace = true } [dependencies] typst-syntax = { workspace = true } diff --git a/crates/typst/Cargo.toml b/crates/typst/Cargo.toml index f15cdc8a..fd82c2cc 100644 --- a/crates/typst/Cargo.toml +++ b/crates/typst/Cargo.toml @@ -10,6 +10,7 @@ edition = { workspace = true } homepage = { workspace = true } repository = { workspace = true } license = { workspace = true } +readme = { workspace = true } [lib] doctest = false diff --git a/crates/typst/src/layout/grid/mod.rs b/crates/typst/src/layout/grid/mod.rs index 4ad096eb..30507e7b 100644 --- a/crates/typst/src/layout/grid/mod.rs +++ b/crates/typst/src/layout/grid/mod.rs @@ -191,8 +191,8 @@ pub struct GridElem { /// /// ```example /// #grid( - /// fill: (col, row) => - /// if calc.even(col + row) { luma(230) } + /// fill: (x, y) => + /// if calc.even(x + y) { luma(230) } /// else { white }, /// align: center + horizon, /// columns: 4, diff --git a/crates/typst/src/model/table.rs b/crates/typst/src/model/table.rs index 1b616a0b..50578780 100644 --- a/crates/typst/src/model/table.rs +++ b/crates/typst/src/model/table.rs @@ -160,12 +160,12 @@ pub struct TableElem { /// /// ```example /// #table( - /// fill: (col, _) => - /// if calc.odd(col) { luma(240) } + /// fill: (x, _) => + /// if calc.odd(x) { luma(240) } /// else { white }, - /// align: (col, row) => - /// if row == 0 { center } - /// else if col == 0 { left } + /// align: (x, y) => + /// if y == 0 { center } + /// else if x == 0 { left } /// else { right }, /// columns: 4, /// [], [*Q1*], [*Q2*], [*Q3*], diff --git a/crates/typst/src/visualize/mod.rs b/crates/typst/src/visualize/mod.rs index 086c150c..5c8bf646 100644 --- a/crates/typst/src/visualize/mod.rs +++ b/crates/typst/src/visualize/mod.rs @@ -28,7 +28,7 @@ use crate::foundations::{category, Category, Scope}; /// /// If you want to create more advanced drawings or plots, also have a look at /// the [CetZ](https://github.com/johannes-wolf/cetz) package as well as more -/// specialized [packages] for your use case. +/// specialized [packages]($universe) for your use case. #[category] pub static VISUALIZE: Category; diff --git a/docs/changelog.md b/docs/changelog.md index b5836103..6b99f154 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -7,7 +7,8 @@ description: | # Changelog ## Unreleased - Tables (thanks to [@PgBiel](https://github.com/PgBiel)) - - Tables are now _much_ more flexible + - Tables are now _much_ more flexible, read the new + [table guide]($guides/table-guide) to get started - Added [`table.cell`] element for per-cell configuration - Cells can now span multiple [columns]($table.cell.colspan) or [rows]($table.cell.rowspan) @@ -24,13 +25,13 @@ description: | - You can now use template packages to get started with new projects. Click _Start from template_ on the web app's dashboard and choose your preferred template or run the `typst init <template>` command in the CLI. You can - [browse the available templates here]($packages/?templates). + [browse the available templates here]($universe/search/?kind=templates). - Switching templates after the fact has become easier. You can just import a styling function from a different template package. - Package authors can now submit their own templates to the [package repository](https://github.com/typst/packages). Share a template - for a paper, your school, or an original work to help the community get a - head start on their projects. + for a paper, your institution, or an original work to help the community get + a head start on their projects. - Templates and packages are now organized by category and discipline. Filter packages by either taxonomy in the _Start from template_ wizard. If you are a package author, take a look at the new documentation for @@ -49,7 +50,7 @@ description: | - Added contextual function [`here`] to retrieve the [location] of the current context - The [`locate`] function now returns the location of a selector's unique - match. Its old behaviour has been replaced by context expressions and only + match. Its old behavior has been replaced by context expressions and only remains temporarily available for compatibility. - The [`counter.at`] and [`state.at`] methods are now more flexible: They directly accept any kind of [locatable]($location/#locatable) selector with @@ -59,7 +60,7 @@ description: | should not be used anymore without context. (Deprecation planned) - The [`state.display`] function should not be used anymore, use [`state.get`] instead (Deprecation planned) - - The `location` arguments of [`query`], [`counter.final`], and + - The `location` argument of [`query`], [`counter.final`], and [`state.final`] should not be used anymore (Deprecation planned) - The [`styles`]($measure.styles) argument of the `measure` function should not be used anymore (Deprecation planned) @@ -75,8 +76,8 @@ description: | - Show-set rules on the same element (e.g. `{show heading.where(level: 1): set heading(numbering: "1.")}`) now work properly - - Setting properties on an element within a transformational show rule (e.g.. - `{show heading: it => { set heading(..): it }}`) is **not** supported + - Setting properties on an element within a transformational show rule (e.g. + `{show heading: it => { set heading(..); it }}`) is **not** supported anymore (previously it also only worked sometimes); use show-set rules instead (**Breaking change**) - Text show rules that match their own output now work properly @@ -88,8 +89,9 @@ description: | - [And]($selector.and) and [or]($selector.or) selectors can now be used with show rules - Errors within show rules and context expressions are now ignored in all but - the last introspection iteration, in line with the behaviour of the old + the last introspection iteration, in line with the behavior of the old [`locate`] + - Fixed a bug where document set rules were allowed after content - Layout - Added `reflow` argument to [`rotate`]($rotate) and [`scale`]($scale) which @@ -102,6 +104,8 @@ description: | - Fixed usage of [`h`] and [`v`] in [stacks]($stack) - Invisible content like a counter update will no longer force a visible block for just itself + - Fixed a bug with horizontal spacing followed by invisible content (like a + counter update) directly at the start of a paragraph - Text - Added [`stroke`]($text.stroke) property for text @@ -111,7 +115,7 @@ description: | - The [text direction]($text.dir) can now be overridden within a paragraph - Fixed Danish [smart quotes]($smartquote) - Fixed font fallback next to a line break - - Fixed width adjustment of JIS-style Japanse punctuation + - Fixed width adjustment of JIS-style Japanese punctuation - Fixed Finnish translation of "Listing" - Fixed Z-ordering of multiple text decorations (underlines, etc.) - Fixed a bug due to which text [features]($text.features) could not be @@ -119,11 +123,13 @@ description: | - Model - Added [`depth`]($heading.depth) and [`offset`]($heading.offset) arguments to - heading to increase or decrease the heading level for a bunch of content + heading to increase or decrease the heading level for a bunch of content; + the heading syntax now sets `depth` rather than `level` + (**Breaking change**) - List [markers]($list.marker) now cycle by default - The [`quote`] function now more robustly selects the correct quotes based on language and nesting - - Fixed indents bugs related to default show rule of [terms] + - Fixed indent bugs related to the default show rule of [terms] - Math - Inline equations now automatically linebreak at appropriate places @@ -134,6 +140,7 @@ description: | - [Primes]($math.primes) are now always attached as [scripts]($math.scripts) by default - Exposed [`math.primes`] element which backs the `[$f'$]` syntax in math + - Math mode is not affected by [`strong`] and [`emph`] anymore - Fixed [`attach`]($math.attach) under [fractions]($math.frac) - Fixed that [`math.class`] did not affect smart limit placement - Fixed weak spacing in [`lr`]($math.lr) groups @@ -179,7 +186,7 @@ description: | - Syntax - Added support for nested [destructuring patterns]($scripting/#bindings) - - Special spaces (like thin or no-breaking spaces) are now parsed literally + - Special spaces (like thin or non-breaking spaces) are now parsed literally instead of being collapsed into normal spaces (**Breaking change**) - Korean text can now use emphasis syntax without adding spaces (**Breaking change**) @@ -255,6 +262,7 @@ description: | - Added `--vendor-openssl` to CLI to configure whether to link OpenSSL statically instead of dynamically (not applicable to Windows and Apple platforms) + - Removed old tracing (and its verbosity) flag from the CLI - Added new `--timings` flag which supersedes the old flamegraph profiling in the CLI - Added minimal CLI to `typst-docs` crate for extracting the language and @@ -837,7 +845,7 @@ description: | ## Version 0.6.0 (June 30, 2023) { #v0.6.0 } - Package Management - Typst now has built-in [package management]($scripting/#packages) - - You can import [published]($packages) community packages or create and use + - You can import [published]($universe) community packages or create and use [system-local](https://github.com/typst/packages#local-packages) ones - Published packages are also supported in the web app diff --git a/docs/guides/guide-for-latex-users.md b/docs/guides/guide-for-latex-users.md index 8b2c267f..1f3caef9 100644 --- a/docs/guides/guide-for-latex-users.md +++ b/docs/guides/guide-for-latex-users.md @@ -419,8 +419,8 @@ show rule. In the web app, you can choose from predefined templates or even create your own using the template wizard. Locally, you can use the `typst init` CLI to create a new project from a template. Check out -[the list of templates]($packages/?templates) published in the official package -manager. You can also take a look at the +[the list of templates]($universe/search/?kind=templates) published on Typst +Universe, our official package ecosystem. You can also take a look at the [`awesome-typst` repository](https://github.com/qjcg/awesome-typst) to find community templates that aren't yet available as packages. @@ -452,7 +452,7 @@ and their corresponding Typst functions. | enumitem | [`list`], [`enum`], [`terms`] functions | Although _many_ things are built-in, not everything can be. That's why Typst has -a built-in [package manager]($packages) where the community can share their +a built-in [package manager]($universe) where the community can share their creations and automations. Let's take, for instance, the _cetz_ package: This package allows you to create complex drawings and plots. To use cetz in your document, you can just write: diff --git a/docs/reference/scripting.md b/docs/reference/scripting.md index 8cfb9698..dda5d989 100644 --- a/docs/reference/scripting.md +++ b/docs/reference/scripting.md @@ -325,7 +325,7 @@ and a version. ``` The `preview` namespace contains packages shared by the community. You can find -a searchable list of available community packages in the [packages] section. +all available community packages on [Typst Universe]($universe). If you are using Typst locally, you can also create your own system-local packages. For more details on this, see the diff --git a/docs/src/link.rs b/docs/src/link.rs index faf93293..e75c8426 100644 --- a/docs/src/link.rs +++ b/docs/src/link.rs @@ -45,9 +45,9 @@ fn resolve_known(head: &str, base: &str) -> Option<String> { "$scripting" => format!("{base}reference/scripting"), "$context" => format!("{base}reference/context"), "$guides" => format!("{base}guides"), - "$packages" => format!("{base}packages"), "$changelog" => format!("{base}changelog"), "$community" => format!("{base}community"), + "$universe" => "https://typst.app/universe".into(), _ => return None, }) } |
