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.

This is a follow up to this question.

How would the same look for the dot above? That is, what's the standard definition for \. ?

Or does somebody in the meantime know a better solution to the whole problem? (The funny thing is that the whole issue cropped up when switching to TeX Live 2011 from the version coming with Ubuntu 11.04. Flying accents used to work with that version together with fontspec.)

A minimal example:

\setmainfont{Garamond Premier Pro}
\.m ṁ

With texlive-2011, this gives two missing characters, while with the Ubuntu 11.04 version, the one with the flying accent appeared correctly. I am aware that the Ubuntu 11.04 version of fontspec did not pull in xunicode, but there I included it separately, so the problem should have nothing to do with this.

share|improve this question
Would you pleas add a minimal example? It's quite strange: what font are you using? –  egreg Nov 23 '11 at 21:49
@egreg: Newer versions of fontspec load xunicode so it is quite possible that documents which didn't load xunicode before change. –  Ulrike Fischer Nov 24 '11 at 9:07
@UlrikeFischer That's why I asked for an example –  egreg Nov 24 '11 at 9:32
@HyperBoar: Please edit your question to include this. –  Martin Schröder Nov 24 '11 at 15:19
I have now included my minimal example in the question. –  HyperBoar Nov 25 '11 at 10:39
add comment

1 Answer

The standard definition depends on the font encoding: With OT1 and T1 it is an accent (you can find the definitions in OT1enc.def and T1enc.def). When you use a newer fontspec(which loads xuniode) and so EU1 (xelatex) or EU2 (lualatex) fontencoding the general definition of \. is that it is a "combining dot":

\DeclareEncodedCompositeCharacter{\UTFencname}{\.}{0307}{02D9}  % Combining dot above

Some special combinations are mapped to specific glyph. E.g. \.e is Unicode U+0117:


In theory is should be possible to rewrite the commands so that they check if the glyphs are available and use some fallback if not. In practice I doubt that it is sensible. It wouldn't help if you enter the glyphs directly instead of using accent commands, it would slow down compilation, it would mean a lot work to decide and implement sensible fallbacks in xunicode (and it would make xunicode much larger). If you want to use non-standard characters with xelatex the best is to use a font which has the glyphs. If a small number are missing add fallbacks based on the method suggested in the question you linked to.

Edit: Actually the question you linked to suggested to redefine \d with \renewcommand. This is not a good idea as it affects the definition of \d in other encodings too. One should always use one of the various encoding dependant declarations. In the example below you should compare the difference between using the \renewcommand and the \DeclareTextCommand line on the OT1-encoded part. To solve you actual problem you could try the \DeclareTextAccent line. If your font has the dot accent it should work.


\.C \.a, \.w \.W

\fontencoding{OT1}\selectfont  \.w

share|improve this answer
Sorry, but I do not understand how you mean. In ot1enc.def I find a declaration like \DeclareTextAccent{\.}{OT1}{95} (and a similar one in t1enc.def), which I cannot use directly, can I? I mean, if I add this line to my minimal example above, it doesn't change anything. –  HyperBoar Nov 24 '11 at 12:59
The declaration in ot1enc.def tells LaTeX how to handle \. when OT1-encoding is active. But with fontspec + xelatex you are using EU1-encoding. In this case you need declarations similar to those in xunicode. How the declaration should look exactly depends on the font (on the glyphs of the font). As I don't have your font I can't give you the details. –  Ulrike Fischer Nov 24 '11 at 13:23
Thanks for your help, but… would it not be much easier to define \. plainly as a command, just as \d in the question I linked? What would be the equivalent of that definition for \.? –  HyperBoar Nov 24 '11 at 20:04
Redefining such a command with renewcommand is not a good idea. It will break the command also for other encodings. You should use one of the encoding dependant commands. I have put an example above. –  Ulrike Fischer Nov 25 '11 at 8:38
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.