I am looking for way to stack a tilde and a bar over the same letter (mainly a and i) without them to overlap, and preferably the tilde on top of the bar. The goal is to transliterate nasalisation in hindi.

I have found the unicode U+022D for ȭ, but I did not find the other letter (and I would prefer the reverse order). Moreover I have seen places where a letter has both signs (for example on Wiktionary, section "Nasalisation", point 1), but they are on top of each other and this is ugly. Moreover I cannot copy the result, I get ā̃ . I have a book which displays the expected result. Note that I know how to write each symbol separately.

Any of the following methods would be fine: compose, unicode or keyboard combinations (preferably with french keyboard). My system is Fedora 27 with Cinnamon.

Edit in answer to @dirkt: To be more precise about the input and display softwares:

  • I was indeed mislead in believing that copying ā̃ does not work with the tilde being placed on the right of the letter, as I checked only in text field (here, Gedit and Kile), but the display works in Firefox (except that both are stacked on top of each other).
  • My immediate wish is to use this is in Anki (both the Linux and Android app). It happens that the display works perfectly fine in this case, the tilde is above the bar and they are not stacked. For input, see next point.
  • Using unicode combinations also help inserting the symbols: I was trying with keyboard dead keys, but only one can modify the letter since they are to be entered before the letter (idem for the compose method), and not after like with the unicode combinations. I still cannot use the Ctrl+U combination in Qt softwares, but this is an independent issue (I remembered to have solved it in another install, but I forgot how – so still possible to copy). Is there no compose combination to achieve this? I read on Wikipedia about "chained dead keys", I will try to
  • Later I may want to use such symbols in PDF produced with Latex (written using Kile, standard configuration with UTF8, etc.). I know how to achieve the above result using \bar and \tilde, but I would like to be able to enter directly the unicode combination. Currently this does not work (I guess because the tilde has a special meaning, having just the bar works).
  • For Latex, I'd suggest asking another question on tex.stackexchange.com. Latex can interpret unicode input with the right packages, but it's not trivial, and I don't know offhand how combining characters are handled/which packages to use for that. – dirkt Dec 10 '17 at 12:43
  • Thank you for the suggestion. And do you know if compose can achieve the same result as unicode insertion? – Harold Dec 10 '17 at 18:20
  • I know you can use X compose to produce a string, so in principle, it should be possible to produce a base unicode char and combining unicode codepoints, but I've never tried that myself. – dirkt Dec 10 '17 at 20:08

There are three parts to this: How to encode tilde+bar+letter, and how to display it, and how to enter it.

If you want to encode in Unicode, there are combining characters, in particular U+0303 COMBINING TILDE and U+0304 COMBINING MACRON. Both the wiktionary example and what you typed in the question after "I cannot copy the result" are actually encoded as U+0101 LATIN SMALL LETTER A MACRON followed by U+0303 COMBINING TILDE, and that is the correct encoding. I can also see your ā̃ above correctly as a single letter in my browser, with the tilde stacked over the bar, so exactly what you want, even though it appears as two characters in the editing field.

The next question is how to display this combination correctly. This really depends on the program doing the displaying; some programs may be lazy and don't handle stacked combiners correctly, which is when you get an overlapping bar and tilde, instead of the tilde stacked on the bar. For some programs, that may depends on the fonts used. So you should edit your question with what type of text you want to prepare, on what text editing system, and how the consumers of this text are supposed to read the text. Some formats (e.g. PDF) or more suitable to transferring the desired result independently from the program doing the presentation, because PDF encodes where glyphs are put on the page.

The third question is how to enter this combination. Again, that depends on the program you are using to prepare the text. You can assign the combining character to a special key combination, you can use the features of your editor (e.g. emacs) to produce it, you can copy-and-paste it, or if you, say, use a text formatting system like TeX or LaTeX to prepare a PDF, there are ways to encode this with characters you can already type.

  • For my current needs your answer showed me that copying the symbol works well. I have edited my question to give more details and to add some specific questions to gain more flexibility. If you have any clues on those this would be greatly appreciated. – Harold Dec 10 '17 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.