# Multiple diacritics on one character

As linguistics student, I have to put more than one thing on a character every now and then. For example, I need to type ā̆. I thought I could simply do that by typing \={\u{a}}, but then the macron is placed above an empty space in front of the character.

How can I solve this? Thanks

P.S. I'm using MiKTeX 2.9, running on Windows 8; in case it might be of use.

-
Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – egreg Feb 8 '14 at 12:33
The covington package seems to do that. – Bernard Feb 8 '14 at 13:28
The problem looks well-defined to me; it is reproducible simply by wrapping documentclass{article}\begin{document} and \end{document} around the code posted. The character does not show well here in SO either, since web browsers are not good at using multiple diacritics. – Jukka K. Korpela Feb 8 '14 at 14:44

Using the tipa package, \textipa{\u=a} yields

-

I suggest you to use XeLaTeX with UTF-8 encoding and fontspec for direct character inputing. Charis SIL and Brill fonts are enhanced so as to handle diacritic stacking. SIL distributes an IPA keyboard which lets you enter diacritics or you can use the Characters Map in windows.

Here's a code sample with output.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Charis SIL}

\begin{document}

ẵ̊́ b̥̩̬̪

\end{document}


-
Gentium is a wonderful font for this purpose as well. It's beautiful (IMHO…) and has excellent support of diacritics. – Júda Ronén Feb 10 '14 at 21:33

This is well suited for a stack. Here, I set a \={} atop a \u{a}, such that the baseline of the former is 0.4pt above the nominal baseline. You may tweak that value, as I have done in the second combination, if you want separation between the diacritics.

Other diacritic combinations pose no problem, using the same technique.

\documentclass{article}
\usepackage{stackengine}
\begin{document}
\renewcommand\stacktype{L}
\stackon[0.4pt]{\u{a}}{\={}}\
\stackon[2pt]{\u{a}}{\={}}
\end{document}


If one wanted the macron on the bottom, the one would stack \u{} atop \={a}.

-
@mico, I thought I did, when the OP wrote "I need to type ā̆." The way it looks on my screen, the diacritics were overlapped. I will add an alternate solution, though. – Steven B. Segletes Feb 8 '14 at 22:27

Using @Bernard’s hint, I checked the covington package, and its documentation says: “LATEX doesn’t give you a convenient way to put two accents on the same letter” and introduces some macros for the purpose. There are special macros for combining acute, grave, or circumflex with macron, and a more general macro twoacc for combining two accents, with a peculiar syntax: “its arguments are in square brackets, not curly brackets, and are separated by |. The ﬁrst argument is the upper accent (only) and the second argument is the letter with the lower accent indicated.” So in your case you could use, after

\usepackage{covington}


the command

\twoacc[\=|\u{a}]


or have the accents differently nested with

\twoacc[\u|\={a}]


This works, but especially the first one does not give a very impressive result (the diacritics are too far from each other):

(In Latin grammars and dictionaries, the latter form seems to be more common, when indicating that a vowel may be either long or short. And the result for it looks actually better than in my old Latin books.)

The package is from year 2001, so there might be better tools for the purpose now.

-

Here is a better solution, though not perfect: il you compile with xelatex or lualatex and load the fontspecpackage, you can "nest" the accents command. The only restriction is that the corresponding character does exist in the font. If it doesn't exist a workaround is to use the analog commands for accents in mathmode (e.g. \u for text mode becomes \breve in mathmode. As math letter are set in italic by default, you also have to use the \mathrmcommand – unless you want to use italic.

Below is a code that demonstrates all this:

\documentclass[a4paper, 12pt] {article}%

\usepackage[no-math]{fontspec}%
\setmainfont{Heuristica}

\usepackage{fourier}
\usepackage{covington}

\begin{document}

\begin{tabular}{@{}cc}
Math mode: & Covington: \\[6pt]
$\breve{\bar{\mathrm a}}$ & \twoacc[\u|\={a}]
\end{tabular}\\[6pt]

With fontspec + Heuristica:\\[6pt]
\verb+\={\u a}+ work:\enspace \={\u a},\\
\verb+\~{\^a}+ and \verb+\~{\u a}+ work: \enspace\~{\^a},\ \~{\u a}\\
as well as \verb+ \^{\~ a}+ and \verb+\u{\~ a}+:\enspace \^{\~ a},\ \u{\~ a}.\\

\fontspec{Minion Pro}
With fontspec + Minion Pro:\\[6pt]
\verb+\={\u a}+ doesn’t work: \enspace \={\u a}\enspace,\\
\verb+\~{\^a}+ and \verb+\~{\u a}+ work:\enspace \~{\^a},\ \~{\u a}\\
but \verb+ \^{\~ a}+ and \verb+\u{\~ a}+ don’t:\enspace\^{\~ a}\enspace, \u{\~ a}~\enspace (the order matters)

\end{document}


-
A bit off topic. What quality are you referring to? – Manuel Feb 8 '14 at 22:57
It's because it is a little off topic that I added at the end of my answer. Concerning the quality, just look at the images in the other answers and compare with mine. I suppose I missed something. – Bernard Feb 8 '14 at 23:20
I just compiled mine with pdflatex, opened in Acrobat and took a snapshot of the zoomed in document. – CaringDev Feb 8 '14 at 23:30
OK. Didn't think of taking a snapshot after zooming. Thanks for the tip. – Bernard Feb 8 '14 at 23:47
I think the big images you see are (possibly) snapshots from large displays or (I think most of them) from MacBooks Retina. – Manuel Feb 9 '14 at 0:00