Changes

Jump to navigation Jump to search
655 bytes added ,  06:39, 4 June 2007
→‎An Alternate Definition: An improved definition
An alternate way to define <cmd>boldsymbol</cmd> is
<texcodecontext source="yes">\definetypeface [boldmath] [mm] [boldmath] [latin-modern] [modern] [encoding=texnansi] \unprotect
\def\boldsymbol#1%
{\preparebinrel{#1}% \currentbinrel {\mathchoice {\hbox{\switchtoformulabodyfont [boldmath]$\m@th#1$}} {\hbox{\switchtoformulabodyfont [boldmath]$\m@th#1$}} {\hbox{\switchtoformulabodyfont [boldmath,script]$\m@th#1$}} {\hbox{\switchtoformulabodyfont[boldmath,scriptscript]$\m@th#1$}}}}</texcode>\protect
This % The previous example again\def\grad{\boldsymbol{\mathop{\nabla}}}% The correct way to define this is slightly more efficient than % \def\grad{\mathop{\boldsymbol{\nabla}}}% The former is used just to show that \boldsymbol gives the first version.correct% spacing for mathop\def\vec{\boldsymbol}\def\unitvec#1{{\hat{\vec{#1}}}}
$\grad \eta = e^{\vec k \cdot \vec x} \unitvec{n}$
</context>
The <cmd>preparebinrel</cmd> and <cmd>currentbinrel</cmd> ensure that the correct spacing is used around the symbol.
This is slightly more efficient than the first version.
== Mixing Math Fonts ==

Navigation menu