我正在写很多偏导数的笔记。当要微分的函数很长时,变量是相对于(比如说 t)进行微分的,
\begin{equation*}
\pd[2]{}{t}
\end{equation*}
作为微分函数的分数出现。我想直接出现在 del 符号下。这可能吗?下面是我的 mwe。
\documentclass[b5paper,11pt,fleqn,leqno,parskip=full]{article}
\usepackage[margin=1in]{geometry}
\usepackage{enumerate,mdwlist}
\usepackage{enumitem}
\usepackage{amsmath,amssymb,amsthm} %[fleqn]
\usepackage{paralist} % for 'inparaenum' environment\newcommand{\dist}{\displaystyle}
\usepackage{enumitem}
\makeatletter
\DeclareRobustCommand{\pder}[1]{%
\@ifnextchar\bgroup{\@pder{#1}}{\@pder{}{#1}}}
\newcommand{\@pder}[2]{\frac{\partial#1}{\partial#2}}
\makeatother
\newcommand{\pdev}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pdevII}[2]{\frac{\partial^2 #1}{\partial {#2}^2}}
\newcommand*{\pd}[3][]{\ensuremath{\frac{\partial^{#1} #2}{\partial #3}}}
\geometry{
a4paper,
total={210mm,297mm},
left=15mm,
right=15mm,
top=15mm,
bottom=16mm,
}
\begin{document}
\begin{equation*}
z^{2}\pd[2]{}{t}+z\pd{\left(\pd[2]{}{y}+\pd[2]{}{x}\right)}{t}
\end{equation*}
\end{document*}
其次,有没有办法减少文本和以下公式之间的空间?我得到的空间太大了。
答案1
就像这张图片一样:
\documentclass[b5paper,11pt,fleqn,leqno,parskip=full]{article}
\usepackage[margin=1in]{geometry}
\usepackage{enumerate,enumitem}
\usepackage{amsmath,amssymb,amsthm} %[fleqn]
\usepackage{paralist} % for 'inparaenum' environment\newcommand{\dist}{\displaystyle}
\usepackage{enumitem}
\makeatletter
\DeclareRobustCommand{\pder}[1]{%
\@ifnextchar\bgroup{\@pder{#1}}{\@pder{}{#1}}}
\newcommand{\@pder}[2]{\frac{\partial#1}{\partial#2}}
\makeatother
\newcommand{\pdev}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pdevII}[2]{\frac{\partial^2 #1}{\partial {#2}^2}}
\newcommand*{\pd}[3][]{\ensuremath{\frac{\partial^{#1} #2}{\partial #3}}}
\geometry{
a4paper,
total={210mm,297mm},
left=15mm,
right=15mm,
top=15mm,
bottom=16mm,
}
\begin{document}
\begin{equation*}
z^{2}\pd[2]{}{t}+z\pd{}{t}\left(\pd[2]{}{y}+\pd[2]{}{x}\right)
\end{equation*}
\end{document}
只需将\pd{}{t}
直接移到 的右侧z
即可。此外,正如 @egreg 所建议的,不需要该包。使用功能强大的包mdwlist
可以更好地实现其功能。enumitem