benwbrum / fromthepage

FromThePage is a wiki-like application for crowdsourcing transcription of handwritten documents.
http://fromthepage.com
GNU Affero General Public License v3.0
170 stars 50 forks source link

Handle ADD, INS, DEL, SUP consistently #4267

Open benwbrum opened 1 month ago

benwbrum commented 1 month ago

We need to make sure that we're using semantic HTML tags correctly for add, ins, del, sup, marginalia.

Transcript

this is just a portion of hte text

this is the rest of the text.

This is a <del>DEL</del> tag.

This is an <ins>INS</ins> tag. (Not supported in our documentation, but autocompletes?)

This is an <add>ADD</add> tag.

This is a <sup>SUP</sup> tag.

Rendering

Screenshot from 2024-08-08 08-33-56

HTML

(both export and display)

<div class="page-preview ltr" lang="en" dir="ltr">
      <p>this is just a portion of hte text</p>

      <p>this is the rest of the text.</p>

      <p>This is a <del>DEL</del> tag.</p>

      <p>This is an <ins>INS</ins> tag. (Not supported in our documentation, but autocompletes?)</p>

      <p>This is an <span class="addition">ADD</span> tag.</p>

      <p>This is a <sup>SUP</sup> tag.</p>
    </div>

TEI-XML

<div xml:id="OTP33267572">
    <fw type="pageNum">FL19466726</fw>
    <p corresp="TTP33267572P0" xml:id="OTP33267572P0">this is just a portion of hte text </p>
    <p corresp="TTP33267572P1" xml:id="OTP33267572P1">this is the rest of the text. </p>
    <p corresp="TTP33267572P2" xml:id="OTP33267572P2">
This is a

        <del>DEL</del>
tag.

    </p>
    <p corresp="TTP33267572P3" xml:id="OTP33267572P3">
This is an

        <ins>INS</ins>
tag. (Not supported in our documentation, but autocompletes?)

    </p>
    <p corresp="TTP33267572P4" xml:id="OTP33267572P4">
This is an

        <add>ADD</add>
tag.

    </p>
    <p corresp="TTP33267572P5" xml:id="OTP33267572P5">
This is a

        <add place="above">SUP</add>
tag.

    </p>
</div>
benwbrum commented 1 month ago

Marginalia is rendered

HTML

<p>This is a <span class="marginalia">{MARGINALIA}</span> tag.</p>

TEI

<p corresp="TTP33267572P6" xml:id="OTP33267572P6">
  This is a
    <note type="marginalia">MARGINALIA</note>
  tag.
</p>
benwbrum commented 1 month ago

It looks like the HTML standard for additions is ins rather than the add which we support. On the other hand, TEI uses an add element for additions and insertions.

We should treat these as synonyms with a TEI flavor vs. HTML flavor, converting add to ins on all HTML output and ins to add on TEI exports. I would prefer any ins tag to be styled in a superscript, the same way that we currently handle our add tags, though we can keep the underline for compatibility.