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
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
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
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
\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
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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Khaled Hosny
-
Patrick Gundlach