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

How to encode emphasis markers interspersed with gloss #1

Open
knagasaki opened this issue Jan 29, 2021 · 9 comments
Open

How to encode emphasis markers interspersed with gloss #1

knagasaki opened this issue Jan 29, 2021 · 9 comments

Comments

@knagasaki
Copy link
Contributor

knagasaki commented Jan 29, 2021

from: martindholmes/rubyForTEI#10 (comment)

I tried to make an example of a markup using <note> with emphasis markers under <sourceDoc>. Given that encoders can not determine the meaning of the markers, I suggest to use <hi>, if it will be independently encoded. As the targeted text of <note> is indicated as pseudo-standoff, the <hi> for the emphasis markers can be embedded easily. The URIs of the image are inserted compliant with IIIF. It is just an attempt. I hope your comment about not only usage of tags but also entire strategy of encoding.

https://ids.lib.harvard.edu/ids/iiif/26478854/full/1800,/0/default.jpg

   <sourceDoc source="https://iiif.lib.harvard.edu/manifests/drs:26478660">
      <surface
         source="https://iiif.lib.harvard.edu/manifests/drs:26478660/canvas/canvas-26478854.json"
         facs="https://ids.lib.harvard.edu/ids/iiif/26478854/full/1800,/0/default.jpg">
         <line>
            <hi style="white-circle-right">而較之可手遂<note place="right"
               targetEnd="#note0001e">原評󠄁令有以自容</note>命𥁞絶其纓</hi>
            <hi style="sesame-right">尋</hi><anchor type="noteEnd" xml:id="note0001e"/>荘王與𣈆<hi
               style="sesame-right">戰</hi>一人 </line>
      </surface>
   </sourceDoc>
@duncdrum duncdrum changed the title How to encode emphasis markers How to encode emphasis markers interspersed with gloss Feb 2, 2021
@duncdrum
Copy link
Collaborator

duncdrum commented Feb 2, 2021

here was my encoding from the other repo

<pb n='' facs="Images/26478854.jpg"/>
<line style='writing-mode: vertical-rl'>
  <ab rend='' style='text-emphasis-style: open'>
    而較之可乎遂
     <r:ruby>
       <r:rb rend='' style='text-emphasis-style: open'>命書絶其纓</r:rb>
       <r:rt>原<g>⿰言仐</g>令有以自</r:rt>
    </r:ruby>
  </ab>
          <!-- I m not to happy about having to split here, but i don't see another option. 
    this is where overlap problem will occur if i want to mark the semantic unit of the text across 自容 or 纓尋 boundaries
    -->
  <ab>
     <r:ruby>
       <r:rb>尋</r:rb>
       <r:rt>容</r:rt>
     </r:ruby>
    荘王與𣈆
  </ab>
</line>

still seems more concise, ideally we could avoid repeating @rend and @style on rb but for that we would need inheritance rules, that include rb but exclude rt

@knagasaki
Copy link
Contributor Author

knagasaki commented Feb 12, 2021

I think style='text-emphasis-style: open' in the first <ab> should be inherited in the <r:rb>. In that case, if a series of emphasis-marks is stopped in the middle of <r:rb>, the encoding will be more complicated. Then, I recommend to use <hi>, <emph>, or something like that with @rend, while annotated elements like <note> or <r:ruby> are marked up in the manner of standoff. And then, I would like to ask you to use another example for this. The example includes two difficulties. I would like to discuss the two in another place. One is usage of <g>⿰言仐</g>. Another is to add @type to <r:ruby>.

@martindholmes
Copy link

@knagasaki I wouldn't use @rend, I would just use another @style (or @rendition pointing to a <rendition> element.

@knagasaki
Copy link
Contributor Author

knagasaki commented Feb 12, 2021

@knagasaki I wouldn't use @rend, I would just use another @style (or @rendition pointing to a <rendition> element.

@martindholmes , I might not understand enough the usage of @rend. Is it used only for simple (or pre-defined) style such as underline or something like that? Anyway, I don't oppose to use @style there. My point is to use an attribute for it.

@martindholmes
Copy link

@knagasaki @rend is an old attribute whose values are not controlled in any way, so every project has to define their own usage, and encoding is not easily interoperable. @style uses the well-defined, well-established CSS standard, so everyone knows what @style values mean, and they can easily be handled when creating HTML from your TEI. @rendition is a pointer to a <rendition> element in the header, whose content is almost always CSS, so it's a way of defining a style ruleset once, and then using it many times.

So I think I would only use @rend if the style I'm encoding doesn't have any representation in CSS at all. That doesn't often happen these days. :-)

@knagasaki
Copy link
Contributor Author

@knagasaki @rend is an old attribute whose values are not controlled in any way, so every project has to define their own usage, and encoding is not easily interoperable. @style uses the well-defined, well-established CSS standard, so everyone knows what @style values mean, and they can easily be handled when creating HTML from your TEI. @rendition is a pointer to a <rendition> element in the header, whose content is almost always CSS, so it's a way of defining a style ruleset once, and then using it many times.

So I think I would only use @rend if the style I'm encoding doesn't have any representation in CSS at all. That doesn't often happen these days. :-)

@martindholmes, thank you for the kind explanation. I understand the situation. I will use @style and @rendition from now.

@martindholmes
Copy link

The question of rt inheriting style from its ancestors can be overcome by using a global rendition element in the header:

<rendition selector="rt"> [...all the style for rt elements goes here...]</rendition>

However, I don't believe the Guidelines express clearly enough yet what the inheritance expectation is in these cases; does a rendition with @selector override styles declared directly on ancestor elements in the text? This could presumably be clarified by using !important, of course.

@duncdrum
Copy link
Collaborator

duncdrum commented Feb 13, 2021

The problem with inheritance is that , correct me if I m wrong, the ruby element inherits the @Style from ab This is wrong rt should be excluded.

Repeating @Style on rb Is intended to help deal with the overlap. But fails to do so since rt still inherits from ab A rule that clarifies style inheritance for ruby would make for leaner markup, by allowing me to skip repeating a declaration on rb. If rt Were to not inherit style by default it would also not inherit the writing mode from line, so not ideal either.

So we need a solution that’s unambiguous as to which characters have emphasis markers (and which don’t) hopefully avoiding unnecessary repetition of attributes.

Something along the lines: Style inheritance stops at ruby Including rb, rt only inherits document wide properties / styles from non direct ancestors of ruby

@martindholmes
Copy link

Since the CSS text-emphasis spec is now pretty solid, and allows you to specify the character used, @MegJBrown, @martinascholger, @hcayless and I think that the next stage would be to encode two good examples using CSS text-emphasis, and run them by everyone before incorporating them into the Guidelines.

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