From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Automatic character replacements/substitutions
Date: Fri, 29 May 2015 02:55:30 +0200 [thread overview]
Message-ID: <5C91DC44-937F-442A-A55D-813AEDC5EE1E@gmail.com> (raw)
In-Reply-To: <CALBOmsYKhXCOnRsj+YvQGb28nTWofbyzHyudTRFk2OhtEHJWbQ@mail.gmail.com>
> Am 28.05.2015 um 21:39 schrieb Mojca Miklavec <mojca.miklavec.lists@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
___________________________________________________________________________________
next prev parent reply other threads:[~2015-05-29 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 19:39 Mojca Miklavec
2015-05-29 0:55 ` Wolfgang Schuster [this message]
2015-05-29 12:08 ` Mojca Miklavec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5C91DC44-937F-442A-A55D-813AEDC5EE1E@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).