mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Final touches (#3678)
This commit is contained in:
parent
9bd1451452
commit
faca50a240
@ -10,10 +10,10 @@ authors = ["The Typst Project Developers"]
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
homepage = "https://typst.app"
|
homepage = "https://typst.app"
|
||||||
repository = "https://github.com/typst/typst"
|
repository = "https://github.com/typst/typst"
|
||||||
readme = "README.md"
|
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
categories = ["compilers"]
|
categories = ["compilers"]
|
||||||
keywords = ["typst"]
|
keywords = ["typst"]
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
typst = { path = "crates/typst" }
|
typst = { path = "crates/typst" }
|
||||||
|
@ -10,6 +10,7 @@ edition = { workspace = true }
|
|||||||
homepage = { workspace = true }
|
homepage = { workspace = true }
|
||||||
repository = { workspace = true }
|
repository = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "typst"
|
name = "typst"
|
||||||
|
@ -10,6 +10,7 @@ repository = { workspace = true }
|
|||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
categories = { workspace = true }
|
categories = { workspace = true }
|
||||||
keywords = { workspace = true }
|
keywords = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
test = false
|
test = false
|
||||||
|
@ -10,6 +10,7 @@ repository = { workspace = true }
|
|||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
categories = { workspace = true }
|
categories = { workspace = true }
|
||||||
keywords = { workspace = true }
|
keywords = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
@ -10,6 +10,7 @@ repository = { workspace = true }
|
|||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
categories = { workspace = true }
|
categories = { workspace = true }
|
||||||
keywords = { workspace = true }
|
keywords = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -10,6 +10,7 @@ repository = { workspace = true }
|
|||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
categories = { workspace = true }
|
categories = { workspace = true }
|
||||||
keywords = { workspace = true }
|
keywords = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -10,6 +10,7 @@ repository = { workspace = true }
|
|||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
categories = { workspace = true }
|
categories = { workspace = true }
|
||||||
keywords = { workspace = true }
|
keywords = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -10,6 +10,7 @@ repository = { workspace = true }
|
|||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
categories = { workspace = true }
|
categories = { workspace = true }
|
||||||
keywords = { workspace = true }
|
keywords = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -10,6 +10,7 @@ repository = { workspace = true }
|
|||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
categories = { workspace = true }
|
categories = { workspace = true }
|
||||||
keywords = { workspace = true }
|
keywords = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
typst-syntax = { workspace = true }
|
typst-syntax = { workspace = true }
|
||||||
|
@ -10,6 +10,7 @@ edition = { workspace = true }
|
|||||||
homepage = { workspace = true }
|
homepage = { workspace = true }
|
||||||
repository = { workspace = true }
|
repository = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
|
readme = { workspace = true }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
||||||
|
@ -191,8 +191,8 @@ pub struct GridElem {
|
|||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #grid(
|
/// #grid(
|
||||||
/// fill: (col, row) =>
|
/// fill: (x, y) =>
|
||||||
/// if calc.even(col + row) { luma(230) }
|
/// if calc.even(x + y) { luma(230) }
|
||||||
/// else { white },
|
/// else { white },
|
||||||
/// align: center + horizon,
|
/// align: center + horizon,
|
||||||
/// columns: 4,
|
/// columns: 4,
|
||||||
|
@ -160,12 +160,12 @@ pub struct TableElem {
|
|||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #table(
|
/// #table(
|
||||||
/// fill: (col, _) =>
|
/// fill: (x, _) =>
|
||||||
/// if calc.odd(col) { luma(240) }
|
/// if calc.odd(x) { luma(240) }
|
||||||
/// else { white },
|
/// else { white },
|
||||||
/// align: (col, row) =>
|
/// align: (x, y) =>
|
||||||
/// if row == 0 { center }
|
/// if y == 0 { center }
|
||||||
/// else if col == 0 { left }
|
/// else if x == 0 { left }
|
||||||
/// else { right },
|
/// else { right },
|
||||||
/// columns: 4,
|
/// columns: 4,
|
||||||
/// [], [*Q1*], [*Q2*], [*Q3*],
|
/// [], [*Q1*], [*Q2*], [*Q3*],
|
||||||
|
@ -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
|
/// 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
|
/// 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]
|
#[category]
|
||||||
pub static VISUALIZE: Category;
|
pub static VISUALIZE: Category;
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@ description: |
|
|||||||
# Changelog
|
# Changelog
|
||||||
## Unreleased
|
## Unreleased
|
||||||
- Tables (thanks to [@PgBiel](https://github.com/PgBiel))
|
- 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
|
- Added [`table.cell`] element for per-cell configuration
|
||||||
- Cells can now span multiple [columns]($table.cell.colspan) or
|
- Cells can now span multiple [columns]($table.cell.colspan) or
|
||||||
[rows]($table.cell.rowspan)
|
[rows]($table.cell.rowspan)
|
||||||
@ -24,13 +25,13 @@ description: |
|
|||||||
- You can now use template packages to get started with new projects. Click
|
- 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
|
_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
|
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
|
- Switching templates after the fact has become easier. You can just import a
|
||||||
styling function from a different template package.
|
styling function from a different template package.
|
||||||
- Package authors can now submit their own templates to the
|
- Package authors can now submit their own templates to the
|
||||||
[package repository](https://github.com/typst/packages). Share a template
|
[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
|
for a paper, your institution, or an original work to help the community get
|
||||||
head start on their projects.
|
a head start on their projects.
|
||||||
- Templates and packages are now organized by category and discipline. Filter
|
- Templates and packages are now organized by category and discipline. Filter
|
||||||
packages by either taxonomy in the _Start from template_ wizard. If you are
|
packages by either taxonomy in the _Start from template_ wizard. If you are
|
||||||
a package author, take a look at the new documentation for
|
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
|
- Added contextual function [`here`] to retrieve the [location] of the current
|
||||||
context
|
context
|
||||||
- The [`locate`] function now returns the location of a selector's unique
|
- 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.
|
remains temporarily available for compatibility.
|
||||||
- The [`counter.at`] and [`state.at`] methods are now more flexible: They
|
- The [`counter.at`] and [`state.at`] methods are now more flexible: They
|
||||||
directly accept any kind of [locatable]($location/#locatable) selector with
|
directly accept any kind of [locatable]($location/#locatable) selector with
|
||||||
@ -59,7 +60,7 @@ description: |
|
|||||||
should not be used anymore without context. (Deprecation planned)
|
should not be used anymore without context. (Deprecation planned)
|
||||||
- The [`state.display`] function should not be used anymore, use [`state.get`]
|
- The [`state.display`] function should not be used anymore, use [`state.get`]
|
||||||
instead (Deprecation planned)
|
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)
|
[`state.final`] should not be used anymore (Deprecation planned)
|
||||||
- The [`styles`]($measure.styles) argument of the `measure` function should
|
- The [`styles`]($measure.styles) argument of the `measure` function should
|
||||||
not be used anymore (Deprecation planned)
|
not be used anymore (Deprecation planned)
|
||||||
@ -75,8 +76,8 @@ description: |
|
|||||||
- Show-set rules on the same element
|
- Show-set rules on the same element
|
||||||
(e.g. `{show heading.where(level: 1): set heading(numbering: "1.")}`) now
|
(e.g. `{show heading.where(level: 1): set heading(numbering: "1.")}`) now
|
||||||
work properly
|
work properly
|
||||||
- Setting properties on an element within a transformational show rule (e.g..
|
- Setting properties on an element within a transformational show rule (e.g.
|
||||||
`{show heading: it => { set heading(..): it }}`) is **not** supported
|
`{show heading: it => { set heading(..); it }}`) is **not** supported
|
||||||
anymore (previously it also only worked sometimes); use show-set rules
|
anymore (previously it also only worked sometimes); use show-set rules
|
||||||
instead (**Breaking change**)
|
instead (**Breaking change**)
|
||||||
- Text show rules that match their own output now work properly
|
- 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
|
- [And]($selector.and) and [or]($selector.or) selectors can now be used with
|
||||||
show rules
|
show rules
|
||||||
- Errors within show rules and context expressions are now ignored in all but
|
- 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`]
|
[`locate`]
|
||||||
|
- Fixed a bug where document set rules were allowed after content
|
||||||
|
|
||||||
- Layout
|
- Layout
|
||||||
- Added `reflow` argument to [`rotate`]($rotate) and [`scale`]($scale) which
|
- Added `reflow` argument to [`rotate`]($rotate) and [`scale`]($scale) which
|
||||||
@ -102,6 +104,8 @@ description: |
|
|||||||
- Fixed usage of [`h`] and [`v`] in [stacks]($stack)
|
- Fixed usage of [`h`] and [`v`] in [stacks]($stack)
|
||||||
- Invisible content like a counter update will no longer force a visible
|
- Invisible content like a counter update will no longer force a visible
|
||||||
block for just itself
|
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
|
- Text
|
||||||
- Added [`stroke`]($text.stroke) property for 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
|
- The [text direction]($text.dir) can now be overridden within a paragraph
|
||||||
- Fixed Danish [smart quotes]($smartquote)
|
- Fixed Danish [smart quotes]($smartquote)
|
||||||
- Fixed font fallback next to a line break
|
- 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 Finnish translation of "Listing"
|
||||||
- Fixed Z-ordering of multiple text decorations (underlines, etc.)
|
- Fixed Z-ordering of multiple text decorations (underlines, etc.)
|
||||||
- Fixed a bug due to which text [features]($text.features) could not be
|
- Fixed a bug due to which text [features]($text.features) could not be
|
||||||
@ -119,11 +123,13 @@ description: |
|
|||||||
|
|
||||||
- Model
|
- Model
|
||||||
- Added [`depth`]($heading.depth) and [`offset`]($heading.offset) arguments to
|
- 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
|
- List [markers]($list.marker) now cycle by default
|
||||||
- The [`quote`] function now more robustly selects the correct quotes based on
|
- The [`quote`] function now more robustly selects the correct quotes based on
|
||||||
language and nesting
|
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
|
- Math
|
||||||
- Inline equations now automatically linebreak at appropriate places
|
- Inline equations now automatically linebreak at appropriate places
|
||||||
@ -134,6 +140,7 @@ description: |
|
|||||||
- [Primes]($math.primes) are now always attached as [scripts]($math.scripts)
|
- [Primes]($math.primes) are now always attached as [scripts]($math.scripts)
|
||||||
by default
|
by default
|
||||||
- Exposed [`math.primes`] element which backs the `[$f'$]` syntax in math
|
- 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 [`attach`]($math.attach) under [fractions]($math.frac)
|
||||||
- Fixed that [`math.class`] did not affect smart limit placement
|
- Fixed that [`math.class`] did not affect smart limit placement
|
||||||
- Fixed weak spacing in [`lr`]($math.lr) groups
|
- Fixed weak spacing in [`lr`]($math.lr) groups
|
||||||
@ -179,7 +186,7 @@ description: |
|
|||||||
|
|
||||||
- Syntax
|
- Syntax
|
||||||
- Added support for nested [destructuring patterns]($scripting/#bindings)
|
- 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**)
|
instead of being collapsed into normal spaces (**Breaking change**)
|
||||||
- Korean text can now use emphasis syntax without adding spaces
|
- Korean text can now use emphasis syntax without adding spaces
|
||||||
(**Breaking change**)
|
(**Breaking change**)
|
||||||
@ -255,6 +262,7 @@ description: |
|
|||||||
- Added `--vendor-openssl` to CLI to configure whether to link OpenSSL
|
- Added `--vendor-openssl` to CLI to configure whether to link OpenSSL
|
||||||
statically instead of dynamically (not applicable to Windows and Apple
|
statically instead of dynamically (not applicable to Windows and Apple
|
||||||
platforms)
|
platforms)
|
||||||
|
- Removed old tracing (and its verbosity) flag from the CLI
|
||||||
- Added new `--timings` flag which supersedes the old flamegraph profiling in
|
- Added new `--timings` flag which supersedes the old flamegraph profiling in
|
||||||
the CLI
|
the CLI
|
||||||
- Added minimal CLI to `typst-docs` crate for extracting the language and
|
- 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 }
|
## Version 0.6.0 (June 30, 2023) { #v0.6.0 }
|
||||||
- Package Management
|
- Package Management
|
||||||
- Typst now has built-in [package management]($scripting/#packages)
|
- 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
|
[system-local](https://github.com/typst/packages#local-packages) ones
|
||||||
- Published packages are also supported in the web app
|
- Published packages are also supported in the web app
|
||||||
|
|
||||||
|
@ -419,8 +419,8 @@ show rule.
|
|||||||
In the web app, you can choose from predefined templates or even
|
In the web app, you can choose from predefined templates or even
|
||||||
create your own using the template wizard. Locally, you can use the
|
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
|
`typst init` CLI to create a new project from a template. Check out
|
||||||
[the list of templates]($packages/?templates) published in the official package
|
[the list of templates]($universe/search/?kind=templates) published on Typst
|
||||||
manager. You can also take a look at the
|
Universe, our official package ecosystem. You can also take a look at the
|
||||||
[`awesome-typst` repository](https://github.com/qjcg/awesome-typst) to find
|
[`awesome-typst` repository](https://github.com/qjcg/awesome-typst) to find
|
||||||
community templates that aren't yet available as packages.
|
community templates that aren't yet available as packages.
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ and their corresponding Typst functions.
|
|||||||
| enumitem | [`list`], [`enum`], [`terms`] functions |
|
| enumitem | [`list`], [`enum`], [`terms`] functions |
|
||||||
|
|
||||||
Although _many_ things are built-in, not everything can be. That's why Typst has
|
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
|
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
|
package allows you to create complex drawings and plots. To use cetz in your
|
||||||
document, you can just write:
|
document, you can just write:
|
||||||
|
@ -325,7 +325,7 @@ and a version.
|
|||||||
```
|
```
|
||||||
|
|
||||||
The `preview` namespace contains packages shared by the community. You can find
|
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
|
If you are using Typst locally, you can also create your own system-local
|
||||||
packages. For more details on this, see the
|
packages. For more details on this, see the
|
||||||
|
@ -45,9 +45,9 @@ fn resolve_known(head: &str, base: &str) -> Option<String> {
|
|||||||
"$scripting" => format!("{base}reference/scripting"),
|
"$scripting" => format!("{base}reference/scripting"),
|
||||||
"$context" => format!("{base}reference/context"),
|
"$context" => format!("{base}reference/context"),
|
||||||
"$guides" => format!("{base}guides"),
|
"$guides" => format!("{base}guides"),
|
||||||
"$packages" => format!("{base}packages"),
|
|
||||||
"$changelog" => format!("{base}changelog"),
|
"$changelog" => format!("{base}changelog"),
|
||||||
"$community" => format!("{base}community"),
|
"$community" => format!("{base}community"),
|
||||||
|
"$universe" => "https://typst.app/universe".into(),
|
||||||
_ => return None,
|
_ => return None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user