🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3866

Re: is tilde character broken?

#3866
From: Berthold K.P. Horn
Date: Mon, 28 Sep 1992 12:16
65 lines
2856 bytes
In article <kells.717577699@iis> kells@iis.ethz.ch (Kevin Kells) writes:


   Hi folks, sorry if this is a repeat question.

   I use TeX/LaTeX to create text with the Spanish n-tilde character
   (\~n).  When I use the PostScript Times-Roman font, the n-tilde doesn't
   look like an n with a little tilde over it; the tilde is printed
   larger-than-normal _inside_ the n instead of on top. 

   My assessment of the problem is that TeX expects the tilde character to
   be small and properly positioned for the corresponding "x" character
   in a given font. Apparently, the PostScript tilde is larger and centered
   and expects to be miniaturized and raised to form the tilde "accent"
   for the "x" character.

   Who is correct? How can I fix/hack this so that it works?

   Please e-mail and I'll post if there is enough interest.


plain TeX and LaTeX have hard-wired positions for accents based 
on where they are in Computer Modern.  Here is the relevant part of
plain.tex: 

\def\acute{\mathaccent"7013 }
\def\grave{\mathaccent"7012 }
\def\ddot{\mathaccent"707F }
\def\tilde{\mathaccent"707E }
\def\bar{\mathaccent"7016 }
\def\breve{\mathaccent"7015 }
\def\check{\mathaccent"7014 }
\def\hat{\mathaccent"705E }
\def\vec{\mathaccent"017E }
\def\dot{\mathaccent"705F }
\def\widetilde{\mathaccent"0365 }
\def\widehat{\mathaccent"0362 }

If you use fonts other than CM you have to redefine these macros, or
reencode these fonts to use the same encoding scheme as CM.

For example, if you use `texannew' encoding you'll want to use instead:

\def\acute{\mathaccent"70B4 }	% acute
\def\grave{\mathaccent"7060 }	% grave
\def\ddot{\mathaccent"70A8 }	% dieresis
\def\tilde{\mathaccent"7098 }	% tilde
\def\bar{\mathaccent"70AF }	% macron
\def\breve{\mathaccent"70C6 }	% breve
\def\check{\mathaccent"708D }	% caron
\def\hat{\mathaccent"7088 }	% circumflex
\def\dot{\mathaccent"70C7 }	% dotaccent

What is happening to you without this change is the result of the fact that
Computer Modern has the character `circumflex', a small raised glyph
suitable for us as an accent in the position where Type 1 fonts have
`asciicircum', a large glyph that sits on the baseline, as you discovered.
Similarly, CM text fonts have `tilde', where Type 1 fonts have 
`asciitilde'.

Read my diatribe on font encoding (:-) for more details.

Berthold K.P. Horn
Cambridge, Massachusetts, USA
Technical Details
Message-ID: <28487@life.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!mintaka.lcs.mit.edu!ai-lab!kauai!bkph
References: <kells.717577699@iis>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!mintaka.lcs.mit.edu!ai-lab!kauai!bkph
From: bkph@kauai.ai.mit.edu (Berthold K.P. Horn)
Newsgroups: comp.lang.postscript
Subject: Re: is tilde character broken?
Message-ID: <28487@life.ai.mit.edu>
Date: 28 Sep 92 12:16:23 GMT
References: <kells.717577699@iis>
Sender: news@ai.mit.edu
Distribution: comp
Lines: 65
In-reply-to: kells@iis.ethz.ch's message of 27 Sep 92 07:08:19 GMT