# How can I improve my partial derivative in latex?

I am writint notes with a lot of partial derivatives. When the function to be differentiated is long the variable am differentiating with respect to (say t),

\begin{equation*}
\pd[2]{}{t}
\end{equation*}


appears as a fraction of the differentiated function. I want to appear directly under the del symbol. Is this possible? Below is my 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*}


Secondly is there a way of reducing the space between text and the following equation? The space I get is too large.

• Note that mdwlist is very outdated; also enumitem is not compatible with enumerate and paralist. – egreg Dec 15 '15 at 23:53
• See also CTAN: Package cool – COntent-Oriented LaTeX for their \pderiv macro. – Mike Renfro Dec 16 '15 at 0:24

Like this image:

\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}


Just move the \pd{}{t} directly to the right of z. Also, as suggested by @egreg, there is no need for the mdwlist package. It's functionality is better achieved using the powerful enumitem package.

• Thanks a lot @AboAmmar,you have solved my problem and also thanks to all for your effort in looking at my problem and for the useful hints. Now I have a good reference in the cool package. – Zilore Mumba Dec 16 '15 at 5:49