Re: amarasara - html / css help

35 views
Skip to first unread message

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Aug 26, 2014, 9:38:21 PM8/26/14
to Ajit Krishnan, sanskrit-p...@googlegroups.com
प्रिय अजित, कश्चिद् आसक्तस् स्यात् अस्माकं संस्कृतसाङ्गणकसमूहे। तानस्मिन् सूत्रे योजयामि।


2014-08-25 10:25 GMT-07:00 Ajit Krishnan <ajit.k...@gmail.com>:
आत्मीय विश्वास,

अमरसारस्य (अमरकोषसंग्रहग्रन्थस्य) पाठो भवत्विति विचारः । तन्निमित्तं colebrook ग्रन्थसदृश आकारो लाभायेति मन्ये । भवान् कञ्चन संस्कृताभिमानिनं css-दक्षं च जानाति चेत्, कृपया संपर्कं कारयितुं प्रार्थये । उदाहरणं संलग्नं पत्रेऽस्मिन् । 

सस्नेहम्,

    अजितः 

 



--
--
Vishvas /विश्वासः

colebrooke_format.pdf

Shreevatsa R

unread,
Aug 27, 2014, 1:48:10 PM8/27/14
to sanskrit-programmers, Ajit Krishnan
एवम् मम उपायः / व्याजः  :-)


नाहम् ‌css-दक्षः 
but I'm so grateful to Sri Ajit Krishnan for the dictionary files (that I just discovered yesterday) that I felt obliged to do my best to help here. :-)

My basic idea for the alignment problem (which I presume is the actual hard part here), inspired by the \phantom command in TeX / LaTeX, is to put the entire verse line in every row, but hide the parts other than the one we want visible (with "color: transparent"). This automatically ensures that each row (from the same verse line) starts just where the previous ends.

This is a hack of course, and someone who knows CSS well may be able to come up with a better solution or simpler code. (Note also the "वेदा म्नायौ" broken up on the last line. I believe this can be fixed -- just have to make those two divs stick together closely.)

Regards,
Shreevatsa


--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mārcis Gasūns

unread,
Aug 28, 2014, 11:08:53 AM8/28/14
to sanskrit-p...@googlegroups.com, ajit.k...@gmail.com
Is it a sample page?

Ajit Krishnan

unread,
Aug 28, 2014, 11:15:59 AM8/28/14
to sanskrit-p...@googlegroups.com
aatmiiya,

I'd been thinking from the problem from a text markup point of view. I now realize that I should be approaching it from a data set point of view instead (especially since I may be able to reuse some of the existing amarakosha data that is available). The code you provided is perfect to get me started. I'll play around and reply back in a few days with a straw man proposal so that I can get your feedback.

I like the "phantom" approach ... such a simple solution that I didn't consider. Thank you.

sasneham,

    ajit


2014-08-27 10:47 GMT-07:00 Shreevatsa R <shree...@gmail.com>:
एवम् मम उपायः / व्याजः  :-)


नाहम् ‌css-दक्षः 
but I'm so grateful to Sri Ajit Krishnan for the dictionary files (that I just discovered yesterday) that I felt obliged to do my best to help here. :-)

My basic idea for the alignment problem (which I presume is the actual hard part here), inspired by the \phantom command in TeX / LaTeX, is to put the entire verse line in every row, but hide the parts other than the one we want visible (with "color: transparent"). This automatically ensures that each row (from the same verse line) starts just where the previous ends.

This is a hack of course, and someone who knows CSS well may be able to come up with a better solution or simpler code. (Note also the "वेदा म्नायौ" broken up on the last line. I believe this can be fixed -- just have to make those two divs stick together closely.)

Regards,
Shreevatsa
2014-08-27 7:08 GMT+05:30 विश्वासो वासुकिजः (Vishvas Vasuki) <vishvas...@gmail.com>:
प्रिय अजित, कश्चिद् आसक्तस् स्यात् अस्माकं संस्कृतसाङ्गणकसमूहे। तानस्मिन् सूत्रे योजयामि।
2014-08-25 10:25 GMT-07:00 Ajit Krishnan <ajit.k...@gmail.com>:
आत्मीय विश्वास,

अमरसारस्य (अमरकोषसंग्रहग्रन्थस्य) पाठो भवत्विति विचारः । तन्निमित्तं colebrook ग्रन्थसदृश आकारो लाभायेति मन्ये । भवान् कञ्चन संस्कृताभिमानिनं css-दक्षं च जानाति चेत्, कृपया संपर्कं कारयितुं प्रार्थये । उदाहरणं संलग्नं पत्रेऽस्मिन् । 

सस्नेहम्,

    अजितः 

 



--
--
Vishvas /विश्वासः

Ajit Krishnan

unread,
Aug 28, 2014, 11:20:49 AM8/28/14
to Mārcis Gasūns, sanskrit-programmers
aatmiiya,

The pdf titled "colebrooke_format.pdf" is something I hand typeset to showcase what I was looking for. I can send a few pages from the actual "amarasAra" publication, if you are interested. 

sasneham,

    ajit

Ajit Krishnan

unread,
Nov 1, 2015, 1:38:55 PM11/1/15
to Shreevatsa R, विश्वासो वासुकिजः, sanskrit-programmers
namaste,

So, it might have taken more than a few days (ha!), but I finally got around to this. After thinking about it, I start with data entries in the simple readable format below. I parse this into an object model and then generate some html. I've attached sample output (printed directly from generated html). Feedback is welcome. Vishvas, can you point me to the latest version of the source amara kosha data files that you are using? Hopefully, I can auto-generate the majority of the content and only end up having to do some proof-reading and minor formatting by hand.

[श्रुतिः] स्त्री [वेद] [आम्नाय][स्त्रयी] + [धर्मस्तु] तद्विधिः
श्रुतिः {f}, वेदः {m}, आम्नायः {m}, त्रयी {f} + धर्मः {m}
Vedas + Duty enjoined by them


sasneham,

    ajit


 

On Wed, Aug 27, 2014 at 1:58 PM, Ajit Krishnan <ajit.k...@gmail.com> wrote:
aatmiiya,

I'd been thinking from the problem from a text markup point of view. I now realize that I should be approaching it from a data set point of view instead (especially since I may be able to reuse some of the existing amarakosha data that is available). The code you provided is perfect to get me started. I'll play around and reply back in a few days with a straw man proposal so that I can get your feedback.

I like the "phantom" approach ... such a simple solution that I didn't consider. Thank you.

sasneham,

    ajit
2014-08-27 10:47 GMT-07:00 Shreevatsa R <shree...@gmail.com>:
8000_amara.pdf

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Nov 1, 2015, 4:44:04 PM11/1/15
to Ajit Krishnan, Shreevatsa R, sanskrit-programmers
​saadhu!​

2015-11-01 10:38 GMT-08:00 Ajit Krishnan <ajit.k...@gmail.com>:
Vishvas, can you point me to the latest version of the source amara kosha data files that you are using?

Ajit Krishnan

unread,
Nov 2, 2015, 10:42:45 PM11/2/15
to विश्वासो वासुकिजः (Vishvas Vasuki), Shreevatsa R, sanskrit-programmers
Thanks. For those who are interested, here's my working git repo for this work


    ajit
Reply all
Reply to author
Forward
0 new messages