ambuda-org / ambuda

Main application code for Ambuda, a breakthrough Sanskrit library (ambuda.org)
https://ambuda.org
MIT License
89 stars 24 forks source link

Footnotes messed up in text export #504

Open vvasuki opened 1 year ago

vvasuki commented 1 year ago

Observe last lines in https://ambuda.org/proofing/kushakumudvatiya/download/text

[^1]M omits नाम [^2]T1, T2 add- ओंकारश्चाथशब्दश्च द्वावेतौ ब्रह्मणः पुरा। कण्ठं भित्त्वा विनिर्यातौ तस्मान्माङ्गलिकावुभौ॥ओं।। T2 adds- इदं कुशकुमुद्वतीयं नाम नाटकं रामाभट्टेन लिखितम्। obviously this is the name of the scribe. M- इत्थं श्रीमत्तञ्जनगरविराजमानं श्रीमद्राजकीयं श्रीसरस्वती महाल ताळपत्रग्रन्थानुसारेण लिखितं समवलोकितं च सद्विजयतेतराम्।

Contrast with what was actually typed at https://ambuda.org/proofing/kushakumudvatiya/178/ :

image

We observe that the footnote definitions were typed in separate lines but the backend mashes them up together without considering the fact that they start with the string [^.

Also, given that different pages use identical footnote numbers, it would be very useful for the text export to have page numbers, so that the footnote definition may be easily matched with anchor intra-page.

shreevatsa commented 1 year ago

I count this as another point (like #503) in favour of the grand vision of rich editor + preview. :-) Either one would help on its own:

But in the meanwhile, I guess for this text separating the footnotes is part of the manual post-processing work required (or hack it in the code like you suggested: if a line in the markup starts with [^ then treat it as a separate footnote).

cc @suhasm fyi

vvasuki commented 1 year ago

I count this as another point (like #503) in favour of the grand vision of rich editor + preview. :-) Either one would help on its own:

  • If the editor natively supported footnotes in its structure (rather than relying on markup), everything would be stored with a uniform structure,

साधु।

But in the meanwhile, I guess for this text separating the footnotes is part of the manual post-processing work required

नैतत् साधु - at the very least the download offered should not be worse than whatever was input by the proofreader.

(or hack it in the code like you suggested: if a line in the markup starts with [^ then treat it as a separate footnote).

युक्तम्।

shreevatsa commented 1 year ago

But in the meanwhile, I guess for this text separating the footnotes is part of the manual post-processing work required

नैतत् साधु - at the very least the download offered should not be worse than whatever was input by the proofreader.

Agreed: I meant that someone needs to make another pass on the proofreader's work, so that the backend's interpretation matches of the text matches what was intended. (So I meant one-time post-processing by a tech-savvy Ambuda person/volunteer, not by each person who downloads the text export.)

I also agree with offering a download that is the “raw” text input by the proofreader, with no “smart” processing line collapsing line breaks: I think (not sure) the issue #25 is about this.