From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Font selection ranges
Date: Fri, 30 Sep 2011 10:33:32 +0200 [thread overview]
Message-ID: <021600EC-930D-4271-8CD6-C2E41BDEE0F7@googlemail.com> (raw)
In-Reply-To: <ABBCD27A-BC00-40F8-9C24-ABA80BB795A8@telia.com>
Am 29.09.2011 um 21:58 schrieb Hans Aberg:
> I want to define an environment for computer code including non-ASCII characters, using Xits or STIXGeneral except in the ASCII range, where some monospace font like Courier should be used.
>
> If I do:
> \setupbodyfont[xits,10pt]
> \definetyping[code]
> \setuptyping[code][margin=yes]
>
> \starttext
> \startcode
> for ∀i, j ∈ I
> do a(i, j) ≔ b(i, j)
> \stopcode
> \stoptext
>
> Then the math characters won't show. They will show using
> \setuptyping[code][style=normal,margin=yes]
> but then the ASCII range isn't monospace.
You can use the lines environment when you don’t need syntax highlighting:
\setupbodyfont[xits,10pt]
\definelines
[code]
[space=yes,
style=mono,
before=\startnarrower,
after=\stopnarrower]
\starttext \showframe
\startcode
for $∀$i, j $∈$ I
do a(i, j) $≔$ b(i, j)
\stopcode
\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:[~2011-09-30 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 19:58 Hans Aberg
2011-09-30 8:31 ` luigi scarso
2011-09-30 8:33 ` Wolfgang Schuster [this message]
2011-09-30 14:42 ` Khaled Hosny
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=021600EC-930D-4271-8CD6-C2E41BDEE0F7@googlemail.com \
--to=schuster.wolfgang@googlemail.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).