mirror of https://github.com/stelzo/typst.git
Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
be849526b6 | |
|
|
91245311a8 | |
|
|
9cc920cc62 | |
|
|
e0246192ee |
File diff suppressed because it is too large
Load Diff
5022
Cargo.lock.bak
5022
Cargo.lock.bak
File diff suppressed because it is too large
Load Diff
100
Cargo.toml
100
Cargo.toml
|
|
@ -4,7 +4,7 @@ default-members = ["crates/typst-cli"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.13.1"
|
version = "0.13.0"
|
||||||
rust-version = "1.81" # also change in ci.yml
|
rust-version = "1.81" # also change in ci.yml
|
||||||
authors = ["The Typst Project Developers"]
|
authors = ["The Typst Project Developers"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
@ -16,32 +16,37 @@ keywords = ["typst"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
typst = { path = "crates/typst", version = "0.13.1" }
|
typst = { path = "crates/typst", version = "0.13.0" }
|
||||||
typst-cli = { path = "crates/typst-cli", version = "0.13.1" }
|
typst-cli = { path = "crates/typst-cli", version = "0.13.0" }
|
||||||
typst-eval = { path = "crates/typst-eval", version = "0.13.1" }
|
typst-eval = { path = "crates/typst-eval", version = "0.13.0" }
|
||||||
typst-html = { path = "crates/typst-html", version = "0.13.1" }
|
typst-html = { path = "crates/typst-html", version = "0.13.0" }
|
||||||
typst-ide = { path = "crates/typst-ide", version = "0.13.1" }
|
typst-ide = { path = "crates/typst-ide", version = "0.13.0" }
|
||||||
typst-kit = { path = "crates/typst-kit", version = "0.13.1" }
|
typst-kit = { path = "crates/typst-kit", version = "0.13.0" }
|
||||||
typst-layout = { path = "crates/typst-layout", version = "0.13.1" }
|
typst-layout = { path = "crates/typst-layout", version = "0.13.0" }
|
||||||
typst-library = { path = "crates/typst-library", version = "0.13.1" }
|
typst-library = { path = "crates/typst-library", version = "0.13.0" }
|
||||||
typst-macros = { path = "crates/typst-macros", version = "0.13.1" }
|
typst-macros = { path = "crates/typst-macros", version = "0.13.0" }
|
||||||
typst-pdf = { path = "crates/typst-pdf", version = "0.13.1" }
|
typst-pdf = { path = "crates/typst-pdf", version = "0.13.0" }
|
||||||
typst-realize = { path = "crates/typst-realize", version = "0.13.1" }
|
typst-realize = { path = "crates/typst-realize", version = "0.13.0" }
|
||||||
typst-render = { path = "crates/typst-render", version = "0.13.1" }
|
typst-render = { path = "crates/typst-render", version = "0.13.0" }
|
||||||
typst-svg = { path = "crates/typst-svg", version = "0.13.1" }
|
typst-svg = { path = "crates/typst-svg", version = "0.13.0" }
|
||||||
typst-syntax = { path = "crates/typst-syntax", version = "0.13.1" }
|
typst-syntax = { path = "crates/typst-syntax", version = "0.13.0" }
|
||||||
typst-timing = { path = "crates/typst-timing", version = "0.13.1" }
|
typst-timing = { path = "crates/typst-timing", version = "0.13.0" }
|
||||||
typst-utils = { path = "crates/typst-utils", version = "0.13.1" }
|
typst-utils = { path = "crates/typst-utils", version = "0.13.0" }
|
||||||
typst-assets = "0.13.1"
|
typst-assets = "0.13.0"
|
||||||
typst-dev-assets = { git = "https://github.com/typst/typst-dev-assets", tag = "v0.13.1" }
|
typst-dev-assets = { git = "https://github.com/typst/typst-dev-assets", tag = "v0.13.0" }
|
||||||
arrayvec = "0.7.4"
|
arrayvec = "0.7.4"
|
||||||
az = "1.2"
|
az = "1.2"
|
||||||
base64 = "0.22"
|
base64 = "0.22"
|
||||||
bitflags = { version = "2", features = ["serde"] }
|
bitflags = { version = "2", features = ["serde"] }
|
||||||
bumpalo = { version = "3.15.4", features = ["boxed", "collections"] }
|
bumpalo = { version = "3.15.4", features = ["boxed", "collections"] }
|
||||||
bytemuck = "1"
|
bytemuck = "1"
|
||||||
chinese-number = { version = "0.7.2", default-features = false, features = ["number-to-chinese"] }
|
chinese-number = { version = "0.7.2", default-features = false, features = [
|
||||||
chrono = { version = "0.4.24", default-features = false, features = ["clock", "std"] }
|
"number-to-chinese",
|
||||||
|
] }
|
||||||
|
chrono = { version = "0.4.24", default-features = false, features = [
|
||||||
|
"clock",
|
||||||
|
"std",
|
||||||
|
] }
|
||||||
ciborium = "0.2.1"
|
ciborium = "0.2.1"
|
||||||
clap = { version = "4.4", features = ["derive", "env", "wrap_help"] }
|
clap = { version = "4.4", features = ["derive", "env", "wrap_help"] }
|
||||||
clap_complete = "4.2.1"
|
clap_complete = "4.2.1"
|
||||||
|
|
@ -68,7 +73,11 @@ icu_provider_adapters = "1.4"
|
||||||
icu_provider_blob = "1.4"
|
icu_provider_blob = "1.4"
|
||||||
icu_segmenter = { version = "1.4", features = ["serde"] }
|
icu_segmenter = { version = "1.4", features = ["serde"] }
|
||||||
if_chain = "1"
|
if_chain = "1"
|
||||||
image = { version = "0.25.5", default-features = false, features = ["png", "jpeg", "gif"] }
|
image = { version = "0.25.5", default-features = false, features = [
|
||||||
|
"png",
|
||||||
|
"jpeg",
|
||||||
|
"gif",
|
||||||
|
] }
|
||||||
indexmap = { version = "2", features = ["serde"] }
|
indexmap = { version = "2", features = ["serde"] }
|
||||||
kamadak-exif = "0.6"
|
kamadak-exif = "0.6"
|
||||||
kurbo = "0.11"
|
kurbo = "0.11"
|
||||||
|
|
@ -81,8 +90,15 @@ notify = "8"
|
||||||
once_cell = "1"
|
once_cell = "1"
|
||||||
open = "5.0.1"
|
open = "5.0.1"
|
||||||
openssl = "0.10"
|
openssl = "0.10"
|
||||||
oxipng = { version = "9.0", default-features = false, features = ["filetime", "parallel", "zopfli"] }
|
oxipng = { version = "9.0", default-features = false, features = [
|
||||||
palette = { version = "0.7.3", default-features = false, features = ["approx", "libm"] }
|
"filetime",
|
||||||
|
"parallel",
|
||||||
|
"zopfli",
|
||||||
|
] }
|
||||||
|
palette = { version = "0.7.3", default-features = false, features = [
|
||||||
|
"approx",
|
||||||
|
"libm",
|
||||||
|
] }
|
||||||
parking_lot = "0.12.1"
|
parking_lot = "0.12.1"
|
||||||
pathdiff = "0.2"
|
pathdiff = "0.2"
|
||||||
pdf-writer = "0.12.1"
|
pdf-writer = "0.12.1"
|
||||||
|
|
@ -97,9 +113,13 @@ quote = "1"
|
||||||
rayon = "1.7.0"
|
rayon = "1.7.0"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
regex-syntax = "0.8"
|
regex-syntax = "0.8"
|
||||||
resvg = { version = "0.43", default-features = false, features = ["raster-images"] }
|
resvg = { version = "0.43", default-features = false, features = [
|
||||||
|
"raster-images",
|
||||||
|
] }
|
||||||
roxmltree = "0.20"
|
roxmltree = "0.20"
|
||||||
rust_decimal = { version = "1.36.0", default-features = false, features = ["maths"] }
|
rust_decimal = { version = "1.36.0", default-features = false, features = [
|
||||||
|
"maths",
|
||||||
|
] }
|
||||||
rustybuzz = "0.18"
|
rustybuzz = "0.18"
|
||||||
same-file = "1"
|
same-file = "1"
|
||||||
self-replace = "1.3.7"
|
self-replace = "1.3.7"
|
||||||
|
|
@ -110,21 +130,35 @@ serde_yaml = "0.9"
|
||||||
shell-escape = "0.1.5"
|
shell-escape = "0.1.5"
|
||||||
sigpipe = "0.1"
|
sigpipe = "0.1"
|
||||||
siphasher = "1"
|
siphasher = "1"
|
||||||
smallvec = { version = "1.11.1", features = ["union", "const_generics", "const_new"] }
|
smallvec = { version = "1.11.1", features = [
|
||||||
|
"union",
|
||||||
|
"const_generics",
|
||||||
|
"const_new",
|
||||||
|
] }
|
||||||
stacker = "0.1.15"
|
stacker = "0.1.15"
|
||||||
subsetter = "0.2"
|
subsetter = "0.2"
|
||||||
svg2pdf = "0.12"
|
svg2pdf = "0.12"
|
||||||
syn = { version = "2", features = ["full", "extra-traits"] }
|
syn = { version = "2", features = ["full", "extra-traits"] }
|
||||||
syntect = { version = "5", default-features = false, features = ["parsing", "regex-fancy", "plist-load", "yaml-load"] }
|
syntect = { version = "5", default-features = false, features = [
|
||||||
|
"parsing",
|
||||||
|
"regex-fancy",
|
||||||
|
"plist-load",
|
||||||
|
"yaml-load",
|
||||||
|
] }
|
||||||
tar = "0.4"
|
tar = "0.4"
|
||||||
tempfile = "3.7.0"
|
tempfile = "3.7.0"
|
||||||
thin-vec = "0.2.13"
|
thin-vec = "0.2.13"
|
||||||
time = { version = "0.3.20", features = ["formatting", "macros", "parsing"] }
|
time = { version = "0.3.20", features = ["formatting", "macros", "parsing"] }
|
||||||
tiny_http = "0.12"
|
tiny_http = "0.12"
|
||||||
tiny-skia = "0.11"
|
tiny-skia = "0.11"
|
||||||
toml = { version = "0.8", default-features = false, features = ["parse", "display"] }
|
toml = { version = "0.8", default-features = false, features = [
|
||||||
|
"parse",
|
||||||
|
"display",
|
||||||
|
] }
|
||||||
ttf-parser = "0.24.1"
|
ttf-parser = "0.24.1"
|
||||||
two-face = { version = "0.4.3", default-features = false, features = ["syntect-fancy"] }
|
two-face = { version = "0.4.3", default-features = false, features = [
|
||||||
|
"syntect-fancy",
|
||||||
|
] }
|
||||||
typed-arena = "2"
|
typed-arena = "2"
|
||||||
unicode-bidi = "0.3.18"
|
unicode-bidi = "0.3.18"
|
||||||
unicode-ident = "1.0"
|
unicode-ident = "1.0"
|
||||||
|
|
@ -132,7 +166,11 @@ unicode-math-class = "0.1"
|
||||||
unicode-script = "0.5"
|
unicode-script = "0.5"
|
||||||
unicode-segmentation = "1"
|
unicode-segmentation = "1"
|
||||||
unscanny = "0.1"
|
unscanny = "0.1"
|
||||||
ureq = { version = "2", default-features = false, features = ["native-tls", "gzip", "json"] }
|
ureq = { version = "2", default-features = false, features = [
|
||||||
|
"native-tls",
|
||||||
|
"gzip",
|
||||||
|
"json",
|
||||||
|
] }
|
||||||
usvg = { version = "0.43", default-features = false, features = ["text"] }
|
usvg = { version = "0.43", default-features = false, features = ["text"] }
|
||||||
walkdir = "2"
|
walkdir = "2"
|
||||||
wasmi = "0.40.0"
|
wasmi = "0.40.0"
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,32 @@ impl PackageStorage {
|
||||||
&self,
|
&self,
|
||||||
spec: &VersionlessPackageSpec,
|
spec: &VersionlessPackageSpec,
|
||||||
) -> StrResult<PackageVersion> {
|
) -> StrResult<PackageVersion> {
|
||||||
|
/*if spec.namespace == DEFAULT_NAMESPACE {
|
||||||
|
// For `DEFAULT_NAMESPACE`, download the package index and find the latest
|
||||||
|
// version.
|
||||||
|
self.download_index()?
|
||||||
|
.iter()
|
||||||
|
.filter_map(|value| MinimalPackageInfo::deserialize(value).ok())
|
||||||
|
.filter(|package| package.name == spec.name)
|
||||||
|
.map(|package| package.version)
|
||||||
|
.max()
|
||||||
|
.ok_or_else(|| eco_format!("failed to find package {spec}"))
|
||||||
|
} else {
|
||||||
|
// For other namespaces, search locally. We only search in the data
|
||||||
|
// directory and not the cache directory, because the latter is not
|
||||||
|
// intended for storage of local packages.
|
||||||
|
let subdir = format!("{}/{}", spec.namespace, spec.name);
|
||||||
|
self.package_path
|
||||||
|
.iter()
|
||||||
|
.flat_map(|dir| std::fs::read_dir(dir.join(&subdir)).ok())
|
||||||
|
.flatten()
|
||||||
|
.filter_map(|entry| entry.ok())
|
||||||
|
.map(|entry| entry.path())
|
||||||
|
.filter_map(|path| path.file_name()?.to_string_lossy().parse().ok())
|
||||||
|
.max()
|
||||||
|
.ok_or_else(|| eco_format!("please specify the desired version"))
|
||||||
|
}*/
|
||||||
|
|
||||||
self.download_index(spec)?
|
self.download_index(spec)?
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|package| package.name == spec.name)
|
.filter(|package| package.name == spec.name)
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,6 @@ impl<'a> CurveBuilder<'a> {
|
||||||
self.last_point = point;
|
self.last_point = point;
|
||||||
self.last_control_from = point;
|
self.last_control_from = point;
|
||||||
self.is_started = true;
|
self.is_started = true;
|
||||||
self.is_empty = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add a line segment.
|
/// Add a line segment.
|
||||||
|
|
|
||||||
|
|
@ -769,7 +769,7 @@ impl Array {
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #let array = (1, 2, 3, 4, 5, 6, 7, 8)
|
/// #let array = (1, 2, 3, 4, 5, 6, 7, 8)
|
||||||
/// #array.chunks(3) \
|
/// #array.chunks(3)
|
||||||
/// #array.chunks(3, exact: true)
|
/// #array.chunks(3, exact: true)
|
||||||
/// ```
|
/// ```
|
||||||
#[func]
|
#[func]
|
||||||
|
|
|
||||||
|
|
@ -34,14 +34,14 @@ use crate::loading::{DataSource, Load, Readable};
|
||||||
/// let author = find-child(elem, "author")
|
/// let author = find-child(elem, "author")
|
||||||
/// let pars = find-child(elem, "content")
|
/// let pars = find-child(elem, "content")
|
||||||
///
|
///
|
||||||
/// [= #title.children.first()]
|
/// heading(title.children.first())
|
||||||
/// text(10pt, weight: "medium")[
|
/// text(10pt, weight: "medium")[
|
||||||
/// Published by
|
/// Published by
|
||||||
/// #author.children.first()
|
/// #author.children.first()
|
||||||
/// ]
|
/// ]
|
||||||
///
|
///
|
||||||
/// for p in pars.children {
|
/// for p in pars.children {
|
||||||
/// if type(p) == dictionary {
|
/// if (type(p) == "dictionary") {
|
||||||
/// parbreak()
|
/// parbreak()
|
||||||
/// p.children.first()
|
/// p.children.first()
|
||||||
/// }
|
/// }
|
||||||
|
|
@ -50,7 +50,7 @@ use crate::loading::{DataSource, Load, Readable};
|
||||||
///
|
///
|
||||||
/// #let data = xml("example.xml")
|
/// #let data = xml("example.xml")
|
||||||
/// #for elem in data.first().children {
|
/// #for elem in data.first().children {
|
||||||
/// if type(elem) == dictionary {
|
/// if (type(elem) == "dictionary") {
|
||||||
/// article(elem)
|
/// article(elem)
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
|
|
||||||
|
|
@ -326,10 +326,7 @@ fn visit_math_rules<'a>(
|
||||||
// Symbols in non-math content transparently convert to `TextElem` so we
|
// Symbols in non-math content transparently convert to `TextElem` so we
|
||||||
// don't have to handle them in non-math layout.
|
// don't have to handle them in non-math layout.
|
||||||
if let Some(elem) = content.to_packed::<SymbolElem>() {
|
if let Some(elem) = content.to_packed::<SymbolElem>() {
|
||||||
let mut text = TextElem::packed(elem.text).spanned(elem.span());
|
let text = TextElem::packed(elem.text).spanned(elem.span());
|
||||||
if let Some(label) = elem.label() {
|
|
||||||
text.set_label(label);
|
|
||||||
}
|
|
||||||
visit(s, s.store(text), styles)?;
|
visit(s, s.store(text), styles)?;
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -294,20 +294,20 @@ feature flag.
|
||||||
`errorbar.diamond.stroked`, `errorbar.diamond.filled`,
|
`errorbar.diamond.stroked`, `errorbar.diamond.filled`,
|
||||||
`errorbar.circle.stroked`, `errorbar.circle.filled`
|
`errorbar.circle.stroked`, `errorbar.circle.filled`
|
||||||
- `numero`
|
- `numero`
|
||||||
- Renamed **(Breaking change)**
|
- `Omega.inv`
|
||||||
|
- Renamed
|
||||||
- `ohm.inv` to `Omega.inv`
|
- `ohm.inv` to `Omega.inv`
|
||||||
- Changed codepoint **(Breaking change)**
|
- Changed codepoint
|
||||||
- `angle.l.double` from `《` to `⟪`
|
- `angle.l.double` from `《` to `⟪`
|
||||||
- `angle.r.double` from `》` to `⟫`
|
- `angle.r.double` from `》` to `⟫`
|
||||||
- `angstrom` from U+212B (`Å`) to U+00C5 (`Å`)
|
- `angstrom` from U+212B (`Å`) to U+00C5 (`Å`)
|
||||||
- Deprecated
|
- Deprecated
|
||||||
- `sect` and all its variants in favor of `inter`
|
- `sect` and all its variants in favor of `inter`
|
||||||
- `integral.sect` in favor of `integral.inter`
|
- `integral.sect` in favor of `integral.inter`
|
||||||
- Removed **(Breaking change)**
|
- Removed
|
||||||
- `degree.c` in favor of `°C` (`[$upright(°C)$]` or `[$upright(degree C)$]` in math)
|
- `degree.c` in favor of `°C` (`[$upright(°C)$]` or `[$upright(degree C)$]` in math)
|
||||||
- `degree.f` in favor of `°F` (`[$upright(°F)$]` or `[$upright(degree F)$]` in math)
|
- `degree.f` in favor of `°F` (`[$upright(°F)$]` or `[$upright(degree F)$]` in math)
|
||||||
- `kelvin` in favor of just K (`[$upright(K)$]` in math)
|
- `kelvin` in favor of just K (`[$upright(K)$]` in math)
|
||||||
- `ohm` in favor of `Omega`
|
|
||||||
|
|
||||||
## Deprecations
|
## Deprecations
|
||||||
- The [`path`] function in favor of the [`curve`] function
|
- The [`path`] function in favor of the [`curve`] function
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
---
|
|
||||||
title: 0.13.1
|
|
||||||
description: Changes in Typst 0.13.1
|
|
||||||
---
|
|
||||||
|
|
||||||
# Version 0.13.1 (March 7, 2025)
|
|
||||||
|
|
||||||
## Command Line Interface
|
|
||||||
- Fixed high CPU usage for `typst watch` on Linux. Depending on the project
|
|
||||||
size, CPU usage would spike for varying amounts of time. This bug appeared
|
|
||||||
with 0.13.0 due to a behavioral change in the inotify file watching backend.
|
|
||||||
|
|
||||||
## HTML export
|
|
||||||
- Fixed export of tables with [gutters]($table.gutter)
|
|
||||||
- Fixed usage of `<html>` and `<body>` element within [context]
|
|
||||||
- Fixed querying of [metadata] next to `<html>` and `<body>` element
|
|
||||||
|
|
||||||
## Visualization
|
|
||||||
- Fixed [curves]($curve) with multiple non-closed components
|
|
||||||
|
|
||||||
## Introspection
|
|
||||||
- Fixed a regression where labelled [symbols]($symbol) could not be
|
|
||||||
[queried]($query) by label
|
|
||||||
|
|
||||||
## Deprecations
|
|
||||||
- Fixed false positives in deprecation warnings for type/str comparisons
|
|
||||||
|
|
||||||
## Contributors
|
|
||||||
<contributors from="v0.13.0" to="v0.13.1" />
|
|
||||||
|
|
@ -10,7 +10,6 @@ forward. This section documents all changes to Typst since its initial public
|
||||||
release.
|
release.
|
||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
- [Typst 0.13.1]($changelog/0.13.1)
|
|
||||||
- [Typst 0.13.0]($changelog/0.13.0)
|
- [Typst 0.13.0]($changelog/0.13.0)
|
||||||
- [Typst 0.12.0]($changelog/0.12.0)
|
- [Typst 0.12.0]($changelog/0.12.0)
|
||||||
- [Typst 0.11.1]($changelog/0.11.1)
|
- [Typst 0.11.1]($changelog/0.11.1)
|
||||||
|
|
|
||||||
|
|
@ -447,7 +447,7 @@ document.
|
||||||
To let a function style your whole document, the show rule processes everything
|
To let a function style your whole document, the show rule processes everything
|
||||||
that comes after it and calls the function specified after the colon with the
|
that comes after it and calls the function specified after the colon with the
|
||||||
result as an argument. The `.with` part is a _method_ that takes the `conf`
|
result as an argument. The `.with` part is a _method_ that takes the `conf`
|
||||||
function and pre-configures some of its arguments before passing it on to the
|
function and pre-configures some if its arguments before passing it on to the
|
||||||
show rule.
|
show rule.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ requirements with examples.
|
||||||
Typst's default page size is A4 paper. Depending on your region and your use
|
Typst's default page size is A4 paper. Depending on your region and your use
|
||||||
case, you will want to change this. You can do this by using the
|
case, you will want to change this. You can do this by using the
|
||||||
[`{page}`]($page) set rule and passing it a string argument to use a common page
|
[`{page}`]($page) set rule and passing it a string argument to use a common page
|
||||||
size. Options include the complete ISO 216 series (e.g. `"a4"` and `"iso-c2"`),
|
size. Options include the complete ISO 216 series (e.g. `"iso-a4"`, `"iso-c2"`),
|
||||||
customary US formats like `"us-legal"` or `"us-letter"`, and more. Check out the
|
customary US formats like `"us-legal"` or `"us-letter"`, and more. Check out the
|
||||||
reference for the [page's paper argument]($page.paper) to learn about all
|
reference for the [page's paper argument]($page.paper) to learn about all
|
||||||
available options.
|
available options.
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,6 @@ fn changelog_pages(resolver: &dyn Resolver) -> PageModel {
|
||||||
let mut page = md_page(resolver, resolver.base(), load!("changelog/welcome.md"));
|
let mut page = md_page(resolver, resolver.base(), load!("changelog/welcome.md"));
|
||||||
let base = format!("{}changelog/", resolver.base());
|
let base = format!("{}changelog/", resolver.base());
|
||||||
page.children = vec![
|
page.children = vec![
|
||||||
md_page(resolver, &base, load!("changelog/0.13.1.md")),
|
|
||||||
md_page(resolver, &base, load!("changelog/0.13.0.md")),
|
md_page(resolver, &base, load!("changelog/0.13.0.md")),
|
||||||
md_page(resolver, &base, load!("changelog/0.12.0.md")),
|
md_page(resolver, &base, load!("changelog/0.12.0.md")),
|
||||||
md_page(resolver, &base, load!("changelog/0.11.1.md")),
|
md_page(resolver, &base, load!("changelog/0.11.1.md")),
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,11 @@ your report using Typst's styling system.
|
||||||
As we have seen in the previous chapter, Typst has functions that _insert_
|
As we have seen in the previous chapter, Typst has functions that _insert_
|
||||||
content (e.g. the [`image`] function) and others that _manipulate_ content that
|
content (e.g. the [`image`] function) and others that _manipulate_ content that
|
||||||
they received as arguments (e.g. the [`align`] function). The first impulse you
|
they received as arguments (e.g. the [`align`] function). The first impulse you
|
||||||
might have when you want, for example, to change the font, could be to look
|
might have when you want, for example, to justify the report, could be to look
|
||||||
for a function that does that and wrap the complete document in it.
|
for a function that does that and wrap the complete document in it.
|
||||||
|
|
||||||
```example
|
```example
|
||||||
#text(font: "New Computer Modern")[
|
#par(justify: true)[
|
||||||
= Background
|
= Background
|
||||||
In the case of glaciers, fluid
|
In the case of glaciers, fluid
|
||||||
dynamics principles can be used
|
dynamics principles can be used
|
||||||
|
|
@ -37,9 +37,9 @@ do in Typst, there is special syntax for it: Instead of putting the content
|
||||||
inside of the argument list, you can write it in square brackets directly after
|
inside of the argument list, you can write it in square brackets directly after
|
||||||
the normal arguments, saving on punctuation.
|
the normal arguments, saving on punctuation.
|
||||||
|
|
||||||
As seen above, that works. With the [`text`] function, we can adjust the font
|
As seen above, that works. The [`par`] function justifies all paragraphs within
|
||||||
for all text within it. However, wrapping the document in countless functions
|
it. However, wrapping the document in countless functions and applying styles
|
||||||
and applying styles selectively and in-situ can quickly become cumbersome.
|
selectively and in-situ can quickly become cumbersome.
|
||||||
|
|
||||||
Fortunately, Typst has a more elegant solution. With _set rules,_ you can apply
|
Fortunately, Typst has a more elegant solution. With _set rules,_ you can apply
|
||||||
style properties to all occurrences of some kind of content. You write a set
|
style properties to all occurrences of some kind of content. You write a set
|
||||||
|
|
@ -47,9 +47,7 @@ rule by entering the `{set}` keyword, followed by the name of the function whose
|
||||||
properties you want to set, and a list of arguments in parentheses.
|
properties you want to set, and a list of arguments in parentheses.
|
||||||
|
|
||||||
```example
|
```example
|
||||||
#set text(
|
#set par(justify: true)
|
||||||
font: "New Computer Modern"
|
|
||||||
)
|
|
||||||
|
|
||||||
= Background
|
= Background
|
||||||
In the case of glaciers, fluid
|
In the case of glaciers, fluid
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 85 B |
Binary file not shown.
|
Before Width: | Height: | Size: 243 B |
|
|
@ -151,7 +151,3 @@
|
||||||
--- symbol-sect-deprecated ---
|
--- symbol-sect-deprecated ---
|
||||||
// Warning: 5-9 `sect` is deprecated, use `inter` instead
|
// Warning: 5-9 `sect` is deprecated, use `inter` instead
|
||||||
$ A sect B = A inter B $
|
$ A sect B = A inter B $
|
||||||
|
|
||||||
--- issue-5930-symbol-label ---
|
|
||||||
#emoji.face<lab>
|
|
||||||
#context test(query(<lab>).first().text, "😀")
|
|
||||||
|
|
|
||||||
|
|
@ -38,16 +38,6 @@
|
||||||
curve.close(mode: "smooth"),
|
curve.close(mode: "smooth"),
|
||||||
)
|
)
|
||||||
|
|
||||||
--- curve-multiple-non-closed ---
|
|
||||||
#curve(
|
|
||||||
stroke: 2pt,
|
|
||||||
curve.line((20pt, 0pt)),
|
|
||||||
curve.move((0pt, 10pt)),
|
|
||||||
curve.line((20pt, 10pt)),
|
|
||||||
curve.move((0pt, 20pt)),
|
|
||||||
curve.line((20pt, 20pt)),
|
|
||||||
)
|
|
||||||
|
|
||||||
--- curve-line ---
|
--- curve-line ---
|
||||||
#curve(
|
#curve(
|
||||||
fill: purple,
|
fill: purple,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue