So I notice that the spacing between \nabla
and f
in math mode when using mtpro2 is really wide (for me, at least). Here is the result of typing \nabla f
with mtpro2.
I wonder if there is a way we can adjust the symbol \nabla
based on the next non-space letter, say:
- If the next non-space letter is
f
, then execute\kern -0.2 em f
, - else, stay at usual.
I have been looking around, but could not find a satisfying solution. Any help
is highly appreciated.
Best Answer
Here's a LuaLaTeX-based solution. It sets up a Lua function called
nabla_f
that does most of the work, and it assigns this function to theprocess_input_buffer
callback, making it operate on all inputs before TeX starts is usual processing.Addendum: If you also want to change the amount of whitespace between
\partial
andf
, while keeping the instruction to change the distance between\nabla
andf
, I suggest you replacewith
Of course, you can (and should) change the new instance of
-4mu
to whatever the optimal adjustment amount may be.