6

Because the beginning of the letter is moved a bit to the left when in italics mode, the breve also needs to move to the left,otherwise it is no longer under the letter.

\documentclass{article}
\usepackage{semtrans}
\begin{document}
Right position: \U{h}

Wrong position: \textit{\U{h}}
\end{document}

Sample output

Any ideas how to correctly use a breve with italics?

2
  • Do you really want to use that package? It dates back to 1998.
    – TeXnician
    Commented May 26, 2017 at 8:38
  • 1
    I am open to suggestions for better ways to create a breve under a letter.
    – arved
    Commented May 26, 2017 at 8:46

2 Answers 2

10

The package is old and the definition is missing a \ltx@sh@ft that helps correct such positioning. A more modern definition for the \U macro is

\newcommand*\U[1]{\oalign{#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
   \vbox to .2ex{\hbox{\u{}}\vss}\hidewidth}}

In your own file you will need to enclose this in a \makeatletter...\makeatother pair. If you are loading the semtrans package you will need to use \renewcommand* instead.

Sample output

\documentclass{article}
\usepackage{semtrans}

\makeatletter
\renewcommand*\U[1]{\oalign{#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
   \vbox to .2ex{\hbox{\u{}}\vss}\hidewidth}}
\makeatother

\begin{document}
Upright position: \U{h}

Italic position: \textit{\U{h}}
\end{document}

The above is modelled on the definition of the \b accent defined in the LaTeX kernel, namely:

\DeclareTextCommand{\b}{OT1}[1]
   {\hmode@bgroup\o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
     \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}\egroup}

You could thus mimic this completely and use

\makeatletter
\DeclareTextCommand{\U}{OT1}[1]
  {\hmode@bgroup\o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
  \vbox to.2ex{\hbox{\u{}}\vss}\hidewidth}\egroup}
\makeatother
5

The simplest way these days is probably to use xelatex (used for the image here) or lualatex.

enter image description here

\documentclass{article}

\usepackage{fontspec}

\begin{document}

zzz ḫ

\textit{zzz ḫ}

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .