3

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.

2

1 Answer 1

4

Like this image:

enter image description here

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

1
  • 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. Dec 16, 2015 at 5:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .