3

I'd like to have two vowels with macrons where the line is continuous over both. That is, in the test example below, for the macron over the o and i to be unbroken. I've tried doing it with overline, but I ran into trouble making it match the other macra in the text.

\documentclass{article}

\begin{document}
Two macrons j\={o}\={\i}n\={e}d. 
\end{document}
alice19
  • 746

2 Answers2

2

You can kern the second character to the left until the two lines meet.

\documentclass{article}
\newcommand{\doublemacron}[2]{\={#1}\kern-.25pt\={#2}}
\newcommand{\oiMacron}{\doublemacron{o}{\i}}

\begin{document}
Two macrons j\oiMacron{}n\={e}d.
\end{document}

enter image description here

musarithmia
  • 12,463
1

Some low level macros:

\documentclass{article}

\newcommand{\lo}[1]{%
  \leavevmode\vbox{\offinterlineskip
    \ialign{%
      ##\cr
      \kern0.05em\leaders\hrule height .067ex\hfill\kern0.05em\cr
      \noalign{\kern0.3ex}
      #1\cr
    }%
  }%
}

\begin{document}

j\lo{o\i}n\=ed

J\lo{OI}N\=ED

\end{document}

enter image description here

A more advanced version, where one can manually specify the padding around the bar on the left and on the right, separately.

\documentclass{article}
\usepackage{xparse}

\NewDocumentCommand{\lo}{O{0.05em}mO{0.05em}}{%
  \leavevmode\vbox{\offinterlineskip
    \ialign{%
      ##\cr
      \kern#1\leaders\hrule height .067ex\hfill\kern#3\cr
      \noalign{\kern0.3ex}
      #2\cr
    }%
  }%
}

\begin{document}

j\lo{o\i}n\=ed

J\lo[0.15em]{OI}[0.05em]N\=ED

\end{document}

enter image description here

egreg
  • 1,121,712
  • hmmm. when you compare the rule over the two letters with the one over the "E", the relative difference in width becomes very obvious. leaving a little gap at the left edge, over the "O", might make it look more balanced. – barbara beeton Feb 23 '17 at 17:40
  • @barbarabeeton I don't think one can really find a general solution, so I added the possibility to modify the padding on either side. – egreg Feb 23 '17 at 18:14
  • good job. i like it. (and agree that the combination shown is just about impossible to do nicely.) – barbara beeton Feb 23 '17 at 19:07
  • Thanks for your help! Glad I picked such an awkward test case :) – alice19 Feb 24 '17 at 10:06