2

This question explains how to redefine the \emph command so that the text is bold. When mathematical text is included with emphasized text, I have been using the following solution:

\documentclass{report}
\usepackage{bm}

\DeclareTextFontCommand{\emph}{\bfseries}

\begin{document}

\noindent Here the mathematical text is not bold: \\

\noindent An \emph{$n$-dimensional chart} of a topological space $M$ is a pair
$(U,\mathbf{x})$,  where $U$ is an open subset of $M$ and $\mathbf{x}: M \supset U 
\to \mathbf{x}(U)\subset \mathbf{R}^n$ is a homeomorphism. \\

\noindent Here is the corrected version: \\

\noindent An \emph{$\bm{n}$-dimensional chart} of a topological space $M$ is a pair 
$(U,\mathbf{x})$, where $U$ is an open subset of $M$ and $\mathbf{x}: M \supset U \to 
\mathbf{x}(U)\subset \mathbf{R}^n$ is a homeomorphism. 

\end{document}

Output of MWE

My question is: how can you further redefine \emph so that mathematical text is automatically bold, using \bm?

2 Answers 2

3

Just add \boldmath:

\documentclass{report}

\DeclareTextFontCommand{\emph}{\boldmath\bfseries}

\begin{document}

Here the mathematical text is bold:

An \emph{$n$-dimensional chart} of a topological space $M$ is a pair $(U,\mathbf{x})$,
where $U$ is an open subset of $M$ and $\mathbf{x}: M \supset U \to \mathbf{x}(U)\subset
\mathbf{R}^n$ is a homeomorphism.

\end{document}

enter image description here

Now that you know how, please, refrain from using boldface for emphasis, particularly if you use mathematics in it.

You seem to have a habit of using \\ at the end of paragraphs: avoid it.

4
  • Why shouldn't you use boldface for emphasis? It's pretty common in differential geometry books. And I don't normally use \\ after paragraphs, just for this example. Commented Mar 21, 2015 at 20:45
  • 1
    @RandyRanderson It is too prominent; and when there is math in it, your readers could misunderstand symbols, particularly if you're using bold ones.
    – egreg
    Commented Mar 21, 2015 at 20:46
  • I didn't think about that, thanks for the tip. Commented Mar 21, 2015 at 20:47
  • Also, instead of repeatedly using \noindent you could just use \usepackage{parskip}
    – summer
    Commented Mar 22, 2015 at 13:43
3

You don't even need to load bm, provided \emph be used outside mathmode:

\documentclass{report}
\usepackage{bm}

\DeclareTextFontCommand{\emph}{\bfseries\boldmath}

\begin{document}

\noindent Here the mathematical text is bold: \\

\noindent An \emph{$n$-dimensional chart} of a topological space $M$ is a pair $(U,\mathbf{x})$,
where $U$ is an open subset of $M$ and $\mathbf{x}: M \supset U \to \mathbf{x}(U)\subset
\mathbf{R}^n$ is a homeomorphism. \\

\noindent To compare with the hand-made version: \\

\noindent An \emph{$\bm{n}$-dimensional chart} of a topological space $M$ is a pair $(U,\mathbf{x})$,
where $U$ is an open subset of $M$ and $\mathbf{x}: M \supset U \to \mathbf{x}(U)\subset
\mathbf{R}^n$ is a homeomorphism.

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .