0

Here is a question that has long been bothering me: what is the correct way to write a function application in \LaTeX?

The simple answer is of course $f(x)$. However, $f\left(x\right)$ delivers a different result (in terms of spacing), even if the height of the argument does not require larger brackets.

In MathML, &ApplyFunction; controls the spacing between the function and its argument like so <mi>f</mi><mo>&ApplyFunction;</mo><mfenced<mi>x</mi></mfenced>.

Is there a similar construct in LaTeX?

Thanks, Sébastien

  • I think the mathtools package fixes the spacing discrepancy between f(x) and f\left(x\right), but I can't find a reference right now. – Arun Debray Nov 9 '16 at 16:35
  • 2
    @ArunDebray, mathtools does not help in this case. If you insist on using left/right (I would not) then you need \mleft/mright (mleftright package). That case that mathtools does fix, is when a fencing macro is made using \DeclarePairedDelimiter then the auto scaller is "fixed", but that is not general. – daleif Nov 9 '16 at 18:55
0

Insert \!, this is a negative space exactly equal to the extra space that is inserted between f and \left(. If necessary also at the end.

$f\!\left(x\right)\!$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.