Fix auto hanging-indent for 一、 heading numbering#7247
Fix auto hanging-indent for 一、 heading numbering#7247YDX-2147483647 wants to merge 10 commits intotypst:mainfrom
一、 heading numbering#7247Conversation
一、 numbering一、 heading numbering
6399109 to
f52f91d
Compare
|
What's the state of this PR? |
|
It fixes the original issue, but does not work well with Also the implementation depends on quirks of I guess there exists a better fix, so I've marked it as a draft. |
|
I think the supposed quirk of measure is rather a quirk of either horizontal spacing or CJ punctuation adjustment. From a Western perspective, the patch here seems unproblematic, but if it doesn't really solve the problem for CJ users, that's unfortunate. I can't properly judge it, but from gut feeling perhaps the CJ punctuation adjustment is the root cause and needs change? I'd overall like to see the CJK handling in inline layout reworked as it has various subtle issues and is not that cleanly implemented. |
|
I haven't carefully inspected how the CJ punctuation adjustment is implemented; but based on what DeepWiki told me, I think it looks logical. It's just that the punctuation adjustment doesn't rhyme with higher-level adjustment (e.g., justification). Higher-level adjustment is irrelevant in this case, because the issue occurs even if justification is disabled and linebreaks are controlled manually. I believe the root cause lies in this comment: typst/crates/typst-layout/src/rules.rs Lines 267 to 268 in bf94617
|
Not ready for review yet.
Resolves #6527
See Typographic measure theory (or the backup on the forum) for more testing.
Discord, 2025-10-30: