Skip to content

Incorrect Chinese punctuation placement when paragraph is justified #8557

Closed as not planned

Description

@GUTolution-company

Description

Steps to reproduce:

  1. Set paragraph to be justified
  2. Set font to be a suitable Chinese font like Noto Sans TC
  3. Write a paragraph with Chinese punctuations like ,。and、
  4. The punctuations are sometimes (but not always) placed to the right, which is incorrect
    • Instead they should always be placed at the centre between the previous word and the next

Example

#set par(justify: true)
#set text(font: "Noto Sans TC")

室几內急星月借室四問詞。姊童面錯陽,幾辛戊東行九害己百丁巴正子河士節四大,隻雲太呢雄住嗎息園。苦才登上太未哪朱陽戊禾向跳?完香公不合,連害親學時田吧夕足能記直消要。

Incorrect (Typst)

Image

Correct (Microsoft PowerPoint)

Image

Operating system

macOS

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Jun 24, 2026
  2. kyagrd commented on Jun 28, 2026

    @kyagrd

    FYI, this is language specific, not common to all CJK. So the issue should clarify the context of which language setting(s) this issue is relevent. More specifically whether this only applies to Chinese only, or both Chinese and Japanese.

    But this clearly does not apply to modern Korean punctuation. Modern Korean punctuation closely mirrors Western convention, so commas should not appear in the middle like that. Nor does Korean punctuation use white circles instead of period.

    The only case such punctuation might apply to Korean setting is when mimicking ancient vertical writing layout, for reproducing historical documents in the original layout in the digital typography. It should never apply to modern Korean horizontal left to right layout.

  3. changed the title [-]Incorrect CJK punctuation placement when paragraph is justified[/-] [+]Incorrect Chinese punctuation placement when paragraph is justified[/+] on Jun 29, 2026
  4. added
    text
    cjk
    on Jun 29, 2026
  5. YDX-2147483647 commented on Jul 1, 2026

    @YDX-2147483647
    Contributor

    Well, the problem is that you have to #set text(lang: "zh", region: "HK") (or TW). This enables the adjustment algorithm for Traditional Chinese. (It also enables many more localization features. For example, the default title of #bibliography().)

    Image
    Code
    #set par(justify: true)
    #set text(font: "Noto Sans CJK TC")
    
    = Default (en)
    室几內急星月借室四問詞。姊童面錯陽,幾辛戊東行九害己百丁巴正子河士節四大,隻雲太呢雄住嗎息園。苦才登上太未哪朱陽戊禾向跳?完香公不合,連害親學時田吧夕足能記直消要。
    
    = Set to zh-HK
    #set text(lang: "zh", region: "HK")
    室几內急星月借室四問詞。姊童面錯陽,幾辛戊東行九害己百丁巴正子河士節四大,隻雲太呢雄住嗎息園。苦才登上太未哪朱陽戊禾向跳?完香公不合,連害親學時田吧夕足能記直消要。

    There're still space to improve the treatment for centered punctuation marks (e.g., #8390), but I think this issue can be closed. If you find any further specific problems, you can always open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcjktext

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions