3

"Crossed h" (ħ) is a letter used in phonetics, as well as in the Maltese language, and some Semitic transcriptions. I would like to be able to display it, both upright and in italics.

tipa provides this character as \textcrh. However, unlike some other TIPA symbols, it can't seem to be italicized.

Bonus points if there's a method that works even if the font changes (by overlaying a bar onto the normal h glyph, for example)!

MWE:

\documentclass{article}
\usepackage{tipa}

\begin{document}

\LARGE

a\ng{}a\textcrh{}a

{
\itshape
a\ng{}a\textcrh{}a
}

The Hebrew word for ``spirit'' is \emph{rua\textcrh}.

\end{document}

enter image description here

Draconis
  • 900
  • TIPA specifically doesn't include an italic font since there is no practical use for it in linguistics (that may be a matter of opinion for some.) Is a LuaLaTeX or XeLaTeX solution an option? – Alan Munn Jan 29 '19 at 18:41
  • Since 2018-12 LaTeX has \hwithstroke and \Hwithstroke for the Maltese letters (https://tex.stackexchange.com/q/460110/35864, https://www.latex-project.org/news/latex2e-news/ltnews29.pdf), but the italics look a bit ... off – moewe Jan 29 '19 at 18:42
  • @AlanMunn Sure, I'm willing to work with any TeX variant for this! – Draconis Jan 29 '19 at 18:43
  • @moewe Oh, perfect! That would make a good answer – Draconis Jan 29 '19 at 18:44
  • @marmot That does look correct, but including it in the middle of a word leads to ugly results (due to switching in and out of math mode). – Draconis Jan 29 '19 at 18:47
  • LaTeX also has the math symbol \hbar for the Planck constant, but I don't recommend it here. I mention it for completeness. – Davislor Apr 04 '21 at 14:02

3 Answers3

8

With either LuaLaTeX or XeLaTeX you can just type the letters directly into your source, and get italics the normal way:

\documentclass{article}
\usepackage{fontspec}
\usepackage{libertine}
\begin{document}

\LARGE

aŋaħa

{
\itshape
aŋaħa
}

The Hebrew word for ``spirit'' is \emph{ruaħ}.

\end{document}

output of code

Alan Munn
  • 218,180
2

You could “fix” \hwithstroke and \Hwithstroke, but beware that the parameters are font specific and these values are only good with Computer Modern.

\documentclass{article}
\usepackage[T1]{fontenc}

\makeatletter \DeclareTextCommand{\Hwithstroke}{T1} {% \hmode@bgroup \vphantom{H}% \sbox\z@{H}% \ooalign{% H\cr \hidewidth \kern\strip@pt\fontdimen1\font\dimexpr0.9em\relax % <---- added \vrule height \dimexpr 0.7\ht\z@+0.1ex\relax depth -0.7\ht\z@ width 0.8\wd\z@ \hidewidth\cr }% \egroup } \DeclareTextCommand{\hwithstroke}{T1} {% \hmode@bgroup \vphantom{h}% \sbox\z@{h}% \ooalign{% h\cr \kern\strip@pt\fontdimen1\font\dimexpr0.33333em\relax % <---- added \kern0.075\wd\z@ \vrule height \dimexpr 0.7\ht\z@+0.1ex\relax depth -0.7\ht\z@ width 0.4\wd\z@ \hidewidth\cr }% \egroup } \makeatother

\begin{document}

rua\hwithstroke

\textit{rua\hwithstroke} \textbf{rua\hwithstroke} \textbf{\textit{rua\hwithstroke}}

RUA\Hwithstroke

\textit{RUA\Hwithstroke} \textbf{RUA\Hwithstroke} \textbf{\textit{RUA\Hwithstroke}}

\end{document}

enter image description here

egreg
  • 1,121,712
1

Direct input is best, but you can use tipa commands for input, too.

With LuaLaTeX or XeLaTeX, you can use tipa commands with Unicode fonts if you use xunicode package instead of tipa.

crossed h

The tipa commands must be wrapped in a \textipa{} environemnt (e.g., \textipa{a\ng{}a\textcrh{}a}), and, as always, the font must contain the glyphs you want.

This method is double-handling, though. Direct input is recommended, if you have the keyboard overlay or a character-picker: aŋaħa aŋaħa aŋaħa.

Note that CMU Serif font does not have italic crossed-h.

MWE

\documentclass{article}
%\usepackage{tipa}

\usepackage{xcolor} \usepackage{fontspec} \setmainfont{Noto Serif} \newfontfamily\fipamain{Noto Serif}[Colour=blue] \newfontfamily\fipa{Noto Sans}[Colour=red] \newfontfamily\fipab{CMU Serif}

\providecommand\XeTeXpicfile{ROSS, grmmble:-)}% with luatex that means "pretending" to be xetex just while you load the package %https://tex.stackexchange.com/questions/357686/does-fontspec-no-longer-provide-the-textipa-command \usepackage{xunicode} \def\useTIPAfont{\fipamain}%https://tex.stackexchange.com/questions/358118/tipa-tone-bar-glyph-missing-with-xecjk

\begin{document}

\LARGE \textipa{a\ng{}a\textcrh{}a}

{ \itshape \textipa{a\ng{}a\textcrh{}a} }

The Hebrew word for ``spirit'' is \emph{\textipa{rua\textcrh}}.

\def\useTIPAfont{\fipa}

\textipa{a\ng{}a\textcrh{}a}

{ \itshape \textipa{a\ng{}a\textcrh{}a} }

The Hebrew word for ``spirit'' is \emph{\textipa{rua\textcrh}}.

\def\useTIPAfont{\fipab} Using CMU Serif: \textipa{a\ng{}a\textcrh{}a} { \itshape \textipa{a\ng{}a\textcrh{}a} }

\end{document}

Cicada
  • 10,129