Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    Given the number of non-english words in mathematics, it seems like this would be really helpful. Is there any way we could request some way to add diacritics to our letters in markdown? If not, is this even a requestable feature on meta.SE?
  2.  

    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 "è" produces è and "ä" 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.

  3.  
    Sure, it's just that the shortcuts in LaTeX are so much more convenient, although maybe I've been spoiled by them.
  4.  

    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.

  5.  
    I don't think that works in LaTeX math mode either though. In math mode in latex, you have to use \acute, \grave, \ddot, \tilde, \bar, etc.
  6.  
    http://meta.stackexchange.com/questions/4464/easier-way-to-type-diacritics

    For anyone who supports it. I can't see why we _wouldn't_ want it.
    • CommentAuthorMariano
    • CommentTimeFeb 21st 2010 edited
     

    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.

  7.  

    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.

    • CommentAuthorHarry Gindi
    • CommentTimeFeb 21st 2010 edited
     

    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.

    • CommentAuthorHarry Gindi
    • CommentTimeFeb 21st 2010 edited
     

    Meanwhile, ∞ and Ω have the same compose sequences as in X!

    • CommentAuthorMariano
    • CommentTimeFeb 21st 2010
     

    (It is not unlikely that whoever wrote that program was inspired by X...)

    • CommentAuthorHarry Gindi
    • CommentTimeFeb 21st 2010 edited
     

    I assume that was the point =p. ;).

  8.  

    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.

    • CommentAuthorHarry Gindi
    • CommentTimeMar 17th 2010 edited
     

    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. ∞

  9.  

    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.

  10.  

    Yes, then support my request on meta.SE!

  11.  

    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 "é" instead of "[[\'e]]"?

  12.  

    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 Č (test: Č) does; but who can remember that code?)

  13.  

    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).

  14.  

    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ős” for sure). BTW, is there a compose key sequence for the letter ő? (And @Andrew, your script sucks. It doesn't know about \H.)

    • CommentAuthorHarry Gindi
    • CommentTimeMar 18th 2010 edited
     

    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.

  15.  

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

    Huh? It works for me.

    • CommentAuthorMariano
    • CommentTimeMar 18th 2010
     

    @Harald, in X-land you get ő by typing <Compose> <equal> <o>

  16.  

    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.

  17.  

    @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 o&#779; (test: ő) seems to work fine in firefox here on meta. So why doesn't it work when served by your little app? Strange.

  18.  

    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)

  19.  

    @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).)

  20.  

    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?