Sorry if the question is so trivial. I've just started using LaTeX couple of weeks ago and till now it's so new to me. I was trying to finish my name in a report where it's required to type a diacritic mark Horn in the document (something such as ư Ư or ơ Ơ). However, it seems not to be supported in LaTeX as I can find nearly all other accents such as grave, acute, circumflex here in Wiki but not this horn ư or Ơ, isn't it?
I've also refer to some methods that support Unicode characters but it seems a way too far. I just need a horn on a character u and o and that's all.
I'm using MiKTex 2.9 and Texmaker.
Best Answer
The horn accent is not available as a standalone glyph. However, as explained in the Comprehensive List of LaTeX Symbols, the four glyphs you need are available in the T5 encoding for Vietnamese.
You can access them with very easy definitions:
The direct input shown in the example is possible only if the
.tex
document is UTF-8 encoded. The input "by name" doesn't need it.If you need to typeset Vietnamese words, the simplest method is to add the Babel support for it to the document and segregate the words as arguments to
\textviet
:However you need a main font that supports the encoding. Other than Computer Modern, support is available with Latin Modern, all TeX Gyre fonts, and also the "Standard 35 Postscript" fonts.
Some words about
\DeclareTextSymbolDefault
. The definition of\OHORN
we find int5enc.def
iswhich is complemented in
t5enc.dfu
(which is read byinputenc
) byThere are similar definitions for the other three glyphs.
However, LaTeX can't do anything with
\OHORN
if the current encoding is not T5. A solution would be to saybut it's too complicated, so
\DeclareTextSymbolDefault{\OHORN}{T5}
comes to the rescue. It acts by just doing\OHORN
if the current encoding is T5,{\fontencoding{T5}\selectfont\OHORN}
otherwise.One always needs to load the output font encoding with
fontenc
.This loading is automatically performed if the
vietnam
is passed tobabel
. The command\textviet
will typeset its argument with the T5 encoding active. So what strategy is to be preferred depends on what's really needed in the document. If only the four glyphs are needed in some cases, probably the first one is more economic; if Vietnamese words are to be typeset, then the second method is preferable.