4

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.

5
  • 1
    You need to load the amsmath package.
    – Mico
    Mar 13, 2015 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, 2015 at 22:14
  • @Mico I've imported it but it doesn't work... Jan 28 at 4:05
  • @Mico need to import usepackage bm also \usepackage{amsmath} % for \boldsymbol macro \usepackage{bm} % for \bm macro Jan 28 at 4:07
  • @CharlieParker - Please re-read the original posting and then my comment. The original posting contained a \boldsymbol directive -- which "did not work" -- and, importantly, it did not contain a \bm directive. The only non-bizarre way my comment can be construed is that it addresses the OP's complaint by pointing out that it's necessary to load the amsmath package in order to get to use the \boldsymbol directive. Since there was no \bm directive in the OP's code, I saw no need to further point out that it would be necessary to load the bm package in order to activate \bm.
    – Mico
    Jan 28 at 4:12

1 Answer 1

3

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

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

$\bm{\beta} = (\beta_1,\beta_2,\dots,\beta_n)$
\end{document}
4
  • The manual of amsbsy (loaded by amsmath and providing \boldsymbol) recommends using \bm instead of \boldsymbol.
    – egreg
    Mar 13, 2015 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, 2015 at 6:48
  • I've imported it but it doesn't work... Jan 28 at 4:05
  • @CharlieParker - Please clarify your comment. In particular, what does the first instance of "it" refer to?
    – Mico
    Jan 28 at 4:21

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.