For Pinyin (Chinese romanization), I like very much the look of the font TeXGyreTermes-Regular that is installed with my TeX system.

However, it seems to be missing a single Pinyin symbol that I need: ǖ ([U+01d6]). Neither within TeX nor standard word processors does this character appear.

Does anyone know if there is a way to remedy this, other than by using another font?

(OP added the following as a suggested edit to Villemoes' answer. I moved it to the question instead. —Caramdir)

Back after a bit of a delay; thanks very much for your help.

First, I've tried your code in LaTeX and it works just fine for ǖ, though it seems some of the other vowels-with-diacritic will also need to be specified the way you have ǖ. As it is, they generate inputenc errors.

Second, as for the difference between ǖ and the other vowels with macron, here is what I show: adding


to your code, the macron is fine: macron over ǔ and a The problem I originally had, attempting \={ü} in XeLaTex but without your additions, was that the macron looked like this: enter image description here

Third: More troubling, however, is that your code doesn't seem to work under XeLaTeX, which is what I am using to have fullest support for Chinese script. It may simply be less work to stay with Times New Roman, as nice as Termes looks.

Thanks again for your help.

  • 1
    Are you using \usepackage[T1]{fontenc} and \usepackage[utf8x]{inputenc}? – Seamus Mar 3 '11 at 16:59
  • I am using XeLaTeX, which has the most complete support I've seen for Chinese. The following code appears: %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode `` \usepackage{xeCJK} \usepackage{fontspec,xltxtra,xunicode} – brannerchinese Mar 4 '11 at 2:50

At first: such missing accented chars can always be constructed if they don't exist, after all what you want is simply an ü with a bar above it.

The main problem is how to construct them. A look in xunicode.sty shows \= and \textdieresisoverline. As default they are mapped to the char U+01D6, but one can undeclare them and test what happens. Actually their result don't look good with your font, so I guess you will have to stick to something like the following \mybar





\setmainfont{TeX Gyre Termes}
\setsansfont{Times New Roman}
\setmonofont{Linux Libertine O}
 %Tex Gyre
direct: ^^^^01d6\\    
mybar: \mybar{ü}\\    
textdieresisoverline: \textdieresisoverline{u}\\
\textbackslash=: \={ü}

direct: ^^^^01d6\\    
mybar: \mybar{ü}\\    
textdieresisoverline: \textdieresisoverline{u}\\    
\textbackslash=: \={ü}

\ttfamily %Linux
direct: ^^^^01d6\\    
mybar: \mybar{ü}\\    
textdieresisoverline: \textdieresisoverline{u}\\    
\textbackslash=: \={ü}

  • Thanks for this. I intend to persist, since Gyre Termes is by far the most attractive typeface for my purposes. But it lacks not only ǖ but also the six graphs ǎ ě ǐ ǒ ǔ ǚ; using \v a etc fails to generate them, too. I find that running your code directly under XeLaTeX without any changes, \UndeclareUTFcomposite raises an "undefined control sequence" error. Are there packages I should be using in addition to fontspec? – brannerchinese Apr 10 '11 at 17:11
  • With packages \usepackage{fontspec,xltxtra,xunicode} it runs. Thanks. I'll continue my struggles. – brannerchinese Apr 10 '11 at 17:18
  • With an actual fontspec it is not necessary to load xltxtra or xunicode separatly. – Ulrike Fischer Apr 10 '11 at 18:10

You could construct it yourself by composing the macron accent with the glyph ü (according to Unicode, this is indeed a legal decomposition, even though the result might be slightly better had the font contained the glyph itself).

You can then use \DeclareUnicodeCharacter to tell LaTeX what to do when it encounters U+01D6.

I think hyphenation will be disabled in words containing this character, but I don't know if one even hyphenates Pinyin. In any case, you can always insert \- to manually allow hyphenations.






% This should give the desired output.
ü  ǖ 

  • I see. Thank you. That's very interesting. I can easily live without Pinyin hyphenation because of the way I am constructing this document. In any case, one can only insert a hyphen between intact syllables in Pinyin, so never before ü regardless of the tone. – brannerchinese Mar 4 '11 at 2:48
  • Now I have a much harder question. Given that the font contains the components of ǖ, is it possible to tell TeX to construct it precisely? I can construct it using \={ü}, but the macron overstrikes the umlaut; I can use \overline{ü}, but the overline doesn't really look quite like a macron. \bar{ü} doesn't print the macron because, I suppose, of the original problem that GyreTermes doesn't contain a character for ü with macron. Is there perhaps a more basic mechanical way to construct the character? – brannerchinese Mar 4 '11 at 2:48
  • I don't understand. Doesn't \={ü} produce precisely what you want? What do you mean by "the macron overstrikes the umlaut"? Does the ink overlap? When compiling the above, I get a macron whose vertical distance to the umlaut is about the same as the vertical distance from the umlaut to the top of the u. If this is not the glyph you want, could you post a link to an image of how it should look? – Villemoes Mar 4 '11 at 3:12
  • Btw, one of the points of the accent macros \", \=, \' etc. is that one can construct accented characters, even if a font does not contain these characters. Even if a font contains the glyph ö, \"o would not look for such a glyph, but simply combine a generic umlaut with the letter o. Of course, it is better to use the actual character if it exists. – Villemoes Mar 4 '11 at 3:17
  • @Villemoes: brannerchinese posted some comments about your answer as a suggested edit to your answer. I moved them to the question. – Caramdir Mar 27 '11 at 6:19

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.