Text-critical information styling


Fine. I’ve been focussing on off-road 4x4 driving and hiking today so I didn’t do much either :smile:


Ping … don’t forget my above questions please! And if you can, have a look at the uploaded dn2/nl/Vimala in next-sc (but for some reason the css for the .cr class has dropped out of that, I’ve put it back again but it will have to wait till Monday to be approved).

Also I’ve got the Var-readings JS working! In lovely clown-vomit colors right now (okay, css needs a little work).
I cannot upload it right now because the devas are off work till monday. But maybe we can do a little work on the css. I’ll continue work on it with specs in SUCE-272 and figure out how the pali-lookup tool works and do the same thing here. Right now it works the old way as on the old site and that has to change a little.


You’ll be happy to know that the tooltip is now a proper dark paper-tooltip with white sans letters. Still needs a little bit of styling but not too bad. I’ve uploaded it to github and needs to be merged by the devas. It works for most cases accept cases where it now also doesn’t work. For instance in there is <span class="var" id="note36" title=" etthantare gāthā syā1-3, pā1 potthakesu">.

As you see this just displays as is in the popup. The reason is that the format of the title is not correct. It should be something like title=" etthantare gāthā (syā1-3) | potthakesu (pā1)" or title=" etthantare gāthā potthakesu (syā1-3,pā1)" or so, but I’m not certain what it really should be so I’m unsure how I should re-format it.

All the rest should be ready for testing. Right now everything else, including the class="corr" just has a title element with default styling for titles but maybe you want paper-tooltips for the whole lot too?

PS. I’m stuck on all my tickets now … need some input to continue and would also like to continue with styling of other text-related stuff.


Thanks for the regex—makes it very easy! Okay, let me go through these one by one and see what’s happening.

As a general point on these cases, we previously discussed the use of <i> to indicate the Sanskrit portion of a note. This is a detail, which is probably a good idea, but not very important. So I’ll make this change in the few examples here, but whether you do this throughout the rest of the texts is up to you.

One detail: the regex is not 100% accurate, and sometimes conflates two spans as one. So below I give the literal strings for each case.


This is a odd one, the marked text is in fact a variant reading, attributed to the “Hs” edition, but there is no indication what “Hs” stands for. Perhaps it was identified in the original printed edition. In any case, the cited passage, much of which is reconstructed, merely notes a variant spelling. This is not obvious from the GRETIL text, and you have to manually read the previous paragraph to find the relevant passage. Moreover, the variant is obviously a simple spelling mistake in the manuscript. It’s a stock passage and the correct reading is well established. Nothing is gained by recording this, so best to simply eliminate it. So delete two spans from this file:

  • <span class="add">Hs: gaṇḍa<span class="supplied">taḥ</span> śalyato ’gato ’ni<span class="supplied">tyato</span></span>
  • <span class="add">Hs: gaṇ<span class="supplied">ḍa</span>ta<span class="supplied">ḥ</span> śalya<span class="supplied">to</span> ’gato ’n<span class="supplied">i</span>tyato</span>


Text has: <span class="add">Cf. SHT VIII (Erg.) 1033v1: <span class="supplied">bhikṣavaḥ caṃkramanti <span class="gap">+ + + + + </span>kān dhārikāṃ baddhavy.</span></span>

  • Change to: <span class="add">Cf. SHT VIII (Erg.) 1033v1: <i>bhikṣavaḥ caṃkramanti <span class="gap">+ + + + + </span>kān dhārikāṃ baddhavy.</i></span>


Most cases here are variant readings. The tricky bit is to work out the span of text to which the variant applies. Here the first case as an example:

  • pāruṣikapānaṃ <span class="add">MS <span class="supplied">parūṣaka</span></span>

As you can see, the supplied text is actually a variant. In this case, the variant applies to a part of the previous word. But I prefer to put the var span over the whole word, I don’t like splitting words with tags unnecessarily. So we change to:

  • <span class="var" title="MS: parūṣaka">pāruṣikapānaṃ</span>

If it’s okay with you, in most cases I won’t give the corrected readings here, as you will be able to fix this better than I. But in a few complex cases I’ll give the corrected markup.

  • śaṭipuṣpaṃ <span class="add">MS <span class="supplied">śikapuṣpaṃ nāgāpuṣpaṃ |</span></span>
  • takas <span class="add">MS <span class="supplied">tapa</span></span>
  • karotīti <span class="add">MS <span class="supplied">nākariṣyatīti</span></span>
  • saṃvṛttas <span class="add">MS <span class="supplied">smṛtaḥ</span></span>
  • abhiṣṭutaḥ <span class="add">MS <span class="supplied">abhituṣṭaḥ</span></span>
  • bhagavatā ṛddhyā mathurāṃ praviśya timisikā <span class="add">MS <span class="supplied">bhagavato bhagavān ṛddhyā vinītā</span></span>
  • saṃyuktāgame mārgavarganipāte |<span class="add">MS GBM 960.6: <span class="supplied">saṃ­yuktakāgame mārgavarganipāte</span></span>
  • ātmīyair antraiḥ <span class="add">MS <span class="supplied">ātmadīyair antraiḥ</span></span>
  • śalākāṃ <span class="add">Dutt throughout <span class="supplied">śilā­kāṃ</span></span>
  • <span class="add">MS (GBM 970.5f.) adds <span class="supplied">bhagavān saṃlakṣayati | yaḥ kaścid ādīnavo bhikṣavaḥ paṭaplotikaṃ prāvṛtyāntargṛhaṃ gacchati | tasmān na bhikṣuṇā paṭaplotiṃ prāvṛtyāntargṛhaṃ gantavyam | gacchati sātisāro bhavati |</span></span>
    • Not a variant; here, replace <supplied> with <i>
  • valīpalitottamāṃgaḥ <span class="add">MS <span class="supplied">valīpalitacitāṃ­gaḥ</span></span>
  • valīpalitottamāṅgaḥ <span class="add">MS <span class="supplied">valīpalitacitāṃ­gaḥ</span></span>
  • peyā iyam asti mamāntike | <span class="add">MS <span class="supplied">peyāyam asti</span></span>anukampaṃ
    • change to: <span class="var" title="MS: peyāyam asti">peyā iyam asti mamāntike</span> | anukampaṃ
  • kallapālyāpaṇaṃ <span class="add">Dutt <span class="supplied">kalapālyāpaṇaṃ</span>; cf. <span class="supplied">kalyapālyā</span> p. 120.4</span>
    • Change to: <span class="var" title="Dutt: kalapālyāpaṇaṃ; cf. kalyapālyā, p. 120.4">kallapālyāpaṇaṃ</span>
  • kallapālyāḥ <span class="add">Dutt <span class="supplied">kalapālyāḥ</span></span>
  • hatavihatavidhvastaḥ <span class="add">ed. 1984: <span class="supplied">viddhastaḥ</span></span>
  • hataviha<span class="supplied">tavidhvastāḥ</span> <span class="add">ed. 1984: <span class="supplied">viddhastaḥ</span></span>
    • Change to: <span class="var" title="ed. 1984: viddhastaḥ">hataviha<span class="supplied">tavidhvastāḥ</span></span>. Note: this is an unusual case: the editor supplies a reconstructed text, not supported by any manuscript, but notes an actual manuscript reading as a variant.
  • hastino <span class="add">ed. 1984: <span class="supplied">hastinaḥ</span></span>
  • grāmasyātha <span class="add">ed. 1984: <span class="supplied">grāmasyārthe</span></span>
  • sudhanasyāntaḥ­pura­janenopalabdham <span class="add">ed. 1984: <span class="supplied">labdhaḥ</span></span>
  • karuṇadīnavilambitair akṣarair <span class="add">ed. 1984: <span class="supplied">vilambitarakṣarair</span></span>
  • devaḥ sāṃpratam iti | <span class="add">ed. 1984: <span class="supplied">devaḥ saṃvṛttaḥ sāṃ­pratam</span></span>
    • <span class="var" title="ed. 1984: devaḥ saṃvṛttaḥ sāṃ­pratam">devaḥ sāṃpratam</span> iti |
  • ardhāntaragataṃ nāgaṃ yatra paśyet kirīṭakam |<span class="add">MS: <span class="supplied">arāntara­gatāṃ nābhī yatra paśyeta tatra kirīṭaḥ</span></span>
  • mahatstūpaṃ śrīmataḥ kāśyapasya vai | <span class="add"><span class="supplied">mahās­tūpaṃ</span></span>
    • <span class="var" title="mahās­tūpaṃ">mahatstūpaṃ</span> śrīmataḥ kāśyapasya vai |
    • Since there’s no source cited for this, it might be better to mark it as corr.
  • <span class="supplied">sa</span>ndhāvatemaṃ saṃsāraṃ dīrghaṃ kalpam analpakam <span class="supplied">330</span> <span class="add"><span class="supplied">sandhāvitvemaṃ</span></span>
    • <span class="var" title="sandhāvitvemaṃ"><span class="supplied">sa</span>ndhāvatemaṃ</span> saṃsāraṃ dīrghaṃ kalpam analpakam <span class="supplied">330</span>
    • Since there’s no source cited for this, it might be better to mark it as corr.
  • pudgalo 'pavādo dattasya <span class="add">MS: <span class="supplied">pudgalo 'vabodhito na boditas tasya |</span></span>
  • anujānīmahe <span class="add">MS: <span class="supplied">nīdhvam</span></span>
  • śastranikṛttā <span class="add"><span class="supplied">mūlanikṛttā</span></span>
  • śalākāvṛtti <span class="add">Dutt: Ms. <span class="supplied">śilakā</span> throughout; but MS <span class="supplied">śalākā</span> throughout</span>
  • samudgasaṃbandhāc <span class="add">Dutt: <span class="supplied">samudgakasambandhāt</span></span>
  • <span class="add">Dutt: As the Tibetan translation does not agree with the Sanskrit textr, we reconstruct here the Sanskrit from Tibetant: <span class="supplied">itīmāni bhikṣavo 'ṣṭau pānāni kāle pratigrāhitāni kāle marditāni kāle adhiṣṭhitāni kāle paribhoktavyāni | akāle na paribhoktavyāni | rātryāś ca prathame yāme 'tikrānte na paribhoktavyāni | itīmāni aṣṭau pānāni kāle pratigrāhitāni akāle marditāni akāle parisrutāni akāle adhiṣṭhitāni na paribhoktavyāni | itīmāni aṣṭau pānāni kāle pratigrāhitāni kāle marditāni akāle parisrutāni akāle adhiṣṭhitāni na paribhoktavyāni | itīmāni aṣṭau pānāni akāle pratigrāhitāni akāle marditāni akāle parisrutāni paścādbhaktena na paribhoktavyāni | rātryāś ca yāme 'tikrānte na paribhoktavyāni |</span></span>
    • Here the markup is correct, but there are some spelling errors in the English! Correct to: <span class="add">Dutt: As the Tibetan translation does not agree with the Sanskrit text, we reconstruct here the Sanskrit from Tibetan: <span class="supplied">itīmāni bhikṣavo 'ṣṭau pānāni kāle pratigrāhitāni kāle marditāni kāle adhiṣṭhitāni kāle paribhoktavyāni | akāle na paribhoktavyāni | rātryāś ca prathame yāme 'tikrānte na paribhoktavyāni | itīmāni aṣṭau pānāni kāle pratigrāhitāni akāle marditāni akāle parisrutāni akāle adhiṣṭhitāni na paribhoktavyāni | itīmāni aṣṭau pānāni kāle pratigrāhitāni kāle marditāni akāle parisrutāni akāle adhiṣṭhitāni na paribhoktavyāni | itīmāni aṣṭau pānāni akāle pratigrāhitāni akāle marditāni akāle parisrutāni paścādbhaktena na paribhoktavyāni | rātryāś ca yāme 'tikrānte na paribhoktavyāni |</span></span>
  • tatrotpādanadharmakaṃ sarvaṃ visarjanadharmakaṃ kṛtvā <span class="add">MS tatrotsadanadharmakaṃ <span class="supplied">ta</span>t sarvaṃ visarjanadharmakaṃ kṛtvā; cf. MPS 7.2 <span class="supplied">tatrotsīdana</span>; BHSD s.v. <span class="supplied">utsīdana</span></span>
    • <span class="var" title="MS: tatrotsadanadharmakaṃ [ta]t sarvaṃ visarjanadharmakaṃ kṛtvā; cf. MPS 7.2: tatrotsīdana; BHSD s.v. utsīdana">tatrotpādanadharmakaṃ sarvaṃ visarjanadharmakaṃ kṛtvā</span>
  • chatrāmbuvane <span class="add">MS <span class="supplied">chatrāpravane</span></span>


As for the details of the styling, I’d rather wait to see the latest changes.

But as to the use of the native style for title attribute, I would use it for cases where there is a simple description of the content, such as “Unclear reading”.

Where the title attribute includes content not found in the main text, such as variant readings and corrected text, we should use the paper tooltip.

But in general, the new page with examples is great. We should have done this long ago! I’m thinking that we should keep this as a standard reference for the future, and wondering how we can make that work. Any ideas?

I would suggest adding another column, describing the effect of activating Textual Info: “none”, “change color to xyz”, etc. Then we can go through the list and make sure it’s all working as it should. And in the future we can keep track if anything breaks.


Done. Titles only show up in Textual Information if the textual info shows a change in color too. So for instance for .gap, which is visible in grey all the time, so is the title.


The new page examples are now at zz1/zz/test and zz2/zz/test and the ones under NL have been deleted. These two do not show up in the menu or anywhere else so we can keep them there.


As soon as the Devas have uploaded the changes you should be able to see everything.


Okay, so everything looks good, except I’m not seeing the paper-tooltip.


Should be there now.
Also the color page on zz2/zz/test.
The bogus sutta page with lots of tags in it has moved to :babel_fish: zz42/zz/test. :marvin_robot:

Ha … that’s one kind way of saying you’re lazy :stuck_out_tongue:

But I’d like to do this properly. According to Gretil:

Some of Dutt’s reading have been corrected by me according to the manuscript, for example:

“me” in this being Klaus Wille and MS = according to the manuscript.
So if I do this properly, I have to have an expansion for “MS” (and maybe also for “Dutt” and “ed. 1984”) for the paper-tooltip. Something like:
ms: "Mūlasarvāstivādavinayavastu, part 1-4"
dutt: "Mūlasarvāstivādavinayavastu, part 1-4, Dutt (1939-1959)"
ms84: “Mūlasarvāstivādavinayavastu, part 1-4, (1984)”

So then <span class="var" title="MS: parūṣaka">pāruṣikapānaṃ</span> will become <span class="var" title="parūṣaka (ms)">pāruṣikapānaṃ</span> and the paper-tooltip lists:

parūṣaka Mūlasarvāstivādavinayavastu, part 1-4


Yes, that’s a good idea.


I can see it now! Regarding the list-item markers, I think they’re fine. In fact, the default solid circle would be fine, too. The only real style issue, which I’m sure you’re aware of, is that the popup is too narrow: wider would be better.

One minor issue that this process has revealed is the styling of tables. In the sample pages you’ve made, we have tables, but they’re not well styled. In the text pages, also, we have some tables; well, three to be precise (!).

  • en/ds2.1.2
  • en/dn14
  • de/sn34.11-55

Of these, the German one has horrifying inline table styles! Mein Gott!

In Next, I applied some table styles on the static pages, and these can, I think, be applied to the text pages as well, with the exception that we shouldn’t style to first column bold by default.

Seeing as how I’m so lazy, can I get you to do this?


You want me to do styling … hmmm … as long as you don’t mind what it looks like afterwards! I made those German ones!!!

I’ll see if I can access the “creative” part of my brain. I guess that’s in the right half, isn’t it?


Ahh, no, not really, just cut and paste some CSS!


Running into a problem here because it also styles the paper-tooltip. I tried the :not(paper-tooltip) selector but that does not work. Any ideas.


You mean the table styles? Since there’s so few of them, I’d just put a class on them and style that.


The paper tooltip also picks that up. Which it shouldn’t do because it’s in the shadow-dom and has a different class.


I’m guessing someone has cast an evil spell? :mage: Otherwise, I got nothing.


Or more likely: I’m doing something wrong.


That will take a bit of time also. Paper-tooltip is set to automatically calculate width and does not seem to have a function to override that. I have to dig into it … or take the shortcut and ask the devas!


In which case, I’d suggest just leave it for now, put it on a to-do list for later. I don’t know if you’ve seen this recent blog post from Polymer:

The upshot, if I understand it right, is that the fundamentals of Polymer are undergoing a transformation, which will be completed at Polmer 3. When all is ready, they’ll release a new set of elements. And this is why, as we’ve seen, there are bunches of unaddressed bugs in the elements. Hopefully we can upgrade to P3 mid or late next year.

Anyway, it seems to me that at this point we’d be best off avoiding making changes to stock elements unless its absolutely necessary. Which this one isn’t!


From your favorite developer’s favorite developer! :heart: Monica.

But I’ve done the upgrade to Polymer 2 … I suggest getting the devas to do the upgrade to Polymer 3 by that time … it will not be an easy job and considering that I don’t know what the devas have been doing at all, I’m not sure if I’ll be able to do it!


Well, let’s discuss it at a meeting. But from what I can see, the idea is that the upgrade path should be largely automatic.