4

I want just the first argument in bold, but when i try to select just the first argument using the \bf command it modified the whole expression. This is what I had

\[
a = \frac12 \cdot \frac13 + \frac14  \\
\]

I just wanted \frac12 in bold so I used

\[
a = \bf{\frac12} \cdot \frac13 + \frac14  \\
\]

But this modified all the expression in bold.

Any clue how to solve this?

JuanMuñoz
  • 1,454

1 Answers1

6

\bf is deprecated since LaTeX2e. Now \bfseries should be used in text mode. Both are commands that never take an argument, they remain active until the end of the current group or overwritten by another font switch command.

In math mode there are other options. Here \mathbf will do:

\documentclass{article}
\begin{document}
\[ a = \mathbf{\frac12} \cdot \frac13 + \frac14 \]
\end{document}

Result

Heiko Oberdiek
  • 271,626
  • So what is the diference of using \textbf and \bfseries in text mode, besides the remaining of being active until the end of the current group? – JuanMuñoz Sep 16 '14 at 21:09
  • @JuanMuñoz \bfseries is the switch equivalent of \bf. If you want a limited bold face effect you plugin as an argument to \textbf{This text is bold.} This is not – percusse Sep 16 '14 at 21:56