|
677 | 677 | ``` |
678 | 678 |
|
679 | 679 | ```example-page |
680 | | ->>> // This example behaves differently in `example` and `example-page`. |
| 680 | +>>> // This example behaves differently in `example` and `example-page` because of cjk-latin-spacing. |
681 | 681 | >>> #set text(top-edge: "ascender", bottom-edge: "descender") |
682 | 682 | >>> Current: |
683 | 683 | #set par(justify: true) |
@@ -816,6 +816,25 @@ $ integral f dif x $ |
816 | 816 | >>> 汉字#h(0.25em)$A$#h(0.25em)汉字 |
817 | 817 | ``` |
818 | 818 |
|
| 819 | +=== #bbl(en: [Redundant CJK-Latin space at manual line breaks], zh: [人为换行时多余中西间距]) |
| 820 | + |
| 821 | +#level.advanced |
| 822 | +#issue("typst#6539") |
| 823 | + |
| 824 | +#babel( |
| 825 | + en: [If the line is manually broken between a CJK and a Latin character, then typst will insert an extra CJK-Latin space. This space becomes noticeable when text is aligned to the right or center.], |
| 826 | + zh: [若在汉字和拉丁字母间手动换行,typst 会插入多余中西间距。如果文本右对齐或居中对齐,这个间距会显现出来。], |
| 827 | +) |
| 828 | + |
| 829 | +```example |
| 830 | +>>> Current: \ |
| 831 | +#set text(cjk-latin-spacing: auto) |
| 832 | +#box(width: 3em, stroke: (right: green), align(right, [国国\ TT])) |
| 833 | +
|
| 834 | +>>> Expected: \ |
| 835 | +>>> #box(width: 3em, stroke: (right: green), align(right, [国国TT])) |
| 836 | +``` |
| 837 | + |
819 | 838 | === #bbl(en: [Punctuation compression is interrupted by `#show`], zh: [`#show`会打断标点挤压]) |
820 | 839 |
|
821 | 840 | #level.basic |
@@ -957,6 +976,31 @@ $ integral f dif x $ |
957 | 976 | >>> = 一、标题 |
958 | 977 | ``` |
959 | 978 |
|
| 979 | +=== #bbl(en: [The auto hanging indents of multiline headings are inaccurate], zh: [多行标题的自动悬挂缩进不准确]) |
| 980 | + |
| 981 | +#level.advanced |
| 982 | +#issue("typst#6527") |
| 983 | +#workaround("https://github.com/typst/typst/issues/6527#issuecomment-3026200835") |
| 984 | + |
| 985 | +#babel( |
| 986 | + en: [The default value of `heading.hanging-indent` is `auto`, which indicates that the subsequent heading lines will be indented based on the width of the numbering. However, the `auto` width is not accurate if the numbering ends with a full-width punctuation, e.g., #unichar("、").], |
| 987 | + zh: [`heading.hanging-indent`默认为`auto`,表示标题从第二行起按编号的宽度缩进。然而若编号以全宽标点结尾,例如 #unichar("、"),那么`auto`得出的宽度并不准确。], |
| 988 | +) |
| 989 | + |
| 990 | +```example-page |
| 991 | +#set page(width: 5 * 12pt + 2 * 1em, margin: 1em) |
| 992 | +#show heading: set text(12pt) |
| 993 | +
|
| 994 | +>>> #show heading: pad.with(top: -0.75em) |
| 995 | +>>> Current: |
| 996 | +#set heading(numbering: "一、") |
| 997 | += 寻寻觅觅 |
| 998 | +
|
| 999 | +>>> Expected: |
| 1000 | +>>> #set heading(numbering: none, hanging-indent: 2em) |
| 1001 | +>>> = 一、寻寻觅觅 |
| 1002 | +``` |
| 1003 | + |
960 | 1004 | == Styling initials <initials> |
961 | 1005 |
|
962 | 1006 | #prompt(from-w3c: "https://www.w3.org/TR/clreq-gap/#initials")[ |
@@ -1232,7 +1276,7 @@ $ integral f dif x $ |
1232 | 1276 |
|
1233 | 1277 | ````example-page |
1234 | 1278 | >>> Expected: \ |
1235 | | -<<< 孔乙己@key,另见文献~#parencite(<key>)。 |
| 1279 | +<<< 孔乙己@key,另见#cite(<key>, form: "prose-short")。 |
1236 | 1280 | >>> 孔乙己#super[[1]],另见文献#h(0.25em)#[[1]]。 |
1237 | 1281 | ```` |
1238 | 1282 |
|
|
0 commit comments