# Thermodynamic partial derivatives

Does anyone have any ideas how to make this:

look like this:

The only difference is the differentials are "pushed over" making it appear more compact and readable. I achieved the first picture by using

\left. \frac{\partial U}{\partial S} \right|_{V,N} \mathrm{d} S


(first term only) but I don't know how to push the dS over the subscript more. Can this even be done?

I've tried \overset and using a custom fraction but neither look quite right.

-
Welcome to TeX.sx! –  texenthusiast Apr 18 at 20:39
You can insert negative math spaces such as \! before dS –  percusse Apr 18 at 20:43
Welcome to TeX.sx! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. –  Kurt Apr 18 at 20:49

\documentclass{article}
\usepackage{mathtools}
\begin{document}

$\left. \frac{\partial U}{\partial S} \right|_{\mathrlap{V,N}} \mathrm{d} S$

\end{document}

-
is it good practice to use mathtools instead of ams bunch ? –  texenthusiast Apr 18 at 20:33
That's exactly what I wanted! Thank-you! –  Kyle Mills Apr 18 at 20:33
@texenthusiast: it loads amsmath by default and fixes some bugs –  Herbert Apr 18 at 20:35
@Herbert, what kind of bugs? –  Sigur Apr 18 at 22:55
@Sigur: read the documentation –  Herbert Apr 19 at 5:21