Changes

Jump to navigation Jump to search
243 bytes removed ,  17:41, 17 February 2006
New hbox wrapping workaround
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 == Wrapping 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]: I've just found a little workaround for using boldsymbols. It works even with the [[Math with nath|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. <texcode>\define[1]\boldsymbol{{\hbox{\formula{\bfm #1}}}}</texcode> When using [[Math with nath|nath]], it doesn't work with inline formulae. So in that case, better use==
If the solution presented in that MyWay does not suit your needs, you can always use a \hbox wrapper, by defining something like this:
<texcode>
\definetypeface [boldmath] [mm] [boldmath] [latin-modern] [default]
\setupformulae[method=bold]
\unprotect
\definedef\boldsymbol@normal#1{\hbox{\formula[boldmath]{#1}}}\def\boldsymbol@inline{\boldsymbol@normal}\def\boldsymbol@script#1{\hbox{\formula[boldmath,script]{#1}}}\def\boldsymbol@scriptscript#1{\hbox{\formula[boldmath,scriptscript]{#1}}}\hboxdef\boldsymbol#1{% \mathchoice {\boldsymbol@normal{#1}}% {\oboldsymbol@dollar normal{#1}}% {\bfm boldsymbol@script{#1 }}% {\oboldsymbol@dollarscriptscript{#1}}}
\protect
</texcode>
I also have toThen you can get bold vectors<texcode>\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]</texcode> Then, I may define very handy commands like 
<texcode>
\define\grad{\boldsymbol{\nabla}}
\define[1]\vec{\boldsymbol{#1}}\define[1]\unitvec{{\hat{\vec{#1}}}}
</texcode>
<texcode>
\[ formula{\grad h \eta = a e^{\vec k \cdot \vec x} \unitvec{n} \]}
</texcode>
17

edits

Navigation menu