[texhax] macron accent with EC font?

Heiko Oberdiek heiko.oberdiek at googlemail.com
Sat May 1 01:13:52 CEST 2010


On Fri, Apr 30, 2010 at 04:50:16PM -0600, D. R. Evans wrote:

> Heiko Oberdiek said the following at 04/30/2010 04:43 PM :
> > On Fri, Apr 30, 2010 at 04:08:25PM -0600, D. R. Evans wrote:
> > 
> >> I have a document that was originally designed to be used with Knuth fonts.
> >> In a few places, the text contains an "a" with a bar over it. This was
> >> achieved in the source, à la TeXbook p. 52, with the command: \=a.
> >>
> >> But I am now trying to set this document with Latin Modern, which is EC
> >> encoded (I _think_ it's the encoding that's causing the problem). The \=a
> >> command no longer does the right thing :-(
> > 
> > \documentclass{article}
> > \usepackage[T1]{fontenc}
> > \usepackage{lmodern}
> > \begin{document}
> > \=a
> > \end{document}
> > 
> 
> Thank you, but that's LaTeX. How do I accomplish what I need to do in TeX?

The position of the macron accent is different in OT1 and T1 encoding.
Either use the Latin Modern fonts in OT1 encoding (rm-lm* instead
of ec-lm*) or correct the accent macros in plain.tex for T1 encoding.

\def\`#1{{\accent0 #1}}
\def\'#1{{\accent1 #1}}
\def\v#1{{\accent7 #1}} \let\^^_=\v
\def\u#1{{\accent8 #1}} \let\^^S=\u
\def\=#1{{\accent9 #1}}
\def\^#1{{\accent2 #1}} \let\^^D=\^
\def\.#1{{\accent10 #1}}
\def\H#1{{\accent5 #1}}
\def\~#1{{\accent3 #1}}
\def\"#1{{\accent4 #1}}

\font\testec=ec-lmr10
\testec
\`a, \'a, \v a, \u a, \=a, \^a, \.a, \H a, \~a, \"a

\font\testlx=l7x-lmr10
\testlx
^^e2
\bye

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list