* Textfont in math-formulas?
[not found] <20050328194852.CB04012866@ronja.ntg.nl>
@ 2005-04-06 19:21 ` Kai Straube
2005-04-07 6:30 ` Eckhart Guthöhrlein
2005-04-07 8:55 ` Hans Hagen
0 siblings, 2 replies; 3+ messages in thread
From: Kai Straube @ 2005-04-06 19:21 UTC (permalink / raw)
Hi There,
I have a little problem with fonts in my document. I use the cm sans serif
font in my text and want to have this in the tex-formulas to, but it worked
not for me.
Simple example:
\enableregime[utf]
\setupoutput[pdf]
\mainlanguage[de]
\language[de]
\setuppapersize[A4]
\setupbodyfont[ss]
\starttext
Some text, we can read it without serifs. But the formula: $ \frac{1}{x-2} $
is not in the same font.
\stoptext
BTW is there another way to have units like g/(cm^3) as to set them as
tex-formula. I dont no if the module units do such things.
Thanks,
Kai
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Textfont in math-formulas?
2005-04-06 19:21 ` Textfont in math-formulas? Kai Straube
@ 2005-04-07 6:30 ` Eckhart Guthöhrlein
2005-04-07 8:55 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Eckhart Guthöhrlein @ 2005-04-07 6:30 UTC (permalink / raw)
On Wed, 06 Apr 2005 at 21:21:15+0200, Kai Straube wrote:
> BTW is there another way to have units like g/(cm^3) as to set them as
> tex-formula. I dont no if the module units do such things.
Yes, it does. Some examples are given in the beginners' manual and in
the module documentation you can produce with texexec --module
m-units.tex
--
Eckhart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Textfont in math-formulas?
2005-04-06 19:21 ` Textfont in math-formulas? Kai Straube
2005-04-07 6:30 ` Eckhart Guthöhrlein
@ 2005-04-07 8:55 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2005-04-07 8:55 UTC (permalink / raw)
Kai Straube wrote:
> I have a little problem with fonts in my document. I use the cm sans serif
> font in my text and want to have this in the tex-formulas to, but it worked
> not for me.
> Simple example:
>
> \enableregime[utf]
> \setupoutput[pdf]
> \mainlanguage[de]
> \language[de]
you can omit \language since you've already set the main language (after that
language is used for local language switching)
> \setuppapersize[A4]
> \setupbodyfont[ss]
>
> \starttext
> Some text, we can read it without serifs. But the formula: $ \frac{1}{x-2} $
> is not in the same font.
> \stoptext
for that you need a ss math font; in the simple case it could be made to work
but since in math characters can come from any of the (about) 4 math fonts you
would get inconsistent output. So, if you want to gamble, you may try this:
% define a typeface
\definetypeface [modern] [rm] [serif] [modern-base] [default]
\definetypeface [modern] [ss] [sans] [modern-base] [default]
\definetypeface [modern] [tt] [mono] [modern-base] [default]
\definetypeface [modern] [mm] [math] [modern-base] [default]
% overloaad a mapping
% \startfontclass[modern]
% \definefontsynonym [ComputerModernMath-Roman] [ComputerModernSans]
% \definefontsynonym [ComputerModernMath-Italic] [ComputerModernSans-Italic]
% \stopfontclass
\startfontclass[modern]
\definefontsynonym [MathRoman] [Sans]
\definefontsynonym [MathItalic] [SansItalic]
\stopfontclass
% initialize the typeface
\setupbodyfont[modern,ss]
\starttext
Some text, we can read it without serifs. But the formula: $ \frac{1}{x-2} $
is not in the same font.
\stoptext
you can put this in one of the dark corners of the wiki -)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-07 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20050328194852.CB04012866@ronja.ntg.nl>
2005-04-06 19:21 ` Textfont in math-formulas? Kai Straube
2005-04-07 6:30 ` Eckhart Guthöhrlein
2005-04-07 8:55 ` Hans Hagen
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).