0

As it was suggested in the discussion in this link (How can I remove space after `\right`?) that we maybe can not go around using \right. \left. \mright) \mleft( together. The example was given as: Here is a better example,

\begin{equation}
\begin{aligned}
4x+y-z =& \left( \int_3^7 dr+ \right. \\
    & \left. y+x\mathcal{M} \right).
\end{aligned}
\end{equation}

I want to split lines and at the same time I am having extra and undesired space after the parenthesis and before the last point. How can we get rid of this space and at the same time still be capable of splitting the line starting with "(" and the one ending wih ")"

2

All ingredients are in the comments to cited question already:

  • \mleft...\mright avoids the additional space before \mleft and \mright, which would be introduced by \left and \right because the latter puts the contents in \mathinner.

  • \nulldelimiterspace is added as space for \left. or \right.. This can be set to zero: \setlength{\nulldelimiterspace}{0pt} or adding \kern-\nulldelimiterspace to fix an instance manually.

  • There is a space missing before the +, the second operator is missing, thus TeX does not set it as binary operator. It is fixed by adding an empty operator and a negated space between the operator and the empty operand: dr + {}\mkern-\medmuskip

  • The size of the closing parentheses can be increased to the size of the opening parentheses by adding \vphantom applied on the largest component of the first line, see the following example.

Example. The second equation uses \left and \right for the first line, because the additional space before \left( looks better IMHO.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mleftright}

\begin{document}
\begin{equation}
  \setlength{\nulldelimiterspace}{0pt}
  \begin{aligned}
    4x+y-z =& \mleft( \int_3^7 dr+ {}\mkern-\medmuskip\mright. \\
    & \mleft. y+x\mathcal{M} \mright).
  \end{aligned}
\end{equation}
\begin{equation}
  \setlength{\nulldelimiterspace}{0pt}
  \begin{aligned}
    4x+y-z =& \left( \int_3^7 dr+ {}\mkern-\medmuskip\right. \\
    & \mleft. \vphantom{\int_3^7} y+x\mathcal{M} \mright).
  \end{aligned}
\end{equation}
\end{document}

Result

  • Concerning the last comment in your answer: the too small space between = and ( in Eq. (1) is a typical problem of align(ed). When an alignment character follows a relation you should insert an empty group between them, i.e. ={}&. Then the spacing is correct. – campa Aug 13 '15 at 14:56
  • What I meant was between ")" and "." there is a space. And in your example the space still exists. – Beyond-formulas Aug 13 '15 at 14:59
  • @Beyond-formulas: I know. I was referring to Heiko's comment "the additional space before \left( looks better IMHO." – campa Aug 13 '15 at 15:03
  • @Beyond-formulas It's the normal space between two glyphs (right side bearing of the parentheses and the left side bearing of the period). I do not see any need to reduce that space, but it can be done by a negative space (\kern-...). – Heiko Oberdiek Aug 13 '15 at 15:38
0

Why do you even use this auto-parantheses here? This is a perfect use-case of where not to use them.

Just do:

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{align}
    \begin{aligned}
        4x+y-z =& \biggl(\!\int_3^7 dr +{} \\
        & y+x\mathcal{M} \biggr).
    \end{aligned}
\end{align} 
\end{document}

The \! only, if you need to reduce the space even more. I would not do it. You could also do some \mkern-<someDeciaml>mu.

I would recommend to set the plus sign to the second line.

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.