# Bolding text generated by physics package

I would like to bold parts of my equation, but it seems \bm is incompatible with \pdv, and neither \boldsymbol nor \vectorbold (also from physics) can bold the operators; \boldmath doesn't work at all. I would like to be able to bold the whole first term. I can get \boldsymbol to bold a little bit more if it's not in the align environment.


\documentclass{beamer}

\usepackage{bm}
\usepackage{commath}
\usepackage{physics}
\usepackage{mathrsfs}

\begin{document}
\begin{frame}{My Example}
Differentiating $\mathcal{Q}(\bm{\tau})$ in respect to $\tau_t$:

\begin{align*}
\pdv{\mathcal{Q}(\bm{\tau})}{\tau_{t}} =   &\int_{0}^{1} \Bigg[ \alt<2>{\bm{q^*(p,\tau,w)}}{q^*(p,\tau,w)} \pdv{z^*(w)}{\tau_t} \enspace + \\
& \int_0^{z^*(w)} \pdv{\tilde{q}}{x}\dv{x}{\tau_t} \Bigg ] \, \dif{F(z)} \dif{F(w)}
\end{align*}
\end{frame}
\end{document}


• @Sebastiano yes. I should mention that. If you replace \bm with it nothing bolds. – M D Ricks May 6 at 20:40
• I have seen also derivative and diffcoeff packages but I have not seen that it is possibile to have bold symbols for the operator \partial. But is it important that you must necessary to use physics package? – Sebastiano May 6 at 20:41
• @Sebastiano No. Defining my own commands is the backup. Although I'm concerned whatever is making it not work in their package will affect me too. – M D Ricks May 6 at 20:49
• Please, can you give the green check mark to the user @Simon? – Sebastiano May 9 at 22:15

I would like to point out that you can change the font of \partial and d with the derivative package using the option style-inf=<font>

\documentclass{article}

\usepackage{amsmath}
\usepackage{bm} % pdflatex

%\usepackage{unicode-math} % lualatex or xelatex

\usepackage{derivative}

\derivset{\pdv}[style-inf=\bm]  % pdflatex
\derivset{\odv}[style-inf=\bm]  % pdflatex
%\derivset{\pdv}[style-inf=\symbf]  % lualatex or xelatex
%\derivset{\odv}[style-inf=\symbf]  % lualatex or xelatex

\begin{document}
$$\pdv{ f(x,y,z) }{ x, y, z } \quad \odv{ f(x) }{ x }$$
\end{document}


If you want upright bold d, then you should use \RenewOdvVariant{\odv}{\bm{\mathrm{d}}} with pdflatex instead of \derivvset, because \derivset{\odv}[style-inf=\bm\mathrm] will throw an error.

• Very good. I have not read very well the documentation. +1 surely. – Sebastiano May 9 at 11:27

The diffcoeff package also allows the easy use of a bold \partial or d. You will need names for them, say ob for ordinary-derivative-bold, and pb for partial-derivative-bold:

\documentclass{article}
\usepackage{bm}
\usepackage{diffcoeff}
\diffdef{ob}{ op-symbol = \bm{ \mathrm{d}} }
\diffdef{pb}{ op-symbol = \bm{\partial} }
\begin{document}
$\diff.ob.{\mathcal{Q}(\bm{\tau})}{\tau_{t}}\qquad \diff.pb.{\mathcal{Q}(\bm{\tau})}{\tau_{t}}$
\end{document}


If you don't want to write \diff.ob. and \diff.pb. all the time, follow the \diffdef commands in the preamble with

\newcommand{\ob}{\diff.ob.}
\newcommand{\pb}{\diff.pb.}


or some other names of your choosing. You can then replace the \diff.ob. with \ob and \diff.pb. with \pb.

I will use the classic \frac instead of the packages physics, diffcoeff, derivative.

\documentclass[a4paper,12pt]{beamer}
\usepackage{mathtools,amssymb}
\usepackage{bm}

\begin{document}
$\mathcal{Q}(\bm{\tau})=\frac{{\bm\partial}z^*(w)}{{\bm\partial}\tau_t}\frac{{\bm d}x}{{\bm d}t}$
\end{document}