[Tex/LaTex] How to boldify math equation and plain text simultaneously

boldmath-mode

We can boldify math equations using \mathbf{} and normal text using \textbf{}.

Suppose I want to boldify a line which contains both normal text and mathematical part simultaneously using a single command. Is it possible?

Let us consider the following example:

                          Since $s=9, s*s$ becomes 81

I have to do as follows

             \textbf{Since} $\mathbf{s=9, s*s}$ \textbf{becomes} 81

Instead of this, is there any newtag, that make whole text bold?

Best Answer

Yo can apply \boldmath:

enter image description here

Surrounding it with {...} limits the scope to be just within the curly braces so subsequent text is not effected.

Notes:

  • As per egreg's suggestion I have replaced $s=9, s*s$ with $s=9$, $s*s$. The , is not really part of the math, thus, it should be outside. This yields better spacing.

Code:

\documentclass{article}
\begin{document}
Since $s=9$, $s*s$ becomes 81

{\bfseries\boldmath Since $s=9$, $s*s$ becomes 81}

Since $s=9$, $s*s$ becomes 81

\end{document}
Related Question