Skip to content

Commit 265ed8f

Browse files
Merge pull request typst-doc-cn#64 from YDX-2147483647/cron
docs: Regular minor updates
2 parents af07816 + 776a8ac commit 265ed8f

File tree

2 files changed

+79
-12
lines changed

2 files changed

+79
-12
lines changed

main.typ

Lines changed: 77 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
],
4949
)
5050

51+
= #bbl(en: [Summary], zh: [概要])
52+
53+
#import "typ/respec.typ": summary
54+
#summary
55+
5156
#outline()
5257

5358
#set heading(numbering: "1.1")
@@ -162,7 +167,7 @@
162167
Moreover, there is no warning or hint.
163168
],
164169
zh: [
165-
typst的正文默认字体不含汉字。因此本地编译时,若不用`#set text(font: …)`配置字体就写中文,回落结果可能混合不同风格的字体(如 @fig-font-fallback-messy),难以阅读,且无任何警告或提示。
170+
typst 的正文默认字体不含汉字。因此本地编译时,若不用`#set text(font: …)`配置字体就写中文,回落结果可能混合不同风格的字体(如 @fig-font-fallback-messy),难以阅读,且无任何警告或提示。
166171
],
167172
)
168173

@@ -185,7 +190,7 @@
185190
Currently, this setting takes precedence over the main text font you specified, forcing you to re-declare the Chinese font by `#show raw: set text(font: …)`.
186191
],
187192
zh: [
188-
在正文之外,typst对`raw`代码块预设了另一字体,同样不含汉字。该设置目前优先于你指定的正文字体,导致必须用`#show raw: set text(font: …)`再次指定中文字体。
193+
在正文之外,typst 对`raw`代码块预设了另一字体,同样不含汉字。该设置目前优先于你指定的正文字体,导致必须用`#show raw: set text(font: …)`再次指定中文字体。
189194
],
190195
)
191196

@@ -378,7 +383,10 @@ $ f(x) = y "(定义8)" $
378383
== #bbl(en: [Characters & encoding], zh: [字符与编码])
379384

380385
#prompt(from-w3c: "https://www.w3.org/TR/clreq-gap/#encoding")[
381-
Most languages are now supported by Unicode, but there are still occasional issues. In particular, there may be issues related to ordering of characters, or competing encodings (as in Myanmar), or standardisation of variation selectors or the encoding model (as in Mongolian). Are there any character repertoire issues preventing use of this script in typst? Do variation selectors need attention? Are there any other encoding-related issues?
386+
#babel(
387+
en: [Most languages are now supported by Unicode, but there are still occasional issues. In particular, there may be issues related to ordering of characters, or competing encodings (as in Myanmar), or standardisation of variation selectors or the encoding model (as in Mongolian). Are there any character repertoire issues preventing use of this script in typst? Do variation selectors need attention? Are there any other encoding-related issues?],
388+
zh: [Unicode 已支持大部分语言,但仍有零星问题。特别是在字符排序、编码竞争(如缅甸文)、变体选择器及编码模型标准化(如蒙文)等方面。这种文字是否因字符集支持问题而难以使用 typst?变体选择器需要特别关注吗?还有其他编码相关的问题吗?],
389+
)
382390
]
383391

384392
=== #bbl(en: [Ideographic variation sequence disappears at end of line], zh: [行末的表意文字异体字序列无效])
@@ -600,7 +608,11 @@ $ f(x) = y "(定义8)" $
600608
== #bbl(en: [Data formats & numbers], zh: [数据格式与数字])
601609

602610
#prompt(from-w3c: "https://www.w3.org/TR/clreq-gap/#data_formats")[
603-
Relevant here are formats related to number, currency, dates, personal names, addresses, and so forth. If the script has its own set of number digits, are there any issues in how they are used? Does the script or language use special format patterns that are problematic (eg. 12,34,000 in India)? What about date/time formats and selection - and are non-Gregorian calendars needed? Do percent signs and other symbols associated with number work correctly, and do numbers need special decorations, (like in Ethiopic or Syriac)? How about the management of personal names, addresses, etc. in typst: are there issues?
611+
#babel(
612+
en: [
613+
Relevant here are formats related to number, currency, dates, personal names, addresses, and so forth. If the script has its own set of number digits, are there any issues in how they are used? Does the script or language use special format patterns that are problematic (eg. 12,34,000 in India)? What about date/time formats and selection - and are non-Gregorian calendars needed? Do percent signs and other symbols associated with number work correctly, and do numbers need special decorations, (like in Ethiopic or Syriac)? How about the management of personal names, addresses, etc. in typst: are there issues?],
614+
zh: [本节讨论数字、货币、日期、人名、地址等的格式。这种文字如果自有一套数码,使用是否有问题?这种文字或语言如果会用特殊模式的格式(例如印度的 12,34,000),它是否还有问题?是否会用公历以外的历法,时间及日期的格式和选择方式又如何?百分号等与数字一同使用的符号是否正常?数字是否需要特别装饰(如埃塞俄比亚文、叙利亚文)?在管理人名、地址等方面,typst 是否还有问题?],
615+
)
604616
]
605617

606618
=== #bbl(en: [Numbers in Simplified Chinese], zh: [简体中文数字])
@@ -1093,7 +1105,7 @@ $ integral f dif x $
10931105
Does typst support requirements for baseline alignment between mixed scripts and in general? Are there issues related to line height or inter-line spacing, etc.? Are the requirements for baseline or line height in vertical text covered?
10941106
],
10951107
zh: [
1096-
typst能否对齐多文种的基线?行高、行距等方面有无问题?直排时的基线、行高能否满足要求?
1108+
typst 能否对齐多文种的基线?行高、行距等方面有无问题?直排时的基线、行高能否满足要求?
10971109
],
10981110
)
10991111
]
@@ -1129,6 +1141,35 @@ $ integral f dif x $
11291141
>>> #box[Typst 国王]
11301142
```
11311143

1144+
=== #bbl(
1145+
en: [`box` is not aligned if `text.bottom-edge` is not baseline],
1146+
zh: [`text.bottom-edge`不是基线时,`box`未对齐],
1147+
)
1148+
1149+
#level.advanced
1150+
#issue("tianyi-smile/itemize#8")
1151+
1152+
#babel(en: [This issue continues the above issue.], zh: [这一问题接续上一问题。])
1153+
1154+
#babel(
1155+
en: [At present, #link("https://typst.app/docs/reference/layout/box/", `box`) is always put on the baseline, even if `text.bottom-edge` is not `"baseline"`, leading to misalignment.],
1156+
zh: [目前即使`text.bottom-edge`不是`"baseline"`#link("https://typst.app/docs/reference/layout/box/", `box`)也总是放到基线上,导致对不齐。],
1157+
)
1158+
1159+
```example
1160+
>>> Current: \
1161+
#set text(bottom-edge: "descender")
1162+
淇水#box[汤]汤
1163+
1164+
>>> Expected: \
1165+
>>> 淇水#box[#set text(bottom-edge: "baseline");汤]汤
1166+
```
1167+
1168+
#babel(
1169+
en: [This affects Chinese particularly. All Chinese characters have a square-shaped frame, so the natural definition of bottom edge is the bottom edge of the squares, and most Chinese fonts will mark it as the descender line. As a result, some people prefer `bottom-edge: "descender"` to the default `bottom-edge: "baseline"` for their Chinese documents.],
1170+
zh: [中文特别受此影响。汉字都是方块字,所以底线的自然定义就是方块的底边,而中文字体大多将它标成下降部的边缘线。因此,有些人会选择将中文文档从默认的`bottom-edge: "baseline"`改为`bottom-edge: "descender"`。],
1171+
)
1172+
11321173
== #bbl(en: [Lists, counters, etc.], zh: [列表、编号等])
11331174

11341175
#prompt(from-w3c: "https://www.w3.org/TR/clreq-gap/#lists")[
@@ -1744,13 +1785,20 @@ $ integral f dif x $
17441785
=== #bbl(en: [Failed to load some CSL styles], zh: [无法加载某些 CSL 样式])
17451786

17461787
#level.advanced
1788+
#issue("hayagriva#405")
17471789
#workaround("https://typst-doc-cn.github.io/guide/FAQ/bib-csl.html")
1790+
#workaround("https://typst-doc-cn.github.io/csl-sanitizer/", note: "csl-sanitizer")
17481791

17491792
#babel(
17501793
en: [The compiler does not support the CSL-M standard yet, nor is it compatible with some extensions of citeproc-js.],
17511794
zh: [编译器暂不支持 CSL-M 标准,也不兼容 citeproc-js 的一些扩展。],
17521795
)
17531796

1797+
#babel(
1798+
en: [As of October 2025, 222 of 302 (74%) #link("https://zotero-chinese.com/styles/")[Chinese CSL styles] are considered malformed by hayagriva. Unfortunately, hayagriva hardly provides clear error messages, making it very difficult to debug.],
1799+
zh: [截至2025年十月,302个#link("https://zotero-chinese.com/styles/")[中文 CSL 样式]中的222个(74%)都会被 hayagriva 判为 malformed。而且很不幸,hayagriva 提供的错误信息一般并不清晰,导致调试异常困难。],
1800+
)
1801+
17541802
= #bbl(en: [Other], zh: [杂项])
17551803

17561804
== #bbl(en: [Culture-specific features], zh: [文化独有特性])
@@ -1857,6 +1905,20 @@ $ integral f dif x $
18571905
zh: [尚无任何相关措施,无论报错发自核心编译器还是第三方包。],
18581906
)
18591907

1908+
=== #bbl(en: [A Chinese name for the Typst project], zh: [Typst 项目的中文名])
1909+
1910+
#level.advanced
1911+
1912+
#babel(
1913+
en: [The Typst project does not have an official Chinese name, which prevents its mention in certain academic or teaching scenarios where mixing languages is discouraged. In addition, the Chinese language does not have consonants like -pst, so it is difficult to pronounce _Typst_. Therefore, some people suggested that there should be a Chinese name.],
1914+
zh: [Typst 项目没有官方中文名,而特定学术或教学场合限制混合语言,导致无法提及。此外汉语没有 -pst 这样的辅音,导致“Typst”一词发音困难。因此,有人认为应该有个中文名。],
1915+
)
1916+
1917+
#babel(
1918+
en: [However, there are more reasons not to localize the name _Typst_. #link("https://forum.typst.app/t/chinese-name-for-the-typst-project/6024/13")[A naive vote in September 2025] indicated that the vast majority of people believed that there is no need for localization at present: just use _Typst_.],
1919+
zh: [然而还有更多理由不翻译“Typst”。#link("https://forum.typst.app/t/chinese-name-for-the-typst-project/6024/13")[2025年9月的简单投票]表明,绝大多数人认为目前没有必要翻译:直接称“Typst”即可。],
1920+
)
1921+
18601922
=== #bbl(en: [Web app issues], zh: [在线应用的问题])
18611923

18621924
#level.advanced
@@ -1900,10 +1962,17 @@ $ integral f dif x $
19001962
- #issue("webapp-issues#675")
19011963

19021964
#bbl(
1903-
en: [Spell checker does not respect `text.lang` if the `*.typ` is not included in `main.typ`],
1965+
en: [Spell checker does not respect `text.lang` if the `*.typ` is not included in `main.typ`],
19041966
zh: [若`*.typ`未被`main.typ`导入,则拼写检查器会忽略`text.lang`],
19051967
)
19061968

1969+
- #issue("webapp-issues#733")
1970+
1971+
#bbl(
1972+
en: [Spell checker does not respect `text.lang` set by regex show rules],
1973+
zh: [用 show regex 规则设置的`text.lang`会被拼写检查器忽略],
1974+
)
1975+
19071976
- #issue("typst#5436")
19081977

19091978
#bbl(
@@ -1915,11 +1984,6 @@ $ integral f dif x $
19151984

19161985
= #bbl(en: [Addendum], zh: [附录])
19171986

1918-
== #bbl(en: [Summary], zh: [概要])
1919-
1920-
#import "typ/respec.typ": summary
1921-
#summary
1922-
19231987
== #bbl(en: [Environment of the examples], zh: [例子的环境信息])
19241988

19251989
- #bbl(en: [Update date], zh: [更新日期]) \
@@ -1962,7 +2026,8 @@ $ integral f dif x $
19622026

19632027
- #bbl(en: [Reference implementations], zh: [参考实现])
19642028

1965-
- #link("https://ctan.org/pkg/biblatex-gb7714-2015")[`biblatex-gb7714-2015`], #bbl(zh: [符合 GB/T 7714—2015 标准的 biblatex 参考文献样式], en: [A BibLaTeX implementation of the GB/T 7714—2015 bibliography style for Chinese users]) (#link("https://texdoc.org/serve/biblatex-gb7714-2015/0")[TeXdoc PDF])
2029+
- #link("https://ctan.org/pkg/biblatex-gb7714-2015")[`biblatex-gb7714-2015`], #bbl(zh: [符合 GB/T 7714—2015 标准的 biblatex 参考文献样式], en: [A BibLaTeX implementation of the GB/T 7714—2015 bibliography style for Chinese users]) (#link("https://texdoc.org/serve/biblatex-gb7714-2015/0")[TeXdoc PDF], #link("https://github.com/hushidong/biblatex-gb7714-2015")[GitHub])
2030+
- #link("https://ctan.org/pkg/gbt7714")[`gbt7714`], GB/T 7714 BibTeX style (#link("https://texdoc.org/serve/gbt7714/0")[TeXdoc PDF], #link("https://github.com/zepinglee/gbt7714-bibtex-style")[GitHub])
19662031

19672032
== #bbl(en: [To be done], zh: [待办])
19682033

typ/util.typ

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
#let workaround(dest, note: none) = {
8585
let human-dest = if dest.starts-with("https://typst.app/universe/package/") {
8686
"universe/" + dest.trim("https://typst.app/universe/package/", at: start)
87+
} else if dest.starts-with("https://typst-doc-cn.github.io/guide/FAQ/") {
88+
"Chinese FAQ"
8789
} else {
8890
dest.trim("https://", at: start).split(".").at(0).trim("typst-", at: start)
8991
}

0 commit comments

Comments
 (0)