6

I’m writing a linguistics paper using the tipa package, and I need to put an acute accent mark (´) to show tone on top of a barred i (ɨ). If I use \'{\textbari} or textipa{\'1} I get a character with the accent mark on top of the tittle. However, I need it to remove the tittle. With a normal i, I could just write \'{\i} with a backslash in front of it to remove the tittle, but crucially, this doesn’t work for something like \textbari.

In short, I get , but I need .

Grateful for suggestions!

egreg
  • 1,121,712
Lundgren8
  • 199
  • 1
  • 7

2 Answers2

5

This seems quite enough for the standard sizes.

\documentclass{article}
\usepackage{tipa}
\usepackage{pict2e,picture}
\usepackage{color}

\makeatletter
\newcommand{\textdotlessbari}[1]{%
  \begingroup
  \settowidth\dimen@{\textbari}%
  \makebox[\dimen@]{%
    \sbox\z@{\i}%
    \begin{picture}(0,\ht\z@)
    \roundcap
    \linethickness{0.055ex}
    \put(0.05\wd\z@,0.55\ht\z@){\line(1,0){0.9\wd\z@}}
    \end{picture}%
    #1\i
  }%
  \endgroup
}
\DeclareRobustCommand{\textbariacute}{\textdotlessbari{\'}}
\DeclareRobustCommand{\textbarigrave}{\textdotlessbari{\`}}
\makeatother

\begin{document}

--\textbari--

--\textbariacute--

\leavevmode
\rlap{\textcolor{red}{\textbari}}\textbariacute
\rlap{\textcolor{red}{\textbariacute}}\textbari

\textbariacute\textbarigrave\textdotlessbari{\~}

\Huge
--\textbari--

--\textbariacute--

\leavevmode
\rlap{\textcolor{red}{\textbari}}\textbariacute
\rlap{\textcolor{red}{\textbariacute}}\textbari

\textbariacute\textbarigrave\textdotlessbari{\~}

\end{document}

The third line shows the characters superimposed to one another in different color and the differences are very small to be really noticeable.

enter image description here

egreg
  • 1,121,712
  • I have been using this answer in many papers, but if I wanted to make this available also with \large font size, how would I go about in defining that? – Lundgren8 Jul 09 '19 at 11:39
  • 1
    @Lundgren8 Fixed to work with every size. – egreg Jul 09 '19 at 11:50
  • Thanks, that works brilliantly! Is it possible to make this work in a section header? I think it would be very legible, but in theory I could also type out its phonetic definition as a title. – Lundgren8 Jul 17 '19 at 16:28
  • @Lundgren8 Doesn't it work in a section title? – egreg Jul 17 '19 at 20:08
  • Huh, that’s weird. It works when I isolate it in a new document, but within my own project I get ~32 error messages. It must clash with some other package or something. – Lundgren8 Jul 18 '19 at 06:57
  • @Lundgren8 Note that, as the code stands, only \textbariacute and \textbarigrave do not pose problems with section titles. If you're using \textdotlessbari, change \newcommand in \DeclareRobustCommand in its definition. – egreg Jul 18 '19 at 08:26
2

Use \rlap{-}\'\i or \leavevmode\rlap{-}\'\i if that symbol start a paragraph. Example:

\documentclass[12pt]{article}
\begin{document}
\leavevmode\rlap{-}\'\i p  ip  \rlap{-}\'\i p ip
\end{document}
Fran
  • 80,769