我尝试实现物理包,但与其他文本相比,偏微分字体编译后的字体较小。物理偏微分字体可以放大到与常规字体相同的大小吗?这是我的代码:
\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}
应用下面的第一个解决方案后,如何让所有术语以相同大小的字体显示?这是我根据以下第一个解决方案修改的代码:
\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}
答案1
您可以\displaystyle
对每一行使用。
\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}
您还可以定义自己的dpdv
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}