With the command \nabla_x f(x, y), I have

I think this is not aesthetic. Is there a way to get the subscript closer to the tip of nabla symbol? Something looks like

Thank you so much for your elaboration!
With the command \nabla_x f(x, y), I have

I think this is not aesthetic. Is there a way to get the subscript closer to the tip of nabla symbol? Something looks like

Thank you so much for your elaboration!
Define a new command that nudges in the subscript (when present).
\documentclass{article}
\usepackage{amsmath}
\NewDocumentCommand{\Nabla}{e{^}}{%
\nabla
\IfValueT{#1}{{!#1}}%
\IfValueT{#2}{^{#2}}%
}
\begin{document}
[
\Nabla_{x} f(x,y)
]
[
\Nabla f\quad \Nabla^{2} f \quad \Nabla^{2}_{x} f
]
\end{document}
Simply using \! a negative space.
\documentclass{article}
\usepackage{mathtools}
\begin{document}
[
\boldsymbol{\nabla}_{!x}^{2} f(x, y)
]
\end{document}
\mathscriptsmode4(or some other value). See section 7.5.7 in the luatex manual. – mickep Jan 04 '24 at 17:20\mathscriptmodein the luatex documentation. Do you mean\mathscriptcharmodeinstead? If so, what are the valid arguments, the corresponding table lists 0, 1, 2, and bizarrely 2, presumably the latter should be 3. 4 is not given as possible value. – Andrew Swann Jan 10 '24 at 08:20