ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* typewriter text in formula
@ 2010-10-01 10:25 Patrick Gundlach
  2010-10-01 12:01 ` Khaled Hosny
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Gundlach @ 2010-10-01 10:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

how do I get typewriter text in formula?

I've tried:

\startformula
r =  \mono{foo}
\stopformula

but that gives mono from a different font. I'd like to have consolas, but it looks like courier new.

And a related question:

How do I get an underscore in this:

\startformula
r =  \mono{foo_i} looks wrong (I need the underscore) and \mono{foo\_i} fails
\stopformula


Patrick
-----


My setup:

\usetypescriptfile[type-consolas]
\definetypeface [mainface] [rm] [serif] [cambria]  [default]
\definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
\definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
\definetypeface [mainface] [mm] [math]  [cambria]  [default]

where type-consolas is this:

\unprotect
 \starttypescript [mono] [consolas] [name]      
   \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Mono]           [\s!file:consola]  [\s!features=\s!default]
        \definefontsynonym [\s!MonoBold]       [\s!file:consolab] [\s!features=\s!default]
        \definefontsynonym [\s!MonoItalic]     [\s!file:consolai] [\s!features=\s!default]
        \definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] [\s!features=\s!default]
    \stoptypescript
\protect


___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-10-01 21:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-01 10:25 typewriter text in formula Patrick Gundlach
2010-10-01 12:01 ` Khaled Hosny
2010-10-01 12:04   ` Patrick Gundlach
2010-10-01 12:19     ` Khaled Hosny
2010-10-01 12:29       ` Patrick Gundlach
2010-10-01 12:38       ` Patrick Gundlach
2010-10-01 20:58         ` Hans Hagen
2010-10-01 21:01           ` Patrick Gundlach

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).