-1
$\begingroup$

I want to get rid of the space between name of the function and the parenthesis argument as in $f\left(\frac{1}{x}\right)$.

This space feels unnatural to me. I know a solution to get around this but I am not satisfied with it.

\DeclareMathOperator{\f}{f}
\f\left(\frac{1}{x}\right)

This renders $\DeclareMathOperator{\f}{f}\f\left(\frac{1}{x}\right)$. Notice the space is removed but $f$ is changed to $\f$.

How to get rid of the space while maintaining the $f$ in this font?

I am not nitpick; I don't want to use $f$ in a different font to keep my answers consistent with original posts.

$\endgroup$
3
  • 4
    $\begingroup$ This is a "fussy spacing issue", and should have been covered in the MathJax guide. I have added it to this answer. $\endgroup$
    – Xander Henderson Mod
    Apr 10 at 12:31
  • $\begingroup$ I don't understand the downvotes... My question isn't opinion based, so what's the disagreement? IMO, it's an important question and it was not covered in the MathJax guide at the time I posted this... $\endgroup$ Apr 11 at 10:34
  • 1
    $\begingroup$ Just a guess, probably some users don't feel the extra space as a problem and hence they don't agree to your proposal. $\endgroup$
    – Paramanand Singh Mod
    Apr 12 at 6:30

2 Answers 2

5
$\begingroup$

You may try the negative spacing operator \! like $f\! \left(\frac{1}{x}\right)$ to get $f\! \left(\frac{1}{x}\right)$.

However I think the extra space is due to left right commands and they are needed to resize the parentheses based on their argument. Without left right like $f(x) $ we get $f(x) $.

$\endgroup$
-5
$\begingroup$

$$ f(x) $$ $$ f(\frac1{x}) $$ $$ f\left(\frac1{x}\right) $$ $$ f\LARGE{(\small{\frac1{x}}\Large)} $$ $$ \vcenter{\Large{f}}\Huge{({\vcenter{\small{\frac1{x}}}}\Huge)} $$

$$
f(\frac1{x})
$$
$$
f\left(\frac1{x}\right)
$$
$$
f\LARGE{(\small{\frac1{x}}\Large)}
$$
$$
\vcenter{\Large{f}}\Huge{({\vcenter{\small{\frac1{x}}}}\Huge)}
$$

Also, see the Stack Exchange Meta article: "Changing mathjax's font size"

$\endgroup$
3
  • $\begingroup$ I don't understand the inconsistent use of \Large. That looks even worse. $\endgroup$ Apr 10 at 8:49
  • 1
    $\begingroup$ @Nothingspecial: Click on the link to Changing mathjax's font size. The strategy is to recognize that simple parenthesis like $f(x)$ do not have extra space. But for $f(\frac1{x})$, the only difficulty is that the parenthesis are too small. So, following the link, the parenthesis size is adjusted using \LARGE{(...)} as $\LARGE{(...)}$ . From the link, the could be increased even more using \Huge(...)} as in $\Huge{(...)}$. But then the inside fraction needs to be set small so it fits. $\endgroup$ Apr 10 at 8:59
  • $\begingroup$ The inside fraction does not need to be set small to fit, e.g. \Large f\!\left(\frac{1}{x}\right) is typeset as $$\Large f\!\left(\frac{1}{x}\right).$$ Or write \Large f\!\left(\tfrac{1}{x}\right) to get $$\Large f\!\left(\tfrac{1}{x}\right).$$ $\endgroup$
    – Xander Henderson Mod
    Apr 10 at 12:25

Not the answer you're looking for? Browse other questions tagged .