The eulervm package documentation indicates that one should use \mathbold instead of \mathbf to produce bold maths.

Could one write \renewcommand{\mathbf}{\mathbold}? What are the side effects?

  • Welcome to TeX.SE. Since these require a parameter, you'll need to use \let\mathbf\mathbold, or use letltxmacro. – Peter Grill Jul 12 '12 at 0:33
  • Thank you Peter for the answer. The renewcommand as I stated does work. I have tested it. I guess my question was more about the reason for introducing \mathbold. I am no expert on fonts in LaTeX. – Pierre Jul 12 '12 at 0:59
  • 1
    @PeterGrill The \renewcommand method is perfectly good; why shouldn't it be? There's no requirement that a renewed command should have the same number of arguments as the original. – egreg Jul 12 '12 at 8:53
  • @egreg: I realize that it works in this case, but I find is confusing that then you have a definition as \renewcommand{\foo}{} which sort of implies there are no parameters, but needs to be used as \foo{}. Using \renewcommand{\foo}[1]{#1} clarifies that. Also using the let syntax it is not confusing as then just a new name is being redefined. I prefer to make the intent clearer even if it requires more characters to minimize any potential confusion – Peter Grill Jul 12 '12 at 17:07
  • @PeterGrill The two commands don't take arguments! It may be confusing, but it's really the best way to cope with this problem. – egreg Jul 12 '12 at 17:34

The standard definition for \mathbf is


This has the effect that math symbols declared as \mathalpha (essentially Latin letters, uppercase Greek letters, digits and accents) that happen to be in the argument of \mathbf are typeset from the stated font.

The eulervm package uses a different font for bold:


and also redeclares many symbols (for instance, also lowercase Greek letter are allowed in the argument of \mathbold).

Since the effect of \mathbold is different from \mathbf it's a good decision to use a different name. However


is perfectly safe. What happens is that when TeX sees \mathbf it replaces it by \mathbold and then proceeds to look for the arguments to \mathbold. (Actually, as Werner showed, there's no argument to \mathbold, but this is immaterial.)

With this redefinition you lose the original meaning of \mathbf, but using eulervm it doesn't seem to be important. Would you keep it for some reason, it's better to say


before redefining \mathbf.


Yes you can write \renewcommand{\mathbf}{\mathbold}. Why? Let's look at the definitions of both (using a definition of \pshow from The definitions of LaTeX commands on the UK TeX FAQ):

\def\pshow#1{{\let\protect\show #1}}% http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ltxcmds
\usepackage{eulervm}% http://ctan.org/pkg/eulervm
Dummy text.

yields in the .log:

> \mathbf =macro:
->\select@group \mathbf  \M@OT1 \OT1/cmr/bx/n .
\mathbf ->\protect \mathbf  

l.3 \pshow\mathbf

Package: eulervm 2005/01/11 v4.0 (WaS)
> \mathbold =macro:
->\select@group \mathbold  \M@U \U/zeur/b/n .
\mathbold ->\protect \mathbold  

l.5 \pshow\mathbold

> \select@group=macro:
#1#2#3#4->\ifx \math@bgroup \bgroup \else \relax \expandafter \@firstofone \fi 
{\ifmmode \ifnum \csname c@mv@\math@version \endcsname <\sixt@@n \begingroup \e
scapechar \m@ne \getanddefine@fonts {\csname c@mv@\math@version \endcsname }#3\
globaldefs \@ne \math@fonts \endgroup \init@restore@version \xdef #1{\noexpand 
\use@mathgroup \noexpand #2{\number \csname c@mv@\math@version \endcsname }}\gl
obal \advance \csname c@mv@\math@version \endcsname \@ne \else \let #1\relax \@
latex@error {Too many math alphabets used in version \math@version }\@eha \fi \
else \expandafter \non@alpherr \fi #1{#4}}.
l.7 \show\select@group

Note that neither \mathbf nor \mathbold take an argument. There is a secondary macro called from both \mathbf and \mathbold that takes the argument supplied: \select@group. The first three arguments taken by \select@group is supplied within \mathbf and \mathbold, while the fourth is supplied additionally after each macro.

What are the side effects? You can't use the original definition of \mathbf. Some people circumvent this by using

\let\oldmathbf\mathbf% Store contents of \mathbf in \oldmathbf
\let\mathbf\mathbold% Rename \mathbf to \mathbold
  • 1
    The fact that \mathbf and \mathbold don't have arguments is irrelevant. With \renewcommand{\mathbf}{\mathbold} you just tell TeX to change the former into the latter when expanding macros; only after this replacement TeX will start looking for arguments to \mathbold (of which there aren't, but it's another matter). – egreg Jul 12 '12 at 8:55
  • @Werner Thanks for explaining how these commands work. – Pierre Jul 12 '12 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.