[Tex/LaTex] Subscripts in partial derivatives

fractionsmath-mode

I would like to print the partial derivative operator $\frac{\partial}{\partial k_x}$, but the spacing and the length of the bar bug me a little. I would really like the fraction to be typeset as $\frac{\partial}{\partial k}$ (which has a shorter bar and the upper $\partial$ further to the left), with the subscript ${}_x$ added afterwards.

I'm definitely sure this is possible. What would be the quickest, cleanest way?

Best Answer

enter image description here

\documentclass{article}
\begin{document}


1 $\frac{\partial}{\partial k}$

2 $\frac{\partial}{\partial k_x}$


3 $\frac{\partial}{\partial k}_{\scriptscriptstyle x}$

4 $\frac{\partial}{\partial k_{\rlap{$\scriptscriptstyle x$}}}$


\end{document}