15

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.

16

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.

  • Thanks, but what if I need to bold the following: $NT_n$ ? {\bfseries $NT_n$} doesn't work..... – ngramsky May 16 '12 at 5:16
  • 1
    @ngramsky, for math mode, use `\mathbf{e^{j\pi}=-1}'. – Ali Mehrizi May 16 '12 at 5:22
  • For bolding math you can use \boldmath, \boldsymbol or \pmb. For mor details see here – adn May 16 '12 at 5:23
  • @ngramsky: see the edited answer. – user11232 May 16 '12 at 5:29
  • 1
    @HarishKumar I stumbled upon this answer and find it very wrong. For instance \boldmath works just by chance and throws warnings; \boldsymbol is deprecated and \bm (from the bm package) should be used. – egreg Nov 2 '14 at 10:14
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}
6

this works for me

\textbf{BOLD}
  • This answer is very short and does not provide some new solution – user31729 Nov 2 '14 at 9:34
  • 3
    Actually, \textbf was only mentioned in comments. – lockstep Nov 2 '14 at 10:51

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.