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
cjkChinese, Japanese, Korean typography.feature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.
I think the issue here differs from #311. If I'm understanding correctly, it's more that a bracket shouldn't disrupt the grid-like alignment of characters.
The key point of this issue is that the space between left edge of paragraph and “「” is effectively 1.5 em, not the 1 em specified by #set par(first-line-indent: 1em).
Note that JLREQ provides three possible options in that chapter, and Typst just behaves the same as option ③ optoin ① in Figure 71. So the current behavior is indeed conform to JLREQ. This issue should be a feature request rather than a bug report.
cc @Enivex maybe you want to change the issue tags and names.
Typst just behaves the same as option ③ in Figure 71.
No. Option 3 require the space between the left edge of the paragraph and “「” at the beginning of a paragraph to be 1/2 em, but the actual space is 3/2 em as I described first.
This is same as option 2 rather than option 3.
However, option 2 require the space between the left edge of the paragraph and “「” at the beginning of a line in the middle of a paragraph to be 1/2 em. But the actual space is 0 em.
This is same as option 1 or option 3.
No. Option 3 require the space between the left edge of the paragraph and “「” at the beginning of a paragraph to be 1/2 em, but the actual space is 3/2 em as I described first.
Sorry, I made a mistake. The problem you provide do exist. And I made another mistake in previous comment: Typst currently follows option ①, not ③.
And the bug is: CJK punctuation at the start of paragraphs are not adjusted sometimes, and it is tracked in #2348.
So your issue splits into two parts: the bug part is a duplication of #2348, and the feature request part is valid. But I suggest change the name the issue to something like "Options for Positioning of Opening Brackets".
The cause of #2348 seems to be that the space between the left edge of the paragraph and “「” at the beginning of a paragraph is used to adjust the line length.
But this issue is about the amount of the space before it is used for adjustment.
@peng1999
I think current behavior of typst does not satisfy any of option in Requirements for Japanese Text Layout.
Option 1 require the space between the left edge of the paragraph and “「” at the beginning of a paragraph to be 1 em, but the actual space is 3/2 em.
Here is table about amount of indentation.
paragraph starting with “「”
line starting with “「” and not beginning of paragraph
The cause of #2348 seems to be that the space between the left edge of the paragraph and “「” at the beginning of a paragraph is used to adjust the line length.
But this issue is about the amount of the space before it is used for adjustment.
Suppose we have first-line-indent set to 1em and the first character is 「. Currently in Typst it becomes: <1em fixed space> + <0.5em shrinkable space> + <half width 「>
In this issue: The problem is that when the shrinkable space presents, the space becomes 1.5em instead of 1em. The solution is to remove the shrinkable space.
In summary, the two issue is essentially the same and can be fixed by a single action: remove the shrinkable space.
cjkChinese, Japanese, Korean typography.feature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.
Activity
Leedehai commentedon Apr 26, 2024
https://typst.app/docs/reference/model/par/#parameters-first-line-indent mentioned "Only the first line of a consecutive paragraph will be indented (not the first one in a block or on the page)." -- a limitation, yes.. Typst wants to change that but it's not trivial.
laurmaedje commentedon Apr 29, 2024
I think the issue here differs from #311. If I'm understanding correctly, it's more that a bracket shouldn't disrupt the grid-like alignment of characters.
minamotorin commentedon May 6, 2024
The key point of this issue is that the space between left edge of paragraph and “「” is effectively 1.5 em, not the 1 em specified by
#set par(first-line-indent: 1em).peng1999 commentedon May 19, 2024
Note that JLREQ provides three possible options in that chapter, and Typst just behaves the same as
option ③optoin ① in Figure 71. So the current behavior is indeed conform to JLREQ. This issue should be a feature request rather than a bug report.cc @Enivex maybe you want to change the issue tags and names.
Edit: See below
minamotorin commentedon May 19, 2024
@peng1999
No. Option 3 require the space between the left edge of the paragraph and “「” at the beginning of a paragraph to be 1/2 em, but the actual space is 3/2 em as I described first.
This is same as option 2 rather than option 3.
However, option 2 require the space between the left edge of the paragraph and “「” at the beginning of a line in the middle of a paragraph to be 1/2 em. But the actual space is 0 em.
This is same as option 1 or option 3.
Of course, it is better the user can choose which option to use.
peng1999 commentedon May 19, 2024
Sorry, I made a mistake. The problem you provide do exist. And I made another mistake in previous comment: Typst currently follows option ①, not ③.
And the bug is: CJK punctuation at the start of paragraphs are not adjusted sometimes, and it is tracked in #2348.
So your issue splits into two parts: the bug part is a duplication of #2348, and the feature request part is valid. But I suggest change the name the issue to something like "Options for Positioning of Opening Brackets".
minamotorin commentedon May 19, 2024
@peng1999
I couldn't find #2348 in the past
and this issue is duplicate of it. Thanks!I close this because this is just duplicate of #2348 and I think that feature request should be discussed in separated new issue.minamotorin commentedon May 19, 2024
This is not duplicate of #2348.
The cause of #2348 seems to be that the space between the left edge of the paragraph and “「” at the beginning of a paragraph is used to adjust the line length.
But this issue is about the amount of the space before it is used for adjustment.
minamotorin commentedon May 19, 2024
@peng1999
I think current behavior of typst does not satisfy any of option in Requirements for Japanese Text Layout.
Option 1 require the space between the left edge of the paragraph and “「” at the beginning of a paragraph to be 1 em, but the actual space is 3/2 em.
Here is table about amount of indentation.
#set par(first-line-indent: 1em))But if this is the typst specification, this is definitely a feature request.
peng1999 commentedon May 19, 2024
Suppose we have
first-line-indentset to 1em and the first character is「. Currently in Typst it becomes: <1em fixed space> + <0.5em shrinkable space> + <half width「>「is not adjusted sometimes = the shrinkable space is wrongly present sometimes. The solution is to remove it.In summary, the two issue is essentially the same and can be fixed by a single action: remove the shrinkable space.
minamotorin commentedon May 19, 2024
I agree about the solution.
But I'll keep this issue open because #2348 can be fixed with a different solution, make the space unshrinkable.