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:
\documentclass{article}
\usepackage[T5,T1]{fontenc}
\usepackage[utf8]{inputenc}
\DeclareTextSymbolDefault{\OHORN}{T5}
\DeclareTextSymbolDefault{\UHORN}{T5}
\DeclareTextSymbolDefault{\ohorn}{T5}
\DeclareTextSymbolDefault{\uhorn}{T5}
\begin{document}
\OHORN \ohorn \UHORN \uhorn
ƠơƯư
\end{document}
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
:
\documentclass{article}
\usepackage[T5,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[vietnam,english]{babel}
\begin{document}
\textviet{\OHORN \ohorn \UHORN \uhorn}
\textviet{ƠơƯư}
\end{document}
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 in t5enc.def
is
\DeclareTextSymbol{\OHORN}{T5}{204} % Ohorn
which is complemented in t5enc.dfu
(which is read by inputenc
) by
\DeclareUnicodeCharacter{01A0}{\OHORN} % LATIN CAPITAL LETTER O WITH HORN
There 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 say
{\fontencoding{T5}\selectfont\OHORN}
but 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 to babel
. 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.
Best Answer
Option
applemac
is the source of the problem. It seems (compiled on PC) that we can omit it. If not, follow the expalanation from the help message on error about options clash.