Skip to content

Option to have raw, unchanged, surpriseless, uniform CJK full-width punctuation width #7643

@neruthes

Description

@neruthes

Description

What I want

A beautiful, predictable, uniform matrix of glyphs with one single, static, constant width.

Image

When using xeCJK, all the requirement is a simple line:

\xeCJKsetup{PunctStyle=plain,RubberPunctSkip=false}

Current behavior

Chaotic width squeezing rules full of surprises.

Image

Proposed API

#set text(cjk-punct-width: auto | "raw")

When set to auto, which is the default value, use the current behavior. When set to "raw", use the raw, unchanged, surpriseless, uniform width.

This option should not affect how the width of sequence —— is determined, whose glyph might from a ligature of the current font.

Workaround

#show regex("[,。、]"): it => box(width: 1em, align(left, it))
#show regex("[!?;:()【】「」『』❲❳[]]"): it => box(width: 1em, align(center, it))

Mostly usable; might need further tweaking.

Use Case

Anyone migrating from XeLaTeX + xeCJK workflow will need this feature to have a fully comparable CJK environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cjkChinese, Japanese, Korean typography.feature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions