From b6638975081a27a94f10d7853139d4a999d48ae4 Mon Sep 17 00:00:00 2001 From: KaiserY Date: Mon, 8 Jan 2024 23:33:11 +0800 Subject: [PATCH] update mdbook-typst-pdf to 0.2.1 --- .github/workflows/main.yml | 2 +- README.md | 3 ++- book.toml | 1 + src/ch03-00-common-programming-concepts.md | 2 +- src/ch03-02-data-types.md | 2 +- src/ch04-01-what-is-ownership.md | 2 +- src/ch05-02-example-structs.md | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 044a305..0b9431f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: echo "$(pwd)/bin" >> ${GITHUB_PATH} - name: Install mdbook-typst-pdf run: | - curl -sL -o bin/mdbook-typst-pdf https://github.com/KaiserY/mdbook-typst-pdf/releases/download/0.1.2/mdbook-typst-pdf-x86_64-unknown-linux-gnu + curl -sL -o bin/mdbook-typst-pdf https://github.com/KaiserY/mdbook-typst-pdf/releases/download/0.2.1/mdbook-typst-pdf-x86_64-unknown-linux-gnu chmod +x bin/mdbook-typst-pdf echo "$(pwd)/bin" >> ${GITHUB_PATH} - name: Install font diff --git a/README.md b/README.md index 9e135bd..23ec68b 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,8 @@ simple-http-server .\book\html\ -i [Rust 程序设计语言 简体中文版.pdf](https://kaisery.github.io/trpl-zh-cn/Rust%20%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1%E8%AF%AD%E8%A8%80%20%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%E7%89%88.pdf) -- emoji 无法显示 +- 由 [mdbook-typst-pdf](https://github.com/KaiserY/mdbook-typst-pdf) 生成,有任何问题欢迎 issue 或 PR +- 引用非章节标题的 link 会定位到章节标题 - ferris 无法显示 ## GitBook diff --git a/book.toml b/book.toml index 626a10c..d48d383 100644 --- a/book.toml +++ b/book.toml @@ -12,3 +12,4 @@ edit-url-template = "https://github.com/KaiserY/trpl-zh-cn/edit/main/{path}" [output.typst-pdf] pdf = true +section-number = true \ No newline at end of file diff --git a/src/ch03-00-common-programming-concepts.md b/src/ch03-00-common-programming-concepts.md index cfd3a4d..cb01517 100644 --- a/src/ch03-00-common-programming-concepts.md +++ b/src/ch03-00-common-programming-concepts.md @@ -11,4 +11,4 @@ > ## 关键字 > Rust 语言有一组保留的 **关键字**(*keywords*),就像大部分语言一样,它们只能由语言本身使用。记住,你不能使用这些关键字作为变量或函数的名称。大部分关键字有特殊的意义,你将在 Rust 程序中使用它们完成各种任务;一些关键字目前没有相应的功能,是为将来可能添加的功能保留的。可以在[附录 A][appendix_a] 中找到关键字的列表。 -[appendix_a]: appendix-01-keywords.md +[appendix_a]: appendix-01-keywords.html diff --git a/src/ch03-02-data-types.md b/src/ch03-02-data-types.md index f43ab81..744be53 100644 --- a/src/ch03-02-data-types.md +++ b/src/ch03-02-data-types.md @@ -238,4 +238,4 @@ ch02-00-guessing-game-tutorial.html#comparing-the-guess-to-the-secret-number [vectors]: ch08-01-vectors.html [unrecoverable-errors-with-panic]: ch09-01-unrecoverable-errors-with-panic.html [wrapping]: https://doc.rust-lang.org/std/num/struct.Wrapping.html -[appendix_b]: appendix-02-operators.md +[appendix_b]: appendix-02-operators.html diff --git a/src/ch04-01-what-is-ownership.md b/src/ch04-01-what-is-ownership.md index 0c85972..d302ec9 100644 --- a/src/ch04-01-what-is-ownership.md +++ b/src/ch04-01-what-is-ownership.md @@ -269,7 +269,7 @@ Rust 不允许自身或其任何部分实现了 `Drop` trait 的类型使用 `Co [data-types]: ch03-02-data-types.html#数据类型 [ch8]: ch08-02-strings.html -[ch10]: ch10-00-generics.md +[ch10]: ch10-00-generics.html [derivable-traits]: appendix-03-derivable-traits.html [method-syntax]: ch05-03-method-syntax.html#方法语法 [paths-module-tree]: ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html diff --git a/src/ch05-02-example-structs.md b/src/ch05-02-example-structs.md index 316e5f7..faffa7f 100644 --- a/src/ch05-02-example-structs.md +++ b/src/ch05-02-example-structs.md @@ -151,7 +151,7 @@ Rust **确实** 包含了打印出调试信息的功能,不过我们必须为 我们的 `area` 函数是非常特殊的,它只计算长方形的面积。如果这个行为与 `Rectangle` 结构体再结合得更紧密一些就更好了,因为它不能用于其他类型。现在让我们看看如何继续重构这些代码,来将 `area` 函数协调进 `Rectangle` 类型定义的 `area` **方法** 中。 [the-tuple-type]: ch03-02-data-types.html#元组类型 -[app-c]: appendix-03-derivable-traits.md +[app-c]: appendix-03-derivable-traits.html [println]: https://doc.rust-lang.org/std/macro.println.html [dbg]: https://doc.rust-lang.org/std/macro.dbg.html [err]: ch12-06-writing-to-stderr-instead-of-stdout.html