chchch / upama

A PHP library for comparing two or more Sanskrit TEI XML files and generating an apparatus with variants
GNU General Public License v2.0
10 stars 1 forks source link

Separate grouping for certain <add> items #56

Open wujastyk opened 1 year ago

wujastyk commented 1 year ago

Dear Charles, Deepro has some manuscripts where there are marginal notes. And the same marginal note appears in more than one witness. Saktumiva already represents <add> content in red in the apparatus. We would like these marginal notes to be collated but also to be distinguished or marked off in some way in the apparatus. Perhaps in a different colour, or size or location. Can that be done?

Input will probably be something like this:

   <l xml:id="SS.1.14.1">athātaḥ śoṇitavarṇanīyam
                        adhyāyaṃ vyākhyāsyāmaḥ <add type="commentary" place="margin">.Hello wirld!</add>|| </l>

So type="commentary" is distinguishing these additions from other more generic scribal additions.

At the moment, this looks like the following: image

Have you perhaps had to think about such issues in the context of your Paris paratexts project?

chchch commented 1 year ago

I think I've been using <note> for marginal annotations. That way I can easily separate annotations from additions (i.e., corrections). Do you use <note> for anything else?

wujastyk commented 1 year ago

Deepro has been doing the same. But they don't get collated, do they? In tests yesterday we got a funny output with collation but in the main text-body, not in the right margin. But we tried several options and to be honest I now can't be sure which result was which. But I know we never quite got what Deepro is after.

chchch commented 1 year ago

<note> is set to ignore all by default; I think if you set it to ignore tags only you should get the right output.

wujastyk commented 1 year ago

Ah, we tried "include" and didn't get what we wanted. Deepro - try "ignore tags".

chchch commented 1 year ago

include means it includes the actual XML tags when it does the collation... it can be a little unpredictable at the moment, and probably works best for empty tags like <lb/>. I'll eventually get around to rewriting the collation algorithm...

chakrabortydeepro commented 1 year ago

Thanks for the response, Charles. I tried it with ignore tags only and it works. For example, I have three similar notes on mss B₁, B₂ and B₃. And I assigned the same xml:ids to these notes. On the apparatus of the the main edition I see them as three different additions: image But on the page of a transcribed ms, it collates with other ones. image

However, there are some issues with the font: image

chchch commented 1 year ago

It looks like maybe you're missing an <l> or <lg> tag? If you let me know which file it is I can take a look.

chakrabortydeepro commented 1 year ago

Thanks for your response, Charles. I didn't use the <lg> tag here. But there is a <l> tag.

The example is from berline.12433.txt <l xml:id="BBP-1.1.1.1.10">

chchch commented 1 year ago

Do you have a link to saktumiva.org?

chakrabortydeepro commented 1 year ago

yes. Here: https://saktumiva.org/wiki/chakraborty/balabodhini/sandhiprakarana/berlin12433?upama_ver=he0rzpn8xb

chchch commented 1 year ago

Ah I see... you have nested xml:ids which makes it complicated to collate. So I guess you should either put the note in a separate <p>, or remove the xml:ids on the note, so that it gets collated together with the verse.

chakrabortydeepro commented 1 year ago

Ah, I understand now. Thank you very much, Charles. I removed the xml:ids. And it works well now.

I have another problem with the collation. In a verse, ms B₂ reads dhātum at the place of dātum. On the edition page https://saktumiva.org/wiki/chakraborty/balabodhini/sandhiprakarana/edition?upama_ver=he0phtdaju, it collates against a daṇḍa at the end of the previous line. [image: Screenshot from 2023-05-16 13-24-20.png] And it shows that there is no variation in dātum. [image: Screenshot from 2023-05-16 13-29-34.png] And the pop-up window shows a wrong transcription. [image: image.png] B₂ was not transcribed as dhātum dātum. There is just one word, dātum. Do you know why this is happening?

On Tue, May 16, 2023 at 1:17 PM chchch @.***> wrote:

Ah I see... you have nested xml:ids which makes it complicated to collate. So I guess you should either put the note in a separate

, or remove the xml:ids on the note, so that it gets collated together with the verse.

— Reply to this email directly, view it on GitHub https://github.com/chchch/upama/issues/56#issuecomment-1550223460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIIRWBIPX3O4TAIMA6X3VR3XGPHCXANCNFSM6AAAAAAYCW3FDM . You are receiving this because you commented.Message ID: @.***>

-- Deepro Chakraborty (he/him) PhD candidate Department of History, Classics, and Religion University of Alberta

The University of Alberta acknowledges that we are located on ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ (Amiskwacîwâskahikan) Treaty 6 territory, and respects the history, languages, and cultures of the First Nations, Métis, Inuit, and all First Peoples of Canada, whose presence continues to enrich our institution.

chchch commented 1 year ago

Hmm... that might be a bug in the program. Do you get the same problem if you remove the daṇḍa or the <caesura/>?

chakrabortydeepro commented 1 year ago

After removing the daṇḍa in the main edition, it works well.

chchch commented 1 year ago

Ok let me take a look at the code... for now, maybe try |<caesura/> or <caesura/>dātuṃ or |<caesura/>dātuṃ in the edition to see if it fixes it temporarily.

chakrabortydeepro commented 1 year ago

Thanks, Charles. Yes, I tried |<caesura/>. It works.