# How do I input a 'bar' for a letter, say, d? [duplicate]

Just like the 'bar' in the reduced Planck constant, in physics people need to use the same 'bar' across differential sign $d$ to indicate a imperfect differential in, say, a quasi-static process. How do I type it? For example,

• With amsmath and \usepackage[T1]{fontenc}: $\text{\dj}$ (or $\text{\textit{\dj}}$ – probably a good idea to define a custom command…) – cgnieder Apr 18 '17 at 15:16

Here's one way, with a stack... which overlays a nonmath - upon a math d. It currently does not work in smaller math styles.
\documentclass{book}
$\bard Q = dU + P\, dV$