add tag
5 years ago निरंजन

Computationally this might sound weird, but the character I have written is a “complex character” composed of three characters. Those three characters constitute a single character. This particular case is of conjunction. The character is particularly used for conjoining two characters. There is also another pattern which gives us compound character. Consonant characters are combined with vowel diacritics to form a compound character. For example /kaa/ will be written with the consonant & diacritic .

This was a theoretical description of the working of Devanagari script. Thus Devanagari script needs a different counting pattern in my opinion. What counts as a “character” does not depend upon the number of symbols. There are different combinations which constitute a single character. Is there any other such alpha-syllabic script known to TeX. This has popped up again and again for various reasons. I had a problem with biblatex. You can look into it here as an SE question or the same problem as a (solved) GitHub issue here. I don’t know how they managed to solve it, but that particular GitHub issue is fixed. Now I think Devanagari script needs a different interpretation system which is not based on the alphabetic nature of the compiler XeTeX.

Any ideas?

Entire consonant-chart for the solution provided by @JouleV

Top Answer
5 years ago joulev

\StrChar cannot yet deal with the “joining” character, so let’s implement one ourselves. When it comes to programming something, expl3 never fails to amaze me.

blob

Note 1: I implement this completely by myself (I don’t look at the documentation or the code of xstring). Therefore in some edge cases the behaviour of this command may not be similar to what \StrChar does.

Note 2: The akshar package has been released based on the code provided here.


Edit 1: Add more special characters, with great help from @Skillmon (Thanks!).

Edit 2: Fix the bug reported by the OP.

5 years
निरंजन — Saturday, 6th Jun 2020 13:11

😃

5 hours
joulev replying to निरंजन — Saturday, 6th Jun 2020 08:26

Unicode numbers? Brillant idea!

3 hours
निरंजन replying to joulev — Saturday, 6th Jun 2020 05:37

Hmm. True

निरंजन replying to joulev — Saturday, 6th Jun 2020 05:37

That will do, or you can add the Unicode numbers.

11 hours
joulev — Friday, 5th Jun 2020 18:24

now the problem is that no fonts can suffice… perhaps I will not list those characters but use a sentence like “for the full list of characters, see the source”?

joulev replying to निरंजन — Friday, 5th Jun 2020 18:22

He probably subscribed to the CTAN announcement notifications.

2 hours
निरंजन — Friday, 5th Jun 2020 16:35

I am amazed to see somebody noticing the package so soon and adding the data of these many languages immediately.

निरंजन — Friday, 5th Jun 2020 16:34

Oh got it, pull request

निरंजन — Friday, 5th Jun 2020 16:34

What is a PR?

16 minutes
joulev replying to निरंजन — Friday, 5th Jun 2020 16:18

If he sends a PR I think I will release another version right after merging it.

22 minutes
निरंजन — Friday, 5th Jun 2020 15:56

It’s a great news! Cheers 😃

2 hours
joulev — Friday, 5th Jun 2020 13:41
12 days
निरंजन — Sunday, 24th May 2020 07:00

Congratulations!

5 hours
joulev replying to निरंजन — Sunday, 24th May 2020 02:06

It has been released. You can find it in CTAN now.

12 hours
joulev — Saturday, 23rd May 2020 14:17

I assume it will be here: https://ctan.org/pkg/akshar

joulev replying to निरंजन — Saturday, 23rd May 2020 14:15

I have submitted to CTAN. It will take a while for it to be processed, but it will be soon. Perhaps it will arrive in your TL in a few days.

38 minutes
joulev replying to निरंजन — Saturday, 23rd May 2020 13:37

It is basically Hack but with more glyphs for icons etc. I use powerlevel10k for my terminal, so I need such fonts. https://www.nerdfonts.com/

निरंजन — Saturday, 23rd May 2020 13:33

Where did you get Hack NF font? I am trying to find it. All I could get was Hack, I didn’t find Hack NF.

निरंजन — Saturday, 23rd May 2020 13:32

Inform me when released.

निरंजन — Saturday, 23rd May 2020 13:31

Cool

15 minutes
joulev — Saturday, 23rd May 2020 13:16

@निरंजन I am thinking of uploading the package tonight. It is relatively stable now as I can see, although some works still need to be done.

6 hours
निरंजन — Saturday, 23rd May 2020 07:05

Okay 😃

joulev — Saturday, 23rd May 2020 07:01

Most users in that room participate here.

joulev replying to निरंजन — Saturday, 23rd May 2020 07:00

A chat room that we were (very) active in after we left TeX.SE and before this site was launched. It is not so active recently, but many users here still come there on a daily basis.

11 minutes
निरंजन — Saturday, 23rd May 2020 06:50

What is duck overflow?

12 hours
joulev replying to निरंजन — Friday, 22nd May 2020 18:39

Talking about guides, to be honest I have nothing more than available documentations like clsguide or interface3, and very helpful and experienced friends here and on Duck Overflow.

joulev replying to निरंजन — Friday, 22nd May 2020 18:37

This is only my third attempt so far to create a package, and the second attempt using docstrip, so the way it is shaped is perhaps still not elegant enough. There are things to improve there: version control, hacking l3doc, etc (if you look at akshar.dtx, you will see many hacks implemented on l3doc 😃).

an hour
निरंजन replying to joulev — Friday, 22nd May 2020 17:38

This is fabulous. I really like the way you shaped this package. Have you referred to any guide for LaTeX package developers or what? Everything seems so neat 😃

7 hours
joulev replying to निरंजन — Friday, 22nd May 2020 10:20

😃 I am now able to close #1 – the issue that I didn’t think I could close without any help. Hurrah!

निरंजन — Friday, 22nd May 2020 10:18

Party 😃

17 minutes
joulev — Friday, 22nd May 2020 10:01

YESSSSSSSSSSSSSSSS

joulev — Friday, 22nd May 2020 10:01

blob

12 minutes
joulev — Friday, 22nd May 2020 09:49

The render is still quite funny (the circles are missing) but it is much better

joulev — Friday, 22nd May 2020 09:49

I guess I figured it out

joulev replying to निरंजन — Friday, 22nd May 2020 09:49

blob

निरंजन replying to joulev — Friday, 22nd May 2020 09:39

I am completely clueless about the working of XeLaTeX. You might want to consider adding a question.

an hour
joulev replying to निरंजन — Friday, 22nd May 2020 08:52

actually it is supported by many fonts (like the font you are seeing in this page), we just cannot get it to work in xelatex.

16 minutes
निरंजन replying to joulev — Friday, 22nd May 2020 08:36

I’ll check

14 minutes
निरंजन replying to joulev — Friday, 22nd May 2020 08:22

You can add a footnote saying your algorithm also takes care of Unicode character UA8FF but it is currently not supported by any font.

निरंजन replying to joulev — Friday, 22nd May 2020 08:19

Yes this is right.

4 hours
joulev — Friday, 22nd May 2020 04:17

@निरंजन I have pushed the commits that implement the two suggestions. See if it is ok.

2 hours
joulev — Friday, 22nd May 2020 02:09

Do you know of any ways to fix that?

joulev — Friday, 22nd May 2020 02:09

So indeed one diacritic is missing

joulev — Friday, 22nd May 2020 02:08
joulev — Friday, 22nd May 2020 02:08

Oh, by the way looking at the log file I see this:

8 hours
joulev — Thursday, 21st May 2020 18:16

oh god the algorithm is harder than I initially thought

joulev — Thursday, 21st May 2020 18:16

If it is right then my algorithm is correct

joulev replying to निरंजन — Thursday, 21st May 2020 18:15

The result of the test should be स्कास्कास्काडडमंळीस्कास्काड right?

3 hours
निरंजन — Thursday, 21st May 2020 15:18

Remember every character should be interpreted along with its diacritic mark.

निरंजन — Thursday, 21st May 2020 15:17

Your output string should be स्कास्कास्काडडमंळीममड

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.