Textfont in math-formulas?
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
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
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 -----------------------------------------------------------------
participants (3)
-
Eckhart Guthöhrlein
-
Hans Hagen
-
Kai Straube