1

For me, I think Latex puts too much space between the function name and its arguments when using \left( and \right) compared to just ( and ). I'd like to get same space as with the second case.

The problem is that the Latex I am using is produced from CAS software which always generates \left( and \right) automatically. Sometimes this is what is actually needed and sometimes it is not needed.

So without changing the code itself, is there a way to make the space the same as when using ( and ) only? or reduce it somehow? May be with some smart macro or some package? I can only change the preamble, but do not want to edit anything after \begin{document} as the generated latex changes many times during the day or any time I re-run the CAS program.

Here is a comparison

\documentclass[12pt]{article} 
\begin{document}
\[
Y \left(X \right) 
\]

\[
y \left(x \right) 
\]
\end{document}

vs.

\documentclass[12pt]{article} 
\begin{document}
\[
Y (X) 
\]

\[
y (x) 
\]
\end{document}

enter image description here

All compiled using lualatex foo.tex.

We see the horizontal space between the function name, which is Y in this example and its arguments () is smaller when using ( and ) which is what I like more.

But it is not possible to modify the code generated each time. Both Maple and Mathematica always generate \left( and \right) even if what is inside the parenthesis is a single letter and not some complicated expression which would need \left( and \right) to adjust the height of the parenthesis to make its content fit right. Also Scientific word which I use does the same, all its latex uses \left( and \right).

TL 2021

1 Answer 1

3

You can set

\Umathordinnerspacing\textstyle=0mu
\Umathordinnerspacing\displaystyle=0mu

in luaTeX. But there is new problem when you are using Unicode Math: the italic correction after the Ord atom and the next Inner atom isn't included. The setting \mathitalicsmode=1 does not help.

BTW: it is bug of your CAS software, you can try to report it.

1
  • 1
    One should be aware of that things like \(a\cdots b\) is affected by this, since \cdots results in an inner atom.
    – mickep
    Aug 23, 2022 at 20:03

You must log in to answer this question.

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