# Poor man's double acute accent

I want to typeset the double acute accent (also known as Hungarian umlaut, usually typeset with \H{}) in a font that does not have it. Is there an easy way to "fake" it with two single accents?

Minimial example:

\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[T1]{fontenc}
\newcommand*{\augie}[1]{\fontfamily{augie}\selectfont #1}
\begin{document}
\augie{Erdos Erd\'os Erd\H{o}s}
\end{document}


Result:

-

You can switch font just for the accent then back to the text font so get a real \H accent from another font, but as this font is quite stylized it might look better to do as you say and use two acute accents from this font, you could adjust the spacing a bit more, but this shows the two approaches;

\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[T1]{fontenc}
\def\fakeH{\rlap{\'{}\'{}}}
\newcommand*{\augie}[1]{\fontfamily{augie}\selectfont #1}
\begin{document}

\augie{Erdos Erd\'os  Erd\fakeH{o}s  Erd{\rmfamily\H{\augie o}}s}
\end{document}

-
Maybe something like \def\fakeH[1]{\rlap{\'{#1}\'{\phantom{#1}}} could get the vertical spacing closer to right? – Mikael Vejdemo-Johansson Mar 24 '12 at 22:44
Thanks a lot! Works like a charm! I really should reread the relevant part of TeXbook. – Boris Bukh Mar 24 '12 at 22:45
@MikaelVejdemo-Johansson unfortunately you can't do box operations like phantom inside the accent command you get ! Improper \setbox. error. – David Carlisle Mar 24 '12 at 22:52
Bummer. Oh well, it was worth an idea at least. :-) – Mikael Vejdemo-Johansson Mar 25 '12 at 8:30

Here's a macro that tries a precise calculation based on the height of the character

\newcommand\fH[1]{\sbox0{#1}\dimen0=\ht0 \advance\dimen0 -1ex
\sbox2{\'{}}\sbox2{\raise\dimen0\box2}%
{\ooalign{\hidewidth\kern.1em\copy2\kern-.5\wd2\box2\hidewidth\cr\box0\crcr}}}


and the result of

Erd\fH{o}s

Erd\H{o}s

\fontfamily{augie}\selectfont

Erd\fH{o}s

Erd\'{o}s


Perhaps it's better to use \kern-.5\wd2 for the augie font

-

Defining new accents is difficult to get right. There is a package (not on ctan) described in http://www.eutypon.gr/eutypon/pdf/e2000-05/e05-a04.pdf which you can try. The package can be found at https://github.com/zellyn/accentbx.

    \makeaccent[options]<shifts>{accent-character}{main-character}

-