Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruby block as one ruby element? #77

Open
himorin opened this issue Jan 3, 2022 · 9 comments
Open

ruby block as one ruby element? #77

himorin opened this issue Jan 3, 2022 · 9 comments

Comments

@himorin
Copy link
Contributor

himorin commented Jan 3, 2022

Current simple-ruby document uses a term ruby block as a basis of placement in inline direction, but no clear definition is provided on a relation to ruby element.
Reading current text, especially on jukugo ruby, a single block of ruby element is treated as a single ruby block, but we might be better to have a clear statement on a relationship between ruby block and ruby element. (e.g. continuous run of ruby elements with mono ruby, v.s., one ruby element with continuous run of mono ruby with rb/rt - as jukugo ruby)

@murata2makoto
Copy link

My two cents. I do not like the word "block" since it suggests block elements of HTML. But ruby elements are clearly in-line elements.

@xfq
Copy link
Member

xfq commented Jan 5, 2022

What does "ruby element" mean here? Do you mean the HTML <ruby> element?


Regarding the word "block", if it causes misunderstanding, what about changing it to "container" or "container box" as in CSS? See https://www.w3.org/TR/css-ruby-1/#ruby-container

@himorin
Copy link
Contributor Author

himorin commented Jan 5, 2022

notes for history and/or background

  • since laying ruby in two steps was introduced in simple-ruby, no such definition in JLReq (e.g. run of ruby text associated with each base character or group of ruby text and base characters)
  • currently (means before open PRs merged), only section 2.2 uses a term ruby block (= so, we can rephrase without using this term? - but I suppose we are better to have some terminology here as new two step handling)

@murata2makoto
Copy link

@xfq Yes, I mean the HTML ruby element, but I now think that a ruby block is not an HTML ruby element.

I now think that "ruby blocks" are created by laying out base-ruby pairs without considering preceding or following characters. When line break occurs within a single interlinear note, two "ruby blocks" are created from a single interlinear note. So, I now think that a ruby box is probably the right word.

@himorin
Copy link
Contributor Author

himorin commented Jan 5, 2022

The same for me, at HTML element.

Consider following examples (contains rt/rb):

  1. <ruby><rb>慶<rt>けい</ruby>
  2. <ruby><rb>慶應義塾<rt>けいおうぎじゅく</ruby>
  3. <ruby><rb>慶<rb>應<rb>義<rb>塾<rt>けい<rt>おう<rt>ぎ<rt>じゅく</ruby>
  4. <ruby><rb>慶<rt>けい</ruby><ruby><rb>應<rt>おう</ruby><ruby><rb>義<rt>ぎ</ruby><ruby><rb>塾<rt>じゅく</ruby>

1 is clearly mono-ruby, 2 should be group-ruby, 3 should be jukugo-ruby. How about 4?

@murata2makoto
Copy link

@himorin

<ruby><rb>慶<rb>應<rb>義<rb>塾<rt>けい<rt>おう<rt>ぎ<rt>じゅく</ruby>

This can be two ruby boxes if this ruby element does not fit in the current line.

@himorin
Copy link
Contributor Author

himorin commented Jan 6, 2022

<ruby><rb>慶<rb>應<rb>義<rb>塾<rt>けい<rt>おう<rt>ぎ<rt>じゅく</ruby>
This can be two ruby boxes if this ruby element does not fit in the current line.

Yes, and therefore this should be jukugo-ruby.

@murata2makoto
Copy link

I then propose to reformulate the current definition:

we refer to the ruby annotation and its base text, collectively, as the ruby block.

Here is my proposal.

A ruby box is a box created by formatting a ruby element in the first layer. More than one ruby box may be created from a single ruby element when line breaks occur.

(I am very against the word "step"!!!!)

Moreover,

In the first step, processing of layout only considers the relative positions of the ruby annotation and its base text

in 2.2 should be changed

@xfq
Copy link
Member

xfq commented Jan 7, 2022

A ruby box is a box created by formatting a ruby element in the first layer. More than one ruby box may be created from a single ruby element when line breaks occur.

If we're going to use the term "ruby element" (which is not currently in the simple-ruby document), I suggest we define it as well. From what I understand, simple-ruby is technology-agnostic, and in addition to HTML, the "ruby element" concept is also present in languages such as TTML and WebVTT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants