With this code:

$\frac{\left(\ffrac{\partial \left[\frac{P}{T}\right]}{\partialV}\right)_T
V}{\partial T}\right)_V}$

And where:

\newcommand{\ffrac}[2]{\ensuremath{\frac{\displaystyle #1}{\displaystyle#2}}}

I get this:

enter image description here

There are three problems:

1) The parentheses around the outermost numerator don't match the contents.

2) The variables are too close to the division bars.

3) I'd prefer the subscripts be closer to the parentheses.

How do I clean these up, in that order of priority?

I'm using the \ffrac code (from Fractions with large elements) to increase the display size; but reverting to the standard \frac command doesn't change any of the problems I've described.

2 Answers 2


I suggest using the esdiff package, which simplifies typing of partial derivatives, and replacing the parentheses in the numerator with a pmatrix environment.

I added a variant to have the column vector in medium size (~80% of \displaystyle). The medsize environment is defined in the nccmath package:

\usepackage{esdiff, nccmath}


  {\aboverulesep=-1.5pt\belowrulesep=0.5pt$\displaystyle \frac{\begin{pmatrix}\diffp{\begin{bmatrix}
      P\\\cmidrule(lr){1-1} T
    \end{bmatrix}}{V}\end{pmatrix}_{\!\!\! T}}{ \diffp*{V}{T}{V}}
    \qquad{\cmidrulekern = 0.4em
    \end{bmatrix}\end{medsize}}{V}\end{pmatrix}_{\!\!\! T}}{ \diffp*{V}{T}{V}}} $}%


enter image description here

  • Thanks @Bernard. The problem with the matrix form is that it lacks a division bar between the P and the T.
    – theorist
    Jan 19, 2019 at 1:06
  • @theorist. I hadn't noticed this division bar. Please see if my updated answer is what you want (uses booktabs).
    – Bernard
    Jan 19, 2019 at 1:30
  • Thanks again @Berard. That does answer my question about how to fix the appearance, so pending the requisite waiting period for other answers I'll accept it. My one concern, however, is usability. I thought if I saw how it was done for this form, I could then easily apply to others, e.g., where I had ratios in both the numerator and denominator of the top term, or where I had, say, partial (1/T) in the denominator of the bottom term. But with this more complicated syntax, it might be too time consuming to typeset lot of different partials. [Continued....]
    – theorist
    Jan 19, 2019 at 2:40
  • ....Feel free to suggest that I post this as a separate question, but would there be a way to create a command, say \diffp2*, that would provide your typesetting, such that if you wanted the bottom term, you'd enter \diffp2*{V}{T}{V} (same construction as \diffp*), and if you wanted the top term you'd enter \diffp2*{P,T}{V}{T} (the {P,T} indicating a vertical fraction enclosed in square brackets)? Or if you wanted 1/T instead of P/T, you enter \diffp2*{1,T}{V}{T}. Then, to construct the whole example from my OP, you'd simply enter \frac{\diffp2*{P,T}{V}{T}}{\diffp2*{V}{T}{V}}.
    – theorist
    Jan 19, 2019 at 3:00

The best approach uses, I believe, only a single \frac expression and inline-fraction notation for both partial derivative terms as well as for the P/T term.

enter image description here

$\frac{(\partial(P/T)/\partial V)^{}_T}{%
       (\partial V/\partial T)^{}_V}$
  • Thanks @Mico. I do like the simple syntax, though my students are more used to seeing the formatting I showed in my OP, which may more easily allow one to keep track of all the variables when the expressions become more complicated. But it's nice to have another option. One problem I see is that the variables (other than the subscripts) and partial symbols should be vertically centered relative to the parentheses and solidi, but here they're instead top-justified.
    – theorist
    Jan 19, 2019 at 1:37

You must log in to answer this question.

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