[NTG-context] keyboard style tilde

Matthias Weber matweber at indiana.edu
Tue Jul 19 04:25:36 CEST 2005


Hi Stuart,

I think what you get when you type ~ depends on the font you use. For 
instance, you can try
the plain TeX character access in Palatino:

\usetypescript [adobekb]   [ec]
\loadmapfile [context-base]
\usetypescript[palatino][\defaultencoding]
\setupbodyfont[palatino,12pt]

\def\mytilde{\char126\relax}

\starttext
  F \mytilde G
\stoptext

Computer Modern fonts have the ~ 'elevated', I don't know why.
You can lower it with

\lower.8ex\hbox{\mytilde}

to make the above example work with Computer Modern. Note that \mytilde
is different from \~.

(I don't know how to access \char126 more conveniently.)

What you actually might want to get is what is called the swung dash 
(which is somewhat longer
than the standard ~), but I am afraid
it doesn't exist in all fonts.
The proper way to go is probably via unicode, but again I'm a complete 
ignorant here.

In fact, I hope somebody with more insight tells us the clean ConTeXt 
solution,
please?

Matthias



On Jul 18, 2005, at 6:41 PM, Stuart Jansen wrote:

> How do I get a keyboard style tilde? As in:
> ~sjansen
> The tilde character is roughly aligned with the middle horizontal part
> of the s.
>
> \~ and \lettertilde produce a tilde that has been raised so that it can
> be used as an accent. I don't want that.
>
> -- 
> Stuart Jansen <sjansen at gurulabs.com>
> Guru Labs, L.C.
> _______________________________________________
> ntg-context mailing list
> ntg-context at ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context



More information about the ntg-context mailing list