1

I was trying to implement the Physics package, but the partial differential font is compiling to a smaller font compared to the other text. Can the physics partial differential font be scaled up to the same size as the regular fonts? Here is my code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}
\usepackage{physics}


\begin{document}

\begin{equation}
\dfrac{d\mathbf{P}_{T}}{dt} = {\begin{pmatrix}
  \dfrac{dx}{dt} \\[2.5ex]
\dfrac{dy}{dt} \\[2.5ex]
 \dfrac{dz}{dt}
\end{pmatrix}} ={\begin{pmatrix}
  \pdv{x}{\theta_{1}} \dfrac{d\theta_{1}}{dt}  +   \dfrac{dx}{dr_{2}} \dfrac{dr_{2}}{dt} + \dfrac{dx}{dr_{3}} \dfrac{dr_{3}}{dt}\\[2.5ex]
 \dfrac{dy}{d\theta_{1}} \dfrac{d\theta_{1}}{dt} +   \dfrac{dy}{dr_{2}} \dfrac{dr_{2}}{dt}  +  \dfrac{dy}{dr_{3}} \dfrac{dr_{3}}{dt} \\[2.5ex]
 0 \hspace{1.3cm} 0 \hspace{1.3cm} 0
\end{pmatrix}}
\end{equation}

\end{document}

After applying the first solution below, how to get all the terms to show up in the same size font? Here is my modified code based on the first solution below:

\begin{equation}
\mathbf{J}_{P_{T}}(\theta_{1},r_{2},r_{3}) = {\begin{pmatrix}
\displaystyle
  \pdv{x}{\theta_{1}} &   \pdv{x}{r_{2}} & \pdv{x}{r_{3}} \\[2.5ex]
\displaystyle
 \pdv{y}{\theta_{1}} &   \pdv{y}{r_{2}} & \pdv{y}{r_{3}} \\[2.5ex]
 0  & 0 & 0
\end{pmatrix}}
\end{equation}
Joe
  • 9,080

1 Answers1

6

You can use \displaystyle for each row.

\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}
\usepackage{physics}


\begin{document}

\begin{equation}
\dfrac{d\mathbf{P}_{T}}{dt} = \begin{pmatrix}
  \dfrac{dx}{dt} \\[2.5ex]
\dfrac{dy}{dt} \\[2.5ex]
 \dfrac{dz}{dt}
\end{pmatrix} =\begin{pmatrix}
\displaystyle
  \pdv{x}{\theta_{1}} \frac{d\theta_{1}}{dt}  +   \frac{dx}{dr_{2}} \frac{dr_{2}}{dt} + \frac{dx}{dr_{3}} \frac{dr_{3}}{dt}\\[2.5ex]
\displaystyle
 \frac{dy}{d\theta_{1}} \frac{d\theta_{1}}{dt} +   \frac{dy}{dr_{2}} \frac{dr_{2}}{dt}  +  \frac{dy}{dr_{3}} \frac{dr_{3}}{dt} \\[2.5ex]
 0 \hspace{1.3cm} 0 \hspace{1.3cm} 0
\end{pmatrix}
\end{equation}

\end{document}

enter image description here

You can also define your own dpdv that is displaystyle pdv.

\documentclass{article}
%\usepackage{amsmath}
%\usepackage{arydshln}
\usepackage{physics}
\DeclareDocumentCommand\dpdv{}{\displaystyle\partialderivative}

\begin{document}

\begin{equation}
\mathbf{J}_{P_{T}}(\theta_{1},r_{2},r_{3}) = {\begin{pmatrix}
  \dpdv{x}{\theta_{1}} &   \dpdv{x}{r_{2}} & \dpdv{x}{r_{3}} \\[2.5ex]
 \dpdv{y}{\theta_{1}} &   \dpdv{y}{r_{2}} & \dpdv{y}{r_{3}} \\[2.5ex]
 0  & 0 & 0
\end{pmatrix}}
\end{equation}

\end{document}

enter image description here