I am working on a linguistic topic and need to be able to describe phones with aspiration. As described in wikipedias article on Aspirated consonants there is a UTF8 character for the diacritic of aspiration, ʰ. But in latex it only appears as a question mark and it cannot be escaped with a slash. How do you write it?
2 Answers
I see three "correct" ways of doing this.
Using pdfLaTeX
tipa
, which is the standard package for IPA symbols, provides one solution for normal text mode and one to be used in the tipa
macro/environment (even though they both work in the surroundings they're not intended for as well):
Sometimes the input method is displayed in the form of Input1: xxx, Input2: yyy. In such cases Input1 indicates the one used in the normal text environment and Input2, the one used in the IPA environment.
The entry for superscript h looks like this:
(both quotes from the tipa
manual)
\documentclass{article}
% Either use the following setup for the Latin Modern fonts, or simply use the following line:
%\usepackage{tipa}
\usepackage[utf8]{inputenc} % encoding of your .tex source file
\usepackage{lmodern} % Latin Modern font, basically an improved Version of Computer Modern
\usepackage[T3,T1]{fontenc} % font encoding in the pdf output
\usepackage[noenc]{tipa} % noenc because we've already used fontenc
% This is based on Alan Munn's excellent advice for tipa and lmodern
% http://tex.stackexchange.com/a/37087/4012
\newcommand\tiparmdefault{cmr}
\renewcommand{\textipa}[1]{{\fontencoding{T3}\fontfamily{\tiparmdefault}\selectfont#1}}
\renewenvironment{IPA}{\fontencoding{T3}\fontfamily{\tiparmdefault}\selectfont}{}
\begin{document}
[k\textsuperscript{h}]% (For normal text mode)
\textipa{[k\super h]}% (For the \textipa macro)
\end{document}
Using XeLaTeX or LuaLaTeX
You can also stay away from tipa
altogether and input the Unicode glyphs directly. This suggests compilation with XeLaTeX or LuaLaTeX. Since Computer Modern / Latin Modern don't have the Unicode glyph ⟨ʰ⟩, you need to use a font that does, e.g. Linux Libertine or Junicode.
% compile with xelatex or lualatex
\documentclass{article}
\usepackage{fontspec}
% \setmainfont{Junicode}
\usepackage{libertine}
\begin{document}
[kʰ]
\end{document}
The correct way to do this is to use the package tipa
and use the \super
function to write the superscript h.
Example:
\documentclass{article}
\usepackage{tipa}
\begin{document}
The aspirated phone [k\super h]
\end{document}
produces:
-
-
@Werner Both are "correct" in their specific cases, see my answer. Commented Nov 15, 2012 at 5:39
-
So, according to the
tipa
manual, this solution is not correct, but it works nonetheless. Commented Nov 15, 2012 at 6:03