IUBLibTech / newton_chymistry

New version of 'The Chymistry of Isaac Newton', using XProc pipelines to generate a website based on TEI XML encodings of Newton's alchemical manuscripts, and Apache Solr as a search engine.
2 stars 0 forks source link

Expanding underlining in normalized version #102

Closed aewingate closed 3 years ago

aewingate commented 3 years ago

In ALCH00049 (Keynes 60), Jim discovered a section at the bottom of 2r and the top of 2v where Newton has used a shorthand version of underlining to indicate that the passage was in italics in the original text. Newton underlines the first word in the passage (Quaedam), the last word of the passage (induratus), and the first syllable of each word that starts a new line.

This renders as it should in the diplomatic version image but we need the underlining to stretch all the way across in the normalized version. Currently the normalized doesn't even match the diplomatic since some of the elements have to be inside the <orig> of <orig> and <reg>. Normalized Carbon site image Current TEI code image

@mdalmau has suggested encoding with TEI <span> and then using that as the element to attach any CSS or XSLT to for the normalized version.

I am not sure if this is an issue that comes up in other manuscripts, but since Bill, Jim, and I are going through the manuscripts so granularly, I think we'll catch any other instances.

tubesoft commented 3 years ago

How about applying <choice>, <orig>, and <reg> tags for the entire part where we want to underline? If we do so, I don't think we need to change xslt and other rendering programs. According to the wiki article, it does not seem to be against the coding guideline.

aewingate commented 3 years ago

So doing something like this then? `

sunt quæquae indurant fixant & congelant & quædamquaedam indurantur
    <reg>
        <hi rend="u"><hi rend="u">sunt</hi>
            <choice><orig>quæ</orig><reg>quae</reg></choice> indurant fixant &amp; congelant &amp;
                    <choice><orig>quædam</orig><reg>quaedam</reg></choice> indurantur</hi>
    </reg>
</choice>`
tubesoft commented 3 years ago

From the perspective of rendering algorithm (i.e. not from that of TEI guideline), I suppose that nesting <choice> does not make sense much. In other words, <reg> inside <orig> or <orig> inside <reg> will probably never be read. If TEI guideline allows, you could put the entire passage that is suppose to be rendered as diplomatic version inside <orig>, and the passage for the normalized version inside <reg>.

tubesoft commented 3 years ago

@aewingate For your information, my suggestion would go like this:

<choice> <orig><hi rend="u">sunt</hi> quæ indurant fixant &amp; congelant &amp; quædam indurantur</orig> <reg><hi rend="u">sunt quae indurant fixant &amp; congelant &amp; quaedam indurantur</hi></reg> </choice>

tubesoft commented 3 years ago

@aewingate Also, I coded the entire part like this:

<choice><orig><hi rend="u">Quædam</hi>, inquit, <hi rend="u">elementa</hi><lb/>
                     <hi rend="u">sunt</hi> quæ indurant fixant &amp; congelant &amp; quædam indurantur<lb/>
                     <hi rend="u">fix</hi>antur et congelantur: Et sic est duplex consideratio in arte<lb/>
                     <hi rend="u">sci</hi>licet componere ex una natura unius metalli duos liquores<lb/>
                     <hi rend="u">con</hi>trarios in compositione, unum qui <!-- alewinga, p. 137 from here on -->virtutem habet fixantem con<lb/>
                         <hi rend="u">gel</hi>antem et indurantem &amp; alterum qui sit volatilis infixus &amp; mollis<lb/>
                     <hi rend="u">Iste</hi> vero secundus liquor induratur et fixatur per primum. Ex</orig><reg><hi rend="u">Quaedam, inquit, elementa<lb/>
                     sunt quae indurant fixant &amp; congelant &amp; quaedam indurantur<lb/>
                     fixantur et congelantur: Et sic est duplex consideratio in arte<lb/>
                     scilicet componere ex una natura unius metalli duos liquores<lb/>
                     contrarios in compositione, unum qui <!-- alewinga, p. 137 from here on -->virtutem habet fixantem <lb/>congelantem et indurantem &amp; alterum qui sit volatilis infixus &amp; mollis<lb/>
                     Iste vero secundus liquor induratur et fixatur per primum. Ex</hi></reg></choice><lb/>

                     <fw type="catch" place="right">quibus</fw>

                     <pb n="4"/>
                     <milestone unit="folio" n="2v" xml:id="f2v" facs="#surface-2v"/>

                     <choice><orig><hi rend="u">qui</hi>bus ambobus liquoribus resultat unus lapis congelatus fixus &amp;<lb/>
                    <hi rend="u">induratus</hi></orig><reg><hi rend="u">quibus ambobus liquoribus resultat unus lapis congelatus fixus &amp;<lb/>
                    induratus</hi></reg></choice>

and result is like this:

diplomatic:

image

normalized:

image
aewingate commented 3 years ago

@tubesoft I talked to John Walsh this afternoon, and he came up with this solution for us instead of the duplicating that both of us were doing. <hi rend="u">sunt</hi><hi rend="norm_u"><choice><orig>quæ</orig><reg>quae</reg></choice> indurant fixant &amp; congelant &amp; <choice><orig>quædam</orig><reg>quaedam</reg></choice> indurantur</hi> <hi rend="u">fix</hi><hi rend="norm_u">antur et congelantur: Et sic est duplex consideratio in arte</hi><lb/>

Basically, the part that always needs to be underlined whether it's in the diplomatic or the normalized will have <hi rend="u"> surrounding it, but then the part which is only underlined in the normalized version will have <hi rend="norm_u"> surrounding it, which I believe means that there will need to be a change to the XSLT or CSS to match the "norm_u". image

tubesoft commented 3 years ago

Yeah, that looks nice! I can modify the XSLT and CSS code so that it can work. However, be careful about making space "sunt" and "quae", because currently the code would be rendered as "suntquae". If you add a space </hi> and <hi rend="norm_u"> the space is not going to be underlined. Maybe we could add it between <hi rend="norm_u"> and <choice>.

aewingate commented 3 years ago

Cool! I will encode ALCH00049 now and put that up into Xubmit. And I definitely see what you mean about the spacing, and I think adding it between <hi rend="norm_u"> and <choice> makes sense.

aewingate commented 3 years ago

Alright, I just re-encoded the section and put it in Xubmit. There's one section that was a little tricky because the line break combined with the underlining split a word ("congelatum") into three sections. I think how I've done it should work since "con" doesn't need to be underlined in the diplomatic, and in the regularized it's all one word on the next line and I can wrap the text inside the <reg> with <hi rend="norm_u">. Just wanted to give a heads up in case it acts weird! image

tubesoft commented 3 years ago

Thank you, @aewingate ! I should have asked before, but I have one small question. the value of the attribute norm_u might be better to change. Specifically saying, when I went through other TEI code, I don't think that there are any attribute values that has underscore, except for referring a file whose name contains underscores. Connecting words by hyphen seems more common. This is pretty much the matter of project's coding convention. Judging from this, I would suggest norm-u instead of norm_u. Maybe you might want to talk to @mdalmau about how to name the attribute value.

aewingate commented 3 years ago

I talked to John Walsh, and he says that it's arbitrary, since we've tended to go for hyphens norm-u sounds good. I'm going to go make that change now!

tubesoft commented 3 years ago

Fixed at #104

wehooper commented 3 years ago

The rendering works as prescribed in both the diplomatic and normalized. Nice solution.