16

If I have a line of text, how do I make just the first word bold?

I tried this:

\bf{NTn} = Number of lines

but it made the entire line bold.

Werner
  • 603,163
ngramsky
  • 2,363

3 Answers3

17

You should not use \bf. Instead use {\bfseries ....}.

\documentclass{article}
\usepackage{amsmath}
\begin{document}


{\bfseries NTn} = Number of lines

$\mathbf{NTn} + \boldsymbol{\pi} + \pmb{\pi} $ = Number of lines.

\verb|\boldsymbol| and \verb|\pmb| are provided by \verb|amsmath| package. Note that \verb|\mathbf| has no effect on symbols like $+$ or $-$ or $\pi$ etc.

\end{document}

enter image description here

However, it is better to use \bm from bm package for such needs which gives correct results.

11

For regular, bold and italics math, use the bm package:

enter image description here

\documentclass{article}
\usepackage{bm}% http://ctan.org/pkg/bm
\begin{document}
$NTn=\bm{NTn}=\mbox{Number of lines}$
\end{document}
Werner
  • 603,163
7

this works for me

\textbf{BOLD}