FrankensteinVariorum / fv-postCollation

a repository for post-processing finalized collation files to prepare the Variorum edition.
2 stars 0 forks source link

MS add element problem: rendering too many carets #38

Closed ebeshero closed 1 year ago

ebeshero commented 1 year ago

In the MS, we are seeing problems with rendering ^ marks as written in the MS. These are signifying insertions, but our CSS for the interface already handles <add> elements with ^.

Worse, we are often generating three ^ for a single addition to the MS, because in the S-GA markup it's rendered like this:

<add>
      <metamark function="insert">^</metamark>
   <add>
   <add>Actual added text here.
   </add>

This means we output one ^ for the first <add> element, and one for the text contents of <metamark>, and a third for the <add> element after it.

There is a variation on this with <addSpan> in the MS. We think we should ignore anything to do with rendering the outer <addSpan> and only concentrate on the inner elements of <add>, <del> that mark specific alterations.


 <addSpan hand="#pbs" spanTo="#c56-0028.02"/> 
               <lb/>
               <retrace cause="fix" hand="#mws" spanTo="#c56-0028.04"/>
               <metamark function="displacement">^</metamark> 
               <lb/>He said that <lb/>these were <lb/>men to whose <lb/>indefatigable zeal <lb/>modern<anchor xml:id="c56-0028.04"/>
               <mod>
                  <del rend="strikethrough">chem</del>
                  <add place="superlinear">natural</add>
               </mod> 
               <lb/>
               <retrace cause="fix" hand="#mws" spanTo="#c56-0028.05"/>philosophers were <lb/>indebted for most <lb/>of the foundations <lb/>of their knowledge<anchor xml:id="c56-0028.05"/> 
               <lb/>
               <delSpan rend="strikethrough" spanTo="#c56-0028.03"/>it is not a meaner <lb/>task<anchor xml:id="c56-0028.03"/>
               <retrace cause="fix" hand="#mws">They</retrace>
               <mod>
                  <add hand="#mws" place="sublinear">
                     <metamark function="insert">^</metamark>
                  </add>
                  <add hand="#mws" place="superlinear">had</add>
               </mod>
               <retrace cause="fix" hand="#mws" spanTo="#c56-0028.06"/>left to <lb/>us, as an easier <lb/>task to give new <lb/>names, &amp; arrange <lb/>in conected <w ana="start"/>classi<lb/>fications<w ana="end"/> the <lb/>facts which they <lb/>to a great degree <lb/>ha<mod>
                  <mdel>v</mdel>
                  <add hand="#mws" place="intralinear">d</add>
                  <mdel>e</mdel>
               </mod> been the <lb/>instruments of <lb/>bringing to light. <lb/>The labours of <lb/>men of genius <lb/>however erroneously <lb/>directed <w ana="start"/>scarce<lb/>ly<w ana="end"/> ever failed.<anchor xml:id="c56-0028.06"/>
               <anchor xml:id="c56-0028.02"/>
ebeshero commented 1 year ago

What we propose to do is a little radical: We would actually remove these elements in the XSLT postprocessing pipeline, only when an <add> contains just a metamark and no other text descendant, and is followed by another first following-sibling <add> element.

<add>
      <metamark function="insert">^</metamark>
   <add>

Also we would even remove this construction, when it has a <seg> around it. This is b/c the seg mark is not by itself meaningful. Usually it's a <seg> with an __I, __M, or __F.

<add>
     <seg xml:id="....">
      <metamark function="insert">^</metamark>
    </seg>
   <add>

The only reason we do this is because we have markup in place that renders meaningful <add> elements as a single insertion moment. Effectively the <add> elements containing only metamark ^ are pseudomarkup and are being duplicated by our own markup.

ebeshero commented 1 year ago

Pinging @raffazizzi on this: it's a bit of a radical move with rendering the MS, but I think it's okay.

Yuying-Jin commented 1 year ago

image

raffazizzi commented 1 year ago

These options sound fine to me, especially now that the the project has more control over the content of the S-GA files in general. Another option I can think of would be setting the CSS for metamark to display: none, particularly inside add.

tei-add > tei-metamark: { display: none}
ebeshero commented 1 year ago

@raffazizzi I like that option because it does less potential damage...

ebeshero commented 1 year ago

tei-add[tei-metamark]: { display: none}

Yuying-Jin commented 1 year ago

ins:has(tei-metamark) { display: none}