You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CJK punctuation at the start of paragraphs are not adjusted sometimes #2348
For the case of first-line indent, if an opening bracket is set at the beginning of the first line of the paragraph, half a character space can be trimmed before the bracket.
It seems that clrep doesn't specify the adjustment amount of punctuations appears at the beginning of the line
As I understand it, the adjustment described in section 3.1.6.2 and 3.1.6.3 do not contribute to "line adjustment" described in Section 3.5 Line Adjustment of CLREQ. The former adjustments can be thought as "default adjustments" and should always take place. But in typst, when I implement this feature, the two default adjustment is being implemented as part of general line adjustment and becoming optional depending on the line length. I think this is wrong.
CLREQ section 3.1.6.3 mentioned "can be trimmed". I think it has an all-or-nothing meaning. Maybe we can provide an option in typst.
After all, I think this issue is not hard to fix. I encourage anyone who interested in it to make a PR.
Reacted by Balthild, Zhan Rongrui and Kevin Stephen
Activity
Enter-tainer commentedon Oct 10, 2023
I guess this is expected and comes from the adjustability of these punctuations. Per clreq: https://www.w3.org/TR/clreq/#h-compression_of_punctuation_marks_at_line_start
cc @peng1999
Enter-tainer commentedon Oct 10, 2023
The unaligned behavior is indeed weird given that
justify: truehas been specified.It seems that clrep doesn't specify the adjustment amount of punctuations appears at the beginning of the line https://www.w3.org/TR/clreq/#procedures_for_inter-character_spacing_reduction
peng1999 commentedon Oct 10, 2023
@balthild
This is likely a bug. See below.
@Enter-tainer
As I understand it, the adjustment described in section 3.1.6.2 and 3.1.6.3 do not contribute to "line adjustment" described in Section 3.5 Line Adjustment of CLREQ. The former adjustments can be thought as "default adjustments" and should always take place. But in typst, when I implement this feature, the two default adjustment is being implemented as part of general line adjustment and becoming optional depending on the line length. I think this is wrong.
CLREQ section 3.1.6.3 mentioned "can be trimmed". I think it has an all-or-nothing meaning. Maybe we can provide an option in typst.
After all, I think this issue is not hard to fix. I encourage anyone who interested in it to make a PR.
PgBiel commentedon Apr 1, 2024
Does #3744 fix this?
balthild commentedon Apr 1, 2024
No, but the result has changed a little.
Tested with the current main branch (1e645b3).
peng1999 commentedon Apr 2, 2024
This problem now solves for paragraph with no indentation, but still exists otherwise.
test: Add test for typst#2348
test: Add test for typst#2348
test: Add test for typst#2348