Difference between revisions of "Bold Math"

From Wiki
Jump to navigation Jump to search
(copied from tweo ML posts)
 
(added MyWay#5 link)
Line 1: Line 1:
 
< [[Math]] | [[Fonts]] >
 
< [[Math]] | [[Fonts]] >
 +
 +
see [http://www.pragma-ade.com/general/magazines/mag-0005.pdf MyWay No.5 about "Mixed Normal and Bold Math"] by Pragma
 +
 +
----
  
 
David Munger wrote in [http://www.ntg.nl/pipermail/ntg-context/2004/005314.html this post] and [http://www.ntg.nl/pipermail/ntg-context/2004/005315.html its followup]:
 
David Munger wrote in [http://www.ntg.nl/pipermail/ntg-context/2004/005314.html this post] and [http://www.ntg.nl/pipermail/ntg-context/2004/005315.html its followup]:

Revision as of 12:15, 13 September 2004

< Math | Fonts >

see MyWay No.5 about "Mixed Normal and Bold Math" by Pragma


David Munger wrote in this post and its followup:

I've just found a little workaround for using boldsymbols. It works even with the nath module. It's probably not the best way of doing it, but since it does the trick for me, I guess it might useful to other ConTeXters.

\define[1]\boldsymbol{{\hbox{\formula{\bfm #1}}}}

When using nath, it doesn't work with inline formulae. So in that case, better use

\unprotect
\define[1]\boldsymbol{{\hbox{\o@dollar \bfm #1 \o@dollar}}}
\protect

I also have to:

\definebodyfont
  [17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
  [mm]
  [mrbf=cmbx10 sa 1,
   exbf=cmex10  sa 1,
   mibf=cmmib10 sa 1,
   sybf=cmbsy10 sa 1,
   mabf=msam10  sa 1]

\setupformulae[method=bold]

Then, I may define very handy commands like

\define\grad{\boldsymbol{\nabla}}
\define[1]\vec{\boldsymbol{#1}}
\define[1]\unitvec{\hat{\vec{#1}}}

and formulas like this typeset perfectly:

\[ \grad h = a \unitvec{n} \]