[texhax] macron accent with EC font?

D. R. Evans doc.evans at gmail.com
Tue May 4 21:33:33 CEST 2010


Heiko Oberdiek said the following at 04/30/2010 05:13 PM :
> 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
> 

Thank you very much; that worked perfectly (as I'm sure you knew it would).

  Doc

-- 
Web:  http://www.sff.net/people/N7DR

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://tug.org/pipermail/texhax/attachments/20100504/97cbd312/attachment.bin>


More information about the texhax mailing list