* 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
* Re: typewriter text in formula
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
0 siblings, 1 reply; 8+ messages in thread
From: Khaled Hosny @ 2010-10-01 12:01 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Fri, Oct 01, 2010 at 12:25:54PM +0200, Patrick Gundlach wrote:
> 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.
You should get the math mono from the math font you are using (Cambria,
I guess) not from the text font.
--
Khaled Hosny
Arabic localiser and member of Arabeyes.org team
Free font developer
___________________________________________________________________________________
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
* Re: typewriter text in formula
2010-10-01 12:01 ` Khaled Hosny
@ 2010-10-01 12:04 ` Patrick Gundlach
2010-10-01 12:19 ` Khaled Hosny
0 siblings, 1 reply; 8+ messages in thread
From: Patrick Gundlach @ 2010-10-01 12:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
>> 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.
>
> You should get the math mono from the math font you are using (Cambria,
> I guess) not from the text font.
sorry to ask again, _how_ do I get the mono from the math font? (Yes, Cambria).
Patrick
___________________________________________________________________________________
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
* Re: typewriter text in formula
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
0 siblings, 2 replies; 8+ messages in thread
From: Khaled Hosny @ 2010-10-01 12:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Fri, Oct 01, 2010 at 02:04:09PM +0200, Patrick Gundlach wrote:
>
> >> 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.
> >
> > You should get the math mono from the math font you are using (Cambria,
> > I guess) not from the text font.
>
> sorry to ask again, _how_ do I get the mono from the math font? (Yes, Cambria).
\mono{}? which you are already using.
I tried the file below, and all the three r's are Cambria's, and the
last two are mono.
\setupbodyfont[cambria]
\starttext
\startformula
r=\mono{r}{\tt r}
\stopformula
\stoptext
--
Khaled Hosny
Arabic localiser and member of Arabeyes.org team
Free font developer
___________________________________________________________________________________
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
* Re: typewriter text in formula
2010-10-01 12:19 ` Khaled Hosny
@ 2010-10-01 12:29 ` Patrick Gundlach
2010-10-01 12:38 ` Patrick Gundlach
1 sibling, 0 replies; 8+ messages in thread
From: Patrick Gundlach @ 2010-10-01 12:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
>
> \mono{}? which you are already using.
> I tried the file below, and all the three r's are Cambria's, and the
> last two are mono.
>
> \setupbodyfont[cambria]
> \starttext
> \startformula
> r=\mono{r}{\tt r}
> \stopformula
> \stoptext
Thats what I get, too, but this is not what I want! This looks like Courier to me, but I want Consolas in the formula. See my original question.
Patrick
___________________________________________________________________________________
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
* Re: typewriter text in formula
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
1 sibling, 1 reply; 8+ messages in thread
From: Patrick Gundlach @ 2010-10-01 12:38 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi all,
> \setupbodyfont[cambria]
> \starttext
> \startformula
> r=\mono{r}{\tt r}
> \stopformula
> \stoptext
Mojca gave me the right hint to use \text{.....} around the text. And my other problem is solved as well (underscores).
Thanks!
___________________________________________________________________________________
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
* Re: typewriter text in formula
2010-10-01 12:38 ` Patrick Gundlach
@ 2010-10-01 20:58 ` Hans Hagen
2010-10-01 21:01 ` Patrick Gundlach
0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-10-01 20:58 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Patrick Gundlach
On 1-10-2010 2:38, Patrick Gundlach wrote:
> Hi all,
>
>
>> \setupbodyfont[cambria]
>> \starttext
>> \startformula
>> r=\mono{r}{\tt r}
>> \stopformula
>> \stoptext
>
> Mojca gave me the right hint to use \text{.....} around the text. And my other problem is solved as well (underscores).
fyi: there is a typewriter alphabet in math (unicode) but indeed in your
case you need \text in order to get more than the alphabet (and another
font).
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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).