> Am 28.05.2015 um 21:39 schrieb Mojca Miklavec 
> <mojca.miklavec.li...@gmail.com>:
> 
> Hi,
> 
> Can someone please help me remind how to automatically "replace" a
> Greek letter (gamma (γ) in particular, but I wouldn't mind if the
> whole alphabet would be replaced) with $\mathgreekupright γ$.
> 
> The OpenType font (Lucida) doesn't have Greek characters (except for
> maybe μ), but the math alphabets in the math font are complete, so I
> would like to automatically use the characters from the Greek math in
> main text (possibly upright math in upright text and italic math in
> italic text).
> 
> Of course I can always create a shortcut for $\mathgreekupright γ$ but
> it would be great if things like "γ rays" or "α particles" would be
> typeset "automatically“.


You can use the fallback mechanism for fonts but I don’t there are problems
(e.g. missing kerning) when you use the math font as fallback.

\definefallbackfamily [textmojca] [rm] [Gentium] 
[scale=1.15,range={greekandcoptic,greekextended}]
\definefontfamily     [textmojca] [rm] [Lucida Bright OT]
\definefontfamily     [textmojca] [mm] [Lucida Bright Math OT]

\definefallbackfamily [mathmojca] [rm] [Lucida Bright Math OT] 
[range=lowercasegreeknormal]
\definefontfamily     [mathmojca] [rm] [Lucida Bright OT]
\definefontfamily     [mathmojca] [mm] [Lucida Bright Math OT]

\starttext

\switchtobodyfont[textmojca]

\startlines
alpha: α
beta: β
gamma: γ
\stoplines

\switchtobodyfont[mathmojca]

\startlines
alpha: α
beta: β
gamma: γ
\stoplines

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to