tea.mathoverflow.net - Discussion Feed (Feature request: Adding diacritics in Markdown) Sun, 04 Nov 2018 13:39:46 -0800 http://mathoverflow.tqft.net/ Lussumo Vanilla 1.1.9 & Feed Publisher Andrew Stacey comments on "Feature request: Adding diacritics in Markdown" (3904) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3904#Comment_3904 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3904#Comment_3904 Thu, 18 Mar 2010 12:31:22 -0700 Andrew Stacey Huh? My script produces unicode. It can produce entities if preferred, append &output=number or &output=name to the end of the URL.

When you save the page, your browser can have already done some interpretation! You should use wget to be sure that what you see is what I sent. What happens if you save the file and then load it up again in firefox?

]]>
Harald Hanche-Olsen comments on "Feature request: Adding diacritics in Markdown" (3901) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3901#Comment_3901 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3901#Comment_3901 Thu, 18 Mar 2010 09:54:22 -0700 Harald Hanche-Olsen @Andrew: No difference. And in any case, your script produces the entity, not the honest unicode. I can see no difference, when saving the page as HTML and looking at it in emacs, between what your script produces and what appeared on this page. And yet, the latter works, and the former doesn't. Oh, well.

(Let me know if you spot one (innocent bystander, that is).)

]]>
Andrew Stacey comments on "Feature request: Adding diacritics in Markdown" (3900) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3900#Comment_3900 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3900#Comment_3900 Thu, 18 Mar 2010 09:34:46 -0700 Andrew Stacey Maybe it's a firefox version thing: it works fine on mine with \H{o} as ő. It may be a feature of where the unicode is generated. My script generates it on the server. But if you type it as entities, say here, then it is generated in the browser. I'm not sure exactly how those are making a difference, but if I try the honest unicode here how does that look? Here's the entity version: ő and here's the honest unicode: ő. Any difference?

I could teach it the special ones, I suppose, though, but it's much easier to have a generic method that works for every letter with a particular accent or font. It depends how much people will use it as to how much effort I put in!

(Innocent bystanders should be arrested for their rarity value)

]]>
Harald Hanche-Olsen comments on "Feature request: Adding diacritics in Markdown" (3898) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3898#Comment_3898 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3898#Comment_3898 Thu, 18 Mar 2010 08:49:48 -0700 Harald Hanche-Olsen @Andrew: Better now. At least if you're on Safari. Stupid Firefox seems to have a problem with combining diacritics, so \H{o} comes out as o followed by a box. But to produce the combined characters where appropriate, you'd have to teach your little application more unicode. Oh, actually, unicode contains only six precombined characters with the double acute: They are uppercase and lowercase latin u and o, plus cyrillic u. How hard would it be to teach it those special cases? The latin ones, I mean? (U+0150 Ő – U+0151 ő – U+0170 Ű - U+0171 ű).

(And to innocent bystanders shocked by my harsh language: I know Andrew, and expect him to not take “it sucks” personally when it comes from me. It's not intended in a bad way.)

PS. Using o with combining double acute, as in ő (test: ő) seems to work fine in firefox here on meta. So why doesn't it work when served by your little app? Strange.

]]>
Andrew Stacey comments on "Feature request: Adding diacritics in Markdown" (3897) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3897#Comment_3897 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3897#Comment_3897 Thu, 18 Mar 2010 08:28:23 -0700 Andrew Stacey By the way, the gnome equivalent of the character map that these Maciods keep going on about is called gucharmap. To redefine your keyboard, use xmodmap.

Regarding the script, since it was a 10minute hack, it only knows about those commands that I already know. So if there's something, like \H, that should be there but isn't, just let me know; preferably with what the corresponding unicode should be.

]]>
Mariano comments on "Feature request: Adding diacritics in Markdown" (3896) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3896#Comment_3896 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3896#Comment_3896 Thu, 18 Mar 2010 08:03:22 -0700 Mariano @Harald, in X-land you get ő by typing <Compose> <equal> <o>

]]>
Andrew Stacey comments on "Feature request: Adding diacritics in Markdown" (3894) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3894#Comment_3894 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3894#Comment_3894 Thu, 18 Mar 2010 07:39:48 -0700 Andrew Stacey

And @Andrew, your script sucks. It doesn't know about \H.

Huh? It works for me.

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3893) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3893#Comment_3893 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3893#Comment_3893 Thu, 18 Mar 2010 05:50:10 -0700 Harry Gindi Here's roughly the history (don't quote me on it, but I think it's accurate enough):

The compose key is an ancient device from the days of yore. Originally, the "backspace" key on a typewriter allowed you to overtype symbols on top of other symbols. When keyboards first came around (before that they used punchcards with keypunches [which look like keyboards that punch cards]), they realized that backspace was useful to clear a previous character, so they moved the old functionality of overtyping to the compose key. I believe that TECO was the first text editor to make use of this feature. What this lets you do is compose two (or more) keys in a row to produce a special character. Now, there are a lot of keys on a keyboard, so you can imagine how many characters you have direct access to.

However, most personal computers did not support this feature. I don't know why, I mean it's just a single extra key that vastly increases functionality. Anyway, the point is that there is software that lets you map a key to the compose key, write your own composition sequences, etc. This has been around on Linux for a while (I think it's been an optional setting in emacs since the dawn of time, since emacs is/was based on TECO). As you might imagine, for people who are used to LaTeX, using a compose key is wonderful, because it gives you a lot of the convenient stuff you have in LaTeX but you can use it anywhere and it doesn't need to compile.

By default, I do not think that there is a compose sequence for ő, but adding it is as simple as finding the unicode and adding it to the configuration file. For example, a good place to put that letter without moving the ö would be to send it to (" + 0) rather than (" + o). In principle, any unicode character can be added with no trouble at all. For example, compose (o + o) = ∞. Note that when pressing the keys, they need not both be depressed at once, but can be composed sequentially.

From what I know about macs (very little, to be honest), it seems like there should be an easy way to port the relevant stuff from Linux, but I'm not a programmer, so I couldn't tell you.

Anyway, the whole beauty here is that I can type special characters without moving my hands from the keyboard. The novelty has not yet worn off.

]]>
Harald Hanche-Olsen comments on "Feature request: Adding diacritics in Markdown" (3892) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3892#Comment_3892 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3892#Comment_3892 Thu, 18 Mar 2010 04:35:47 -0700 Harald Hanche-Olsen I have no idea what AllChars does on windoze, so I can't comment on its equivalent on macs. But on the mac you can have a popup in the menu bar (requires a small amount of setup) which gives you access to various keyboard layouts (and you can create your own with ukelele), plus a character palette from which you can pick just about any unicode character – for those situations where you need to write “Erdős” properly (beats “Erd&#x0151;s” for sure). BTW, is there a compose key sequence for the letter ő? (And @Andrew, your script sucks. It doesn't know about \H.)

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3891) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3891#Comment_3891 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3891#Comment_3891 Thu, 18 Mar 2010 01:45:58 -0700 Harry Gindi Perhaps in the FAQ, we can point people to the right place to be able to use the compose key. There are a number of ways to do this in *nix not least by just letting a text-editor that supports composition be the editor for any old text box in firefox. In windows, there is AllChars, but I don't know of an equivalent for macs.

If we included this in the FAQ under "how can I type accented characters?", it seems like this should become a non-issue.

However, I do agree with Andrew that using HTML entities or unicode codes is precisely the wrong thing to be doing. It seems clear to me that the system in LaTeX was designed to have the same functionality as the compose key (which stopped being standard on pc keyboards ages ago).

]]>
Andrew Stacey comments on "Feature request: Adding diacritics in Markdown" (3890) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3890#Comment_3890 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3890#Comment_3890 Thu, 18 Mar 2010 01:18:29 -0700 Andrew Stacey I should say that my script is intended as a translator for those who (like me) find it difficult to remember all the HTML entities, and if HTML entities aren't around then remembering all the unicode codes but who can remember the LaTeX commands. It is certainly not intended to be used as a source for a javascript hack and I also wouldn't recommend incorporating it into Markdown.

(There aren't as many HTML entities as there are MathML entities. For example, &Ccharon; (test: &Ccharon;) doesn't get understood but &#x0010C; (test: Č) does; but who can remember that code?)

]]>
Anton Geraschenko comments on "Feature request: Adding diacritics in Markdown" (3889) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3889#Comment_3889 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3889#Comment_3889 Wed, 17 Mar 2010 21:12:21 -0700 Anton Geraschenko I agree with Mariano. Fixing this on the server or with javascript is totally hacky and seems wrong. You already have two ways to enter proper diacritics: via html codes, and by telling your OS that you like to use multiple keyboard layouts. Assuming you refuse to ever change your keyboard layout for some reason, is it really so bad to type "&eacute;" instead of "[[\'e]]"?

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3887) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3887#Comment_3887 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3887#Comment_3887 Wed, 17 Mar 2010 16:44:23 -0700 Harry Gindi Yes, then support my request on meta.SE!

]]>
Andrew Stacey comments on "Feature request: Adding diacritics in Markdown" (3883) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3883#Comment_3883 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3883#Comment_3883 Wed, 17 Mar 2010 13:46:44 -0700 Andrew Stacey Please don't add any more javascript! It's slow enough as it is! Much better to render stuff server-side and then present it correctly to the user.

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3882) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3882#Comment_3882 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3882#Comment_3882 Wed, 17 Mar 2010 03:05:12 -0700 Harry Gindi I wonder how hard it would be to implement this through SE. Perhaps we could do something like [[\'e]], which would be easy to type, and let it process the page after jsMath. ∞

]]>
Andrew Stacey comments on "Feature request: Adding diacritics in Markdown" (3881) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3881#Comment_3881 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3881#Comment_3881 Wed, 17 Mar 2010 02:32:51 -0700 Andrew Stacey The difficulty of entering non-standard characters was raised recently on the n-Forum. In response, I scribbled a quick program that converts LaTeX code to UTF8. It's at http://www.math.ntnu.no/~stacey/code/latexToUTF/utf.php. At the moment, the input is limited to one "thing" at a time (so you can type \'e but not Fr\'echet), but by using the "ajax" version you can build up a list of characters. Then you can cut-and-paste them into whatever you are writing.

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3276) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3276#Comment_3276 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3276#Comment_3276 Sun, 21 Feb 2010 18:56:36 -0800 Harry Gindi I assume that was the point =p. ;).

]]>
Mariano comments on "Feature request: Adding diacritics in Markdown" (3275) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3275#Comment_3275 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3275#Comment_3275 Sun, 21 Feb 2010 18:49:15 -0800 Mariano (It is not unlikely that whoever wrote that program was inspired by X...)

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3264) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3264#Comment_3264 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3264#Comment_3264 Sun, 21 Feb 2010 11:14:09 -0800 Harry Gindi Meanwhile, ∞ and Ω have the same compose sequences as in X!

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3263) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3263#Comment_3263 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3263#Comment_3263 Sun, 21 Feb 2010 10:59:20 -0800 Harry Gindi I found a program that adds back the compose key for windows for those who are interested. Ce qui avait été à nouveau! (I don't know if that's actually correct french, but I was trying to think of something with accents in it. [It's supposed to be something like "What had been is again!"])

I still support the feature request though. I'd rather be able to type it in markdown than using a resident program intercepting keys left and right.

]]>
Harald Hanche-Olsen comments on "Feature request: Adding diacritics in Markdown" (3261) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3261#Comment_3261 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3261#Comment_3261 Sun, 21 Feb 2010 08:03:17 -0800 Harald Hanche-Olsen I tend to agree with Mariano. It's a question of solving the problem in the right place. I am curious, though: How hard is it on Windows to type “Erdős” properly?

On the Mac, for rarely used characters you always have the option of picking characters from a character palette. There you can find all sorts of mathematical symbols, including ⋘ ⋙ ⧑ ⧒ which I cannot recall ever seeing in mathematical texts. Plus, you can make your own keyboard layout using a third party application like Ukelele.

]]>
Mariano comments on "Feature request: Adding diacritics in Markdown" (3259) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3259#Comment_3259 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3259#Comment_3259 Sun, 21 Feb 2010 07:06:34 -0800 Mariano You should try to change the layout in your keyboard. Windows has something like an "US layout with dead keys" or something like that that turns, for example, the ' key into a dead one which, when followed by an a produces an á, and when followed by a space produces the usual ', and so on. That way you can very easily get àäâáã. By reading the docs you'll learn how to type slightly more exotic things like ç or æ or č or ñ.

If you are using X (under Linux, say), you are actually much better off AFAICS: you can then use the us-intl layout which sets up the dead keys, but you also get the Compose key from you can, hmm, compose all sort of weird characters: ¶«»®©™đĐ₡₦¢♭♮§ by typing Compose followed by two keys.

This is the correct solution to your problem in this millenium. (La)TeX's was a very good solution 30 years ago, when Unicode and UTF-8 were non-existent, and 640K were enough for everyone.

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3258) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3258#Comment_3258 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3258#Comment_3258 Sun, 21 Feb 2010 02:02:12 -0800 Harry Gindi
For anyone who supports it. I can't see why we _wouldn't_ want it. ]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3099) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3099#Comment_3099 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3099#Comment_3099 Wed, 17 Feb 2010 11:34:38 -0800 Harry Gindi Tom LaGatta comments on "Feature request: Adding diacritics in Markdown" (3097) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3097#Comment_3097 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3097#Comment_3097 Wed, 17 Feb 2010 11:15:03 -0800 Tom LaGatta Anton: Is it possible to enable diacritics in math mode? I tried a workaround by typing $\mathrm{t\"est}$ and $\mbox{t\"est}$ and $t\"est$, but none of those three options of those prints tëst.

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3078) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3078#Comment_3078 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3078#Comment_3078 Tue, 16 Feb 2010 21:58:57 -0800 Harry Gindi Anton Geraschenko comments on "Feature request: Adding diacritics in Markdown" (3077) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3077#Comment_3077 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3077#Comment_3077 Tue, 16 Feb 2010 21:51:37 -0800 Anton Geraschenko I don't really understand the nature of the request. As far as I know, you can write diacritics however you normally write them. I think it's a matter of picking an international keyboard layout in you OS settings somewhere (I don't do this, but people who regularly type in other languages do). You might also have some sort of character map utility for producing various unicode characters (you have to copy and paste, but it works). Another thing you could do is just copy and paste the characters from a web page, like this one. The most common diacritics (e.g. acute, grave, circumflex, umlaut over any vowel) have easy-to-remember html codes (see the page I linked to). For example, typing "&egrave;" produces è and "&auml;" produces ä, and they show up properly in the live preview. If you want, you can even copy from the live preview into the input box so that when somebody edits your post, it looks like you used an international keyboard rather than using the html code.

]]>
Harry Gindi comments on "Feature request: Adding diacritics in Markdown" (3075) http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3075#Comment_3075 http://mathoverflow.tqft.net/discussion/221/feature-request-adding-diacritics-in-markdown/?Focus=3075#Comment_3075 Tue, 16 Feb 2010 21:01:58 -0800 Harry Gindi