Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a998775
Fix HTML export of table with gutter (#5920)
PgBiel Feb 23, 2025
20d4f81
Fix comparison of `Func` and `NativeFuncData` (#5943)
laurmaedje Feb 24, 2025
4893eb5
HTML export: fix elem counting on classify_output (#5910)
SharzyL Feb 24, 2025
7d4010a
Fix introspection of HTML root sibling metadata (#5953)
laurmaedje Feb 25, 2025
a754be5
Fix high CPU usage due to inotify watch triggering itself (#5905)
aodenis Feb 25, 2025
4a78a7d
Fix false positive for type/str comparison warning (#5957)
laurmaedje Feb 25, 2025
d04f014
Fix paper name in page setup guide (#5956)
laurmaedje Feb 25, 2025
59569cb
Fix curve with multiple non-closed components. (#5963)
Emm54321 Feb 26, 2025
9c41234
Fix docs example with type/string comparison (#5987)
7ijme Mar 3, 2025
d97967d
Correct typo (#5971)
F2011 Mar 3, 2025
e0074df
Make `array.chunks` example more readable (#5975)
Andrew15-5 Mar 3, 2025
fe94b2b
Hotfix for labels on symbols (#6015)
laurmaedje Mar 7, 2025
74826fc
Replace `par` function call in tutorial (#6023)
laurmaedje Mar 7, 2025
393be88
Mention that `sym.ohm` was removed in the 0.13.0 changelog (#6017)
MDLC01 Mar 7, 2025
381ff0c
Mark breaking symbol changes as breaking in 0.13.0 changelog (#6024)
laurmaedje Mar 7, 2025
81e9bc7
0.13.1 changelog (#6025)
laurmaedje Mar 7, 2025
8ace67d
Version bump
laurmaedje Mar 7, 2025
c00e83e
Merge tag 'v0.13.1'
3w36zj6 Mar 29, 2025
da71fa0
docs: specify links in documentation
3w36zj6 Mar 29, 2025
639502b
chore: 検索インデックスを更新
3w36zj6 Mar 29, 2025
b64a8be
docs: Webサイト上のバージョンをv0.13.1に更新
3w36zj6 Mar 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default-members = ["crates/typst-cli"]
resolver = "2"

[workspace.package]
version = "0.13.0"
version = "0.13.1"
rust-version = "1.80" # also change in ci.yml
authors = ["The Typst Project Developers"]
edition = "2021"
Expand All @@ -16,24 +16,24 @@ keywords = ["typst"]
readme = "README.md"

[workspace.dependencies]
typst = { path = "crates/typst", version = "0.13.0" }
typst-cli = { path = "crates/typst-cli", version = "0.13.0" }
typst-eval = { path = "crates/typst-eval", version = "0.13.0" }
typst-html = { path = "crates/typst-html", version = "0.13.0" }
typst-ide = { path = "crates/typst-ide", version = "0.13.0" }
typst-kit = { path = "crates/typst-kit", version = "0.13.0" }
typst-layout = { path = "crates/typst-layout", version = "0.13.0" }
typst-library = { path = "crates/typst-library", version = "0.13.0" }
typst-macros = { path = "crates/typst-macros", version = "0.13.0" }
typst-pdf = { path = "crates/typst-pdf", version = "0.13.0" }
typst-realize = { path = "crates/typst-realize", version = "0.13.0" }
typst-render = { path = "crates/typst-render", version = "0.13.0" }
typst-svg = { path = "crates/typst-svg", version = "0.13.0" }
typst-syntax = { path = "crates/typst-syntax", version = "0.13.0" }
typst-timing = { path = "crates/typst-timing", version = "0.13.0" }
typst-utils = { path = "crates/typst-utils", version = "0.13.0" }
typst-assets = "0.13.0"
typst-dev-assets = { git = "https://github.com/typst/typst-dev-assets", tag = "v0.13.0" }
typst = { path = "crates/typst", version = "0.13.1" }
typst-cli = { path = "crates/typst-cli", version = "0.13.1" }
typst-eval = { path = "crates/typst-eval", version = "0.13.1" }
typst-html = { path = "crates/typst-html", version = "0.13.1" }
typst-ide = { path = "crates/typst-ide", version = "0.13.1" }
typst-kit = { path = "crates/typst-kit", version = "0.13.1" }
typst-layout = { path = "crates/typst-layout", version = "0.13.1" }
typst-library = { path = "crates/typst-library", version = "0.13.1" }
typst-macros = { path = "crates/typst-macros", version = "0.13.1" }
typst-pdf = { path = "crates/typst-pdf", version = "0.13.1" }
typst-realize = { path = "crates/typst-realize", version = "0.13.1" }
typst-render = { path = "crates/typst-render", version = "0.13.1" }
typst-svg = { path = "crates/typst-svg", version = "0.13.1" }
typst-syntax = { path = "crates/typst-syntax", version = "0.13.1" }
typst-timing = { path = "crates/typst-timing", version = "0.13.1" }
typst-utils = { path = "crates/typst-utils", version = "0.13.1" }
typst-assets = "0.13.1"
typst-dev-assets = { git = "https://github.com/typst/typst-dev-assets", tag = "v0.13.1" }
arrayvec = "0.7.4"
az = "1.2"
base64 = "0.22"
Expand Down
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This is an unofficial Japanese translation of the documentation for the typesetting system [Typst](https://typst.app/docs). It has been created with the permission of [Typst GmbH](https://typst.app/legal/).

The repository was forked from the [Chinese version](https://github.com/typst-doc-cn/typst-doc-cn.github.io) and is translated into Japanese based on the official documentation of [Typst v0.12.0](https://typst.app/docs/changelog/#v0.12.0) as of October 2024.
The repository was forked from the [Chinese version](https://github.com/typst-doc-cn/typst-doc-cn.github.io) and is translated into Japanese based on the official documentation of [Typst v0.13.1](https://typst.app/docs/changelog/#v0.13.1) as of October 2024.

The actual working web version can be viewed at the following URL.
> https://typst-jp.github.io/docs/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

組版システム [Typst](https://typst.app/docs) の非公式な日本語ドキュメントです。[Typst GmbH](https://typst.app/legal/) の許諾を得て作成されています。

このリポジトリは[中国語版](https://github.com/typst-doc-cn/typst-doc-cn.github.io)からフォークして作成され、2024年10月時点での最新版である [Typst v0.12.0](https://typst.app/docs/changelog/#v0.12.0) の公式ドキュメントを元に日本語訳を行います。
このリポジトリは[中国語版](https://github.com/typst-doc-cn/typst-doc-cn.github.io)からフォークして作成され、2024年10月時点での最新版である [Typst v0.13.1](https://typst.app/docs/changelog/#v0.13.1) の公式ドキュメントを元に日本語訳を行います。

実際に作動している Web 版は、以下の URL から閲覧できます。
> https://typst-jp.github.io/docs/
Expand Down
57 changes: 31 additions & 26 deletions crates/typst-cli/src/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ impl Watcher {
let event = event
.map_err(|err| eco_format!("failed to watch dependencies ({err})"))?;

if !is_relevant_event_kind(&event.kind) {
continue;
}

// Workaround for notify-rs' implicit unwatch on remove/rename
// (triggered by some editors when saving files) with the
// inotify backend. By keeping track of the potentially
Expand All @@ -224,7 +228,17 @@ impl Watcher {
}
}

relevant |= self.is_event_relevant(&event);
// Don't recompile because the output file changed.
// FIXME: This doesn't work properly for multifile image export.
if event
.paths
.iter()
.all(|path| is_same_file(path, &self.output).unwrap_or(false))
{
continue;
}

relevant = true;
}

// If we found a relevant event or if any of the missing files now
Expand All @@ -234,32 +248,23 @@ impl Watcher {
}
}
}
}

/// Whether a watch event is relevant for compilation.
fn is_event_relevant(&self, event: &notify::Event) -> bool {
// Never recompile because the output file changed.
if event
.paths
.iter()
.all(|path| is_same_file(path, &self.output).unwrap_or(false))
{
return false;
}

match &event.kind {
notify::EventKind::Any => true,
notify::EventKind::Access(_) => false,
notify::EventKind::Create(_) => true,
notify::EventKind::Modify(kind) => match kind {
notify::event::ModifyKind::Any => true,
notify::event::ModifyKind::Data(_) => true,
notify::event::ModifyKind::Metadata(_) => false,
notify::event::ModifyKind::Name(_) => true,
notify::event::ModifyKind::Other => false,
},
notify::EventKind::Remove(_) => true,
notify::EventKind::Other => false,
}
/// Whether a kind of watch event is relevant for compilation.
fn is_relevant_event_kind(kind: &notify::EventKind) -> bool {
match kind {
notify::EventKind::Any => true,
notify::EventKind::Access(_) => false,
notify::EventKind::Create(_) => true,
notify::EventKind::Modify(kind) => match kind {
notify::event::ModifyKind::Any => true,
notify::event::ModifyKind::Data(_) => true,
notify::event::ModifyKind::Metadata(_) => false,
notify::event::ModifyKind::Name(_) => true,
notify::event::ModifyKind::Other => false,
},
notify::EventKind::Remove(_) => true,
notify::EventKind::Other => false,
}
}

Expand Down
8 changes: 4 additions & 4 deletions crates/typst-html/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ fn html_document_impl(
)?;

let output = handle_list(&mut engine, &mut locator, children.iter().copied())?;
let introspector = Introspector::html(&output);
let root = root_element(output, &info)?;
let introspector = Introspector::html(&root);

Ok(HtmlDocument { info, root, introspector })
}
Expand Down Expand Up @@ -307,18 +307,18 @@ fn head_element(info: &DocumentInfo) -> HtmlElement {

/// Determine which kind of output the user generated.
fn classify_output(mut output: Vec<HtmlNode>) -> SourceResult<OutputKind> {
let len = output.len();
let count = output.iter().filter(|node| !matches!(node, HtmlNode::Tag(_))).count();
for node in &mut output {
let HtmlNode::Element(elem) = node else { continue };
let tag = elem.tag;
let mut take = || std::mem::replace(elem, HtmlElement::new(tag::html));
match (tag, len) {
match (tag, count) {
(tag::html, 1) => return Ok(OutputKind::Html(take())),
(tag::body, 1) => return Ok(OutputKind::Body(take())),
(tag::html | tag::body, _) => bail!(
elem.span,
"`{}` element must be the only element in the document",
elem.tag
elem.tag,
),
_ => {}
}
Expand Down
1 change: 1 addition & 0 deletions crates/typst-layout/src/shapes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ impl<'a> CurveBuilder<'a> {
self.last_point = point;
self.last_control_from = point;
self.is_started = true;
self.is_empty = true;
}

/// Add a line segment.
Expand Down
2 changes: 1 addition & 1 deletion crates/typst-library/src/foundations/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ impl Array {
///
/// ```example
/// #let array = (1, 2, 3, 4, 5, 6, 7, 8)
/// #array.chunks(3)
/// #array.chunks(3) \
/// #array.chunks(3, exact: true)
/// ```
#[func]
Expand Down
6 changes: 3 additions & 3 deletions crates/typst-library/src/foundations/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ impl PartialEq for Func {
}
}

impl PartialEq<&NativeFuncData> for Func {
fn eq(&self, other: &&NativeFuncData) -> bool {
impl PartialEq<&'static NativeFuncData> for Func {
fn eq(&self, other: &&'static NativeFuncData) -> bool {
match &self.repr {
Repr::Native(native) => native.function == other.function,
Repr::Native(native) => *native == Static(*other),
_ => false,
}
}
Expand Down
Loading