I am new to Latex, please help me!

I would like to give a beta symbol with a sequence of values as below.

\boldsymbol{\beta} = (\beta_1,\beta_2,\dotsc,\beta_n)

output looks promising.

β = (β1, β2, , βn) (1)

But I get an error like

Undefined control sequence.
l.77 \boldsymbol
                {\beta} = (\beta_1,\beta_2,\dotsc,\beta_n)
The control sequence at the end of the top line
of your error message was never \def'ed.

Please help me to fix this.

  • 1
    You need to load the amsmath package. – Mico Mar 13 '15 at 22:14
  • 2
    (1) welcome, (2) always provide full minimal examples so we do not have to guess your preamble (3) load time the bm package and use \bm to mark the bold symbols – daleif Mar 13 '15 at 22:14

To use \boldsymbol (in math mode, of course), you need to load the amsmath package.

Alternatively, load the bm ("bold math") package and write \bm{\beta} (again in math mode, of course).

enter image description here

\usepackage{amsmath} % for \boldsymbol macro
\usepackage{bm}      % for \bm macro
$\boldsymbol{\beta} = (\beta_1,\beta_2,\dots,\beta_n)$

$\bm{\beta} = (\beta_1,\beta_2,\dots,\beta_n)$
  • The manual of amsbsy (loaded by amsmath and providing \boldsymbol) recommends using \bm instead of \boldsymbol. – egreg Mar 13 '15 at 22:27
  • @egreg - The manual of the amsmath package provides the same recommendation, while narrowing it a bit, by stating that the bm should be loaded and \bm be used if a user doesn't require the (many!) other facilities of the amsmath package. Of course, if bm is loaded after amsmath, the instruction \let\boldsymbol\bm is executed, and bm's bolding method is used whenever \boldsymbol is typed (as is the case in my MWE...). – Mico Mar 14 '15 at 6:48

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.