1

Here's my MWE:

\documentclass[11pt]{article}
\pagestyle{empty}
\usepackage{amsmath}
\usepackage{xcolor}
\newcommand{\redx}{{\color{red}x}}
\newcommand{\bluex}{{\color{blue}x}}
\begin{document}

\begin{align}
  x &= \biggl[ x \frac{\frac{y}{z}}{\frac{x}{y}} \notag \\
    & \quad \quad  + \redx \frac{\frac{y}{z}}{\frac{x}{y}}\biggr]
\end{align}

\begin{align}
  x &= \left[ x \frac{\frac{y}{z}}{\frac{x}{y}} \right.\notag \\
    & \quad \quad \left. + \bluex \frac{\frac{y}{z}}{\frac{x}{y}}\right]
\end{align}


\end{document}

enter image description here

Look at the space between the + sign and the red x and the blue one.

My question is: how can I keep using the \left and \right macros across line breaks and fix (I hope not manually) the bad space arrangement between the math-operator and the following symbol?

3

It seems that I’d better explain what I meant in my comment to Steven’s answer:

\documentclass[11pt]{article}
\pagestyle{empty}
\usepackage{amsmath}
\usepackage{xcolor}
\newcommand{\redx}{{\color{red}x}}
\newcommand{\bluex}{{\color{blue}x}}
\begin{document}

\begin{align}
  x &= \biggl[ x \frac{\frac{y}{z}}{\frac{x}{y}} \notag \\
    & \quad \quad  + \redx \frac{\frac{y}{z}}{\frac{x}{y}}\biggr]
\end{align}

\begin{align}
  x &= \left[ x \frac{\frac{y}{z}}{\frac{x}{y}} \right.\notag \\
    & \quad \quad \! \left. \kern -\nulldelimiterspace
        {} + \bluex \frac{\frac{y}{z}}{\frac{x}{y}}\right]
\end{align}
\end{document}
2

Add an empty group {} between the \left. and the +. However, you cannot use \left and \right across line breaks. The proper approach is the \bigg approach.

\documentclass[11pt]{article}
\pagestyle{empty}
\usepackage{amsmath}
\usepackage{xcolor}
\newcommand{\redx}{{\color{red}x}}
\newcommand{\bluex}{{\color{blue}x}}
\begin{document}

\begin{align}
  x &= \biggl[ x \frac{\frac{y}{z}}{\frac{x}{y}} \notag \\
    & \quad \quad  + \redx \frac{\frac{y}{z}}{\frac{x}{y}}\biggr]
\end{align}

\begin{align}
  x &= \left[ x \frac{\frac{y}{z}}{\frac{x}{y}} \right.\notag \\
    & \quad \quad \left.{} + \bluex \frac{\frac{y}{z}}{\frac{x}{y}}\right]
\end{align}


\end{document}

If you want the exact spacing of the red one, you will also need to add some negative space, as the \left. does add extra horizontal space. So, for example,

\documentclass[11pt]{article}
\pagestyle{empty}
\usepackage{amsmath}
\usepackage{xcolor}
\newcommand{\redx}{{\color{red}x}}
\newcommand{\bluex}{{\color{blue}x}}
\begin{document}

\begin{align}
  x &= \biggl[ x \frac{\frac{y}{z}}{\frac{x}{y}} \notag \\
    & \quad \quad  + \redx \frac{\frac{y}{z}}{\frac{x}{y}}\biggr]
\end{align}

\begin{align}
  x &= \left[ x \frac{\frac{y}{z}}{\frac{x}{y}} \right.\notag \\
    & \quad \quad \left.\!{} + \bluex \frac{\frac{y}{z}}{\frac{x}{y}}\right]
\end{align}
\end{document}

might be better. In that case the result is

enter image description here

  • Do you know the exact amount of horizontal space added by \left.? (I tried \mkern-\thickmuskip\left.{} and it works fine). – Gabriele Nicolardi Jan 16 '18 at 17:32
  • Well, $x\left.\mkern-5mu y\mkern-5mu\right.z$ and $ x y z$ seem to match, so perhaps 5mu for \mathord. However, I don't know if it is dependent on the whether the surrounding matter is \mathord or \mathbin, etc. $x\left.\mkern-5mu {}+{}\mkern-5mu\right.z$ and $ x +z$ also work, if the {} are included. – Steven B. Segletes Jan 16 '18 at 17:39
  • 1
    @GabrieleNicolardi: compared to the \biggl case, \left. adds \nulldelimiterspace (normally .2pt), because you use a null delimiter, and \thinmuskip (normally 3.0mu) because a \left ... \right construction yields an Inner atom, and this Inner atom follows the Ord inserted by & (see the table on p. 170 of The TeXbook). Note that \nulldelimiterspace is expressed in points, while \thinmuskip is in math units. As you know, \! only compensate for the \thinmuskip. – GuM Jan 16 '18 at 18:03
  • 2
    @GabrieleNicolardi: Oops, there’s a typo in my previous comment: the normal value of \nulldelimiterspace is not .2pt, but 1.2pt! In any case, you don’t need to bother about this: just add \kern -\nulldelimiterspace! – GuM Jan 16 '18 at 18:19
  • @GuM \kern -\nulldelimiterspace doesn't works. I'm editing my question to show you the details. – Gabriele Nicolardi Jan 16 '18 at 18:56

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.