Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

As a native English speaker, I am not used to many words with accents on them, so I find it somewhat difficult to keep the various accents straight in my head, and moreso to also remember the TeX commands for all of them.

Additionally, I am very lazy.

Thus, I have recently begun to use macros for accented words that commonly come up in my writing, thereby absolving me of the responsibility of remembering which accents the word takes and how to type them. This also ensures that I am consistent: I don't need to worry about whether I mistyped the accent in a single occurrence of the word, which would be tough to spot.

Here are some examples:


I've described what I see as the benefits of doing this. My question is, is this a "best practice"?
Or at least an "okay practice"? What are the downsides?

One that I realized recently is that, of course, this will produce collisions between my desired definitions for words that are the same up to accents. For example, in mathematics we use the words French words étale and étalé (see here and here), and they would both want to be the definition of the macro \etale. Now, the former is used much more than the latter, so I would grant it the macro to it, but that leaves the question of how to appropriately make a command for the latter. A starred version, maybe? A macro \etalee? Or, should I give up and actually remember how to accent things?

share|improve this question
I do what you do, but one nuisance I note is that in the document, I need to use {\Poincare} next word in order to get glue added before next word. But I live with that. –  Steven B. Segletes Apr 3 '13 at 15:28
I would tackle this at the editor level with whatever mechanism feels natural in your editor of choice (abbreviations, tab completion, spelling correction, etc.). And I would definitely use UTF-8 input and get rid of those pesky TeX accent macros. –  Marco Apr 3 '13 at 15:34
If you're using Emacs as your text editor, you can set the input method to TeX with C-x ENTER C-\ TeX and toggle back to regular input method with C-\. This will allow you to type It\=o and get Itō right there in your buffer which you can then save encoded as UTF-8. –  kahen Apr 3 '13 at 17:06
Side note: I can't get Markdown to format "C-\" as code (i.e. surrounded by backticks). Does anyone have any suggestions as to why that is? –  kahen Apr 3 '13 at 17:09
show 2 more comments

3 Answers

up vote 11 down vote accepted

It's very commendable trying to get accents right. A person's name should always be spelled in the original way, if the alphabet is the same. For original names using a different script, any internationally recognized transliteration system can be used.

It's sometimes hard to realize that Chebychev, Chebysheff, Chebyshov, Tchebychev, Tchebycheff, Tschebyschev or Tschebyscheff is one and the same person, that is Pafnuty Chebyshev (in a widely used transliteration system) or Pafnutij Čebyšev (in another system). (In Russian, with cyrillic alphabet, the name is Пафнутий Чебышев.)

Writing "Poincare", "Cech" or "Erdos" is quite common, but wrong. And it's not difficult to use the correct spellings: "Poincaré", "Čech" and "Erdős". (Correctly pronouncing the names is another matter.)

For your problem of not remembering the accents, using macros can be a solution. Note how I solve the "étale–étalé" problem with a *-variant.




\Poincare and \Erdos went to an \etale* party at \Cech's
with an \adele and an \etale as gifts. \Cech was happy.

Poincaré and Erdős went to an étalé party at Čech's
with an adèle and an étale as gifts. Čech was happy.

enter image description here

share|improve this answer
add comment

This might be a contrarian view, but I would give up and learn how to accent things. It's only a small number of keystrokes more to type Erd\H{o}s instead of \Erdos. It's also more portable since anyone with TeX will be able to copy-and-paste that code. If you're comfortable in the unicode world (and so is anyone to whom you would send the source code), use the unicode method and type Erdős.

The macro method breaks down with your étale/étalé. Either \etalee nor \etale* seem intuitive enough that I wouldn't be double-checking each one constantly.

Use text-expansion software (e.g., TextExpander or AutoHotKey) for saving keystrokes, and macros when parameters are involved.

share|improve this answer
+1 for unicode. You can slightly modify your native keyboard layout for this (Windows: MSKLC), Linux: xmodmap (e.g. here) as suggested in another question. One choice could be making AltGr+` a dead key for ``'s (AltGr is the right alt key on German keyboards, Ctrl+Alt may also work), plus shift for ´'s etc. Or replace these empty accents themselves by dead keys if you don't mind typing ´+space –  Tobias Kienzler Apr 4 '13 at 7:07
+1, thanks for your suggestion; even though I think I will continue using the macros, I will also try to get the hang of AutoHotKey and use it in addition. By the way, isn't the portability issue really applicable to all macros, not just avoid-the-accent macros? In fact, avoid-the-accent macros seem like the easiest case to resolve, since they take no arguments; the other person could just find-replace them in the document. –  Zev Chonoles Apr 5 '13 at 3:45
@Zev: true, any user-defined macros make code less portable. I guess I have an aversion to simple, zero-argument, zero-logic (NTTAWWT) macros that are used only to save keystrokes or pinky-finger gymnastics. I feel the possible obfuscation isn't worth the savings. –  Matthew Leingang Apr 5 '13 at 12:06
add comment

Not at all! Actually, using macros like that is not only just useful in case of accents, but it is beneficial for plain, simple words as well because you can put \index references there. In my master thesis (and book when later published) I had among several similar macros (for person names etc) the following macro:


So even if typing \linux saved me nothing compared to typing Linux when writing, it did save me enormously from avoiding to put \index{Linux} at least once on every page there Linux was mentioned, not to mention I did not have to worry about forgetting some.

A couple of related tips:

Use xspace to avoid Blahblah ... \linux. to turn into Blahblah ... Linux ..

According to http://www.tug.org/pipermail/texhax/2005-March/003736.html:

Usually there is no difference ... Therefore use \newcommand* unless the argument contains more than one paragraph.

share|improve this answer
+1 for xspace - \You could \also \renewcommand{\i}[1]{#1\index{#1}\xspace} to type \i{Linux} (if you really need a pointless i, use something else of course) which is \easier to \understand than many \such \commands for each \keyword. It's different if you know you may change your \i{mind} on which words are \i{keyword}s (or whether to use Cyrillic spelling) later on though... (But as this example already shows, plural forms à la \keyword{}s can become tedious...) –  Tobias Kienzler Apr 4 '13 at 7:20
@hlovdal: +1, thanks for pointing out another use of these macros - I wouldn't have thought of it! –  Zev Chonoles Apr 5 '13 at 3:36
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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