|
85 | 85 |
|
86 | 86 | #level.advanced |
87 | 87 | #issue("typst#5908") |
| 88 | +#pull("typst#7399", rejected: true) |
88 | 89 |
|
89 | 90 | // Ref: https://www.w3.org/TR/clreq/#writing_modes_in_chinese_composition |
90 | 91 | #babel(en: [There are two writing modes in Chinese composition:], zh: [中文有两种行文模式:]) |
@@ -314,6 +315,47 @@ $ f(x) = y "(定义8)" $ |
314 | 315 | // This example would emit a warning: variable fonts are not currently supported and may render incorrectly. |
315 | 316 | // To avoid receiving the message repeatedly when running `pnpm dev`, we use `example-page` instead of `example`. |
316 | 317 |
|
| 318 | +=== #bbl( |
| 319 | + en: [Unable to infer the writing script across elements, making `locl` sometimes ineffective], |
| 320 | + zh: [无法跨越元素推断文字种类,导致`locl`特性有时失效], |
| 321 | +) |
| 322 | + |
| 323 | +#level.basic |
| 324 | +#issue("typst#7396") |
| 325 | + |
| 326 | +#babel( |
| 327 | + en: [ |
| 328 | + Typographical rules may have regional differences. For example, when writing Chinese horizontally, #unichar("。") is placed at the _lower left_ corner in the square space in Chinese Mainland, but placed at the _center_ in Taiwan and Hong Kong. |
| 329 | + Some fonts handle these differences with the #link("https://learn.microsoft.com/typography/opentype/spec/features_ko#tag-locl")[OpenType `locl` (Localized Forms) feature], which requires the text to be properly tagged with both the language system and the writing script. |
| 330 | + However, typst does not infer the script across elements, making `locl` sometimes ineffective. |
| 331 | + ], |
| 332 | + zh: [ |
| 333 | + 排版规则可能存在地区差异。例如横排中文时,中国大陆把 #unichar("。") 放在字面的左下角,而港台则放在中央。有些字体使用 #link("https://learn.microsoft.com/typography/opentype/spec/features_ko#tag-locl")[OpenType 特性`locl` (Localized Forms)] 处理这种差异,而这要求文本同时正确标注了语言和文字。然而,typst 不会跨元素推断文字种类,导致`locl`特性有时失效。 |
| 334 | + ], |
| 335 | +) |
| 336 | + |
| 337 | +#babel( |
| 338 | + en: [ |
| 339 | + In the example below, typst infers the script of the first `。` from its surrounding Han texts, and uses the correct localized glyph. However, typst fails to do so for the second `。`, whose both sides are `ref` elements, and uses the wrong default glyph. |
| 340 | + ], |
| 341 | + zh: [ |
| 342 | + 在下例中,typst 从相邻汉字推断出了第一个`。`的文字种类,选用了正确的本地化字形;可是未能应对夹在两个`ref`元素中间的第二个`。`,选用了错误的默认字形。 |
| 343 | + ], |
| 344 | +) |
| 345 | + |
| 346 | +```example-page |
| 347 | +#set text(lang: "zh", region: "TW", font: "Noto Serif CJK SC") |
| 348 | +#set heading(numbering: "1") |
| 349 | +<<< #hide[= 何故 <a>] |
| 350 | +>>> #place(hide[= 何故 <a>]) |
| 351 | +
|
| 352 | +>>> Current: \ |
| 353 | +句號。@a。@a |
| 354 | +
|
| 355 | +>>> Expected: \ |
| 356 | +>>> 句號。小節 1。小節 1 |
| 357 | +``` |
| 358 | + |
317 | 359 | == Context-based shaping and positioning |
318 | 360 |
|
319 | 361 | #prompt(from-w3c: "https://www.w3.org/TR/clreq-gap/#glyphs")[ |
@@ -679,7 +721,7 @@ $ f(x) = y "(定义8)" $ |
679 | 721 |
|
680 | 722 | #babel( |
681 | 723 | en: [According to #link("https://www.w3.org/TR/clreq/#prohibition_rules_for_line_start_end")[prohibition rules for line start and line end] (basic), #unichar("·") should not appear at the line start.], |
682 | | - zh: [按照#link("https://www.w3.org/TR/clreq/#prohibition_rules_for_line_start_end")[行首行尾禁则](基本处理),#unichar("·")不能出现在一行的开头。], |
| 724 | + zh: [按照#link("https://www.w3.org/TR/clreq/#prohibition_rules_for_line_start_end")[行首行尾禁则](基本处理),#unichar("·") 不能出现在一行的开头。], |
683 | 725 | ) |
684 | 726 |
|
685 | 727 | ```example |
@@ -892,10 +934,10 @@ $ f(x) = y "(定义8)" $ |
892 | 934 | 第二天我起得非常迟,午饭之后,出去看了朋友。 |
893 | 935 |
|
894 | 936 | // Expected to be possible: |
895 | | -<<<#set text(overhang: ("、": 1.0, ",": 1.0, "。": 1.0)) |
| 937 | +<<< #set text(overhang: ("、": 1.0, ",": 1.0, "。": 1.0)) |
896 | 938 | >>> = Expected |
897 | 939 | >>> #set par(justify: false) |
898 | | -<<<第二天我起得非常迟,午饭之后,出去看了朋友。 |
| 940 | +<<< 第二天我起得非常迟,午饭之后,出去看了朋友。 |
899 | 941 | >>> 第二天我起得非常迟,午饭之后,#h(-1em)出去看了朋友。 |
900 | 942 | ``` |
901 | 943 |
|
@@ -1130,8 +1172,8 @@ $ integral f dif x $ |
1130 | 1172 | >>> #set box(fill: aqua.lighten(50%)) |
1131 | 1173 | >>> Current: \ |
1132 | 1174 | >>> // Default: cap-height to baseline. |
1133 | | -<<<Typst 国王 \ |
1134 | | -<<<Typst 国王 |
| 1175 | +<<< Typst 国王 \ |
| 1176 | +<<< Typst 国王 |
1135 | 1177 | >>> #box[Typst 国王] \ |
1136 | 1178 | >>> #box[Typst 国王] |
1137 | 1179 |
|
@@ -1785,6 +1827,7 @@ $ integral f dif x $ |
1785 | 1827 | === #bbl(en: [Failed to load some CSL styles], zh: [无法加载某些 CSL 样式]) |
1786 | 1828 |
|
1787 | 1829 | #level.advanced |
| 1830 | +#issue("citationberg#35", closed: true) |
1788 | 1831 | #issue("hayagriva#405") |
1789 | 1832 | #workaround("https://typst-doc-cn.github.io/guide/FAQ/bib-csl.html") |
1790 | 1833 | #workaround("https://typst-doc-cn.github.io/csl-sanitizer/", note: "csl-sanitizer") |
@@ -1984,6 +2027,15 @@ $ integral f dif x $ |
1984 | 2027 |
|
1985 | 2028 | = #bbl(en: [Addendum], zh: [附录]) |
1986 | 2029 |
|
| 2030 | +== #bbl(en: [List of sites], zh: [站点列表]) |
| 2031 | + |
| 2032 | +- #bbl(en: [Main site], zh: [主站]) \ |
| 2033 | + #link("https://typst-doc-cn.github.io/clreq/")[typst-doc-cn.github.io/clreq] |
| 2034 | +- #bbl(en: [Mirror site], zh: [镜像站]) \ |
| 2035 | + #link("https://gap.zhtyp.art")[gap.zhtyp.art] |
| 2036 | +- #bbl(en: [Test site], zh: [测试站]) \ |
| 2037 | + #link("https://clreq-gap-typst.netlify.app")[clreq-gap-typst.netlify.app] |
| 2038 | + |
1987 | 2039 | == #bbl(en: [Environment of the examples], zh: [例子的环境信息]) |
1988 | 2040 |
|
1989 | 2041 | - #bbl(en: [Update date], zh: [更新日期]) \ |
|
0 commit comments