1

Why is it that after \right), the . placed after it is spaced. It looks disturbing. For example:

\begin{equation} \left(x+y=z\right). \end{equation} There exists an automatic slight space between ) and . that I would like to get rid of if possible? EDIT: 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}

What has been discussed in the comments, is to define \usepackage{mleftright} though without an application, things are still a little difficult to understand.

  • One can manually remove math space with \!, or if one needs a finer measure, \mkern-#mu, where # is replaced with a decimal value. Welcome to the site. – Steven B. Segletes Aug 13 '15 at 11:05
  • Maybe \mkern-\nulldelimiterspace is also useful to you. – 1010011010 Aug 13 '15 at 11:07
  • That's because \left(...\right) becomes inner atom, which is different from plain (...) with respect to spacing around it. See this question for more detail. – Merzong Aug 13 '15 at 11:11
  • @Merzong I have read the best answer there but I do not seem to understand how it applies. Does he mean that one should define a new command after listing the packages and then insert \mathopen{} and \mathclose{} where necessary? Or without defining he commands, directly use \mathopen{} and \mathclose{}? In either ways, it did not work for me. – Beyond-formulas Aug 13 '15 at 11:31
  • @1010011010 Sorry I do not see where you're going? How and where to place this command? – Beyond-formulas Aug 13 '15 at 11:32
  • 4
    If you don't want the spaces that can come before \left<fence> and after \right<fence>, load the mleftright package and use \mleft and \mright instead of \left and \right. Or, if you are certain you never want those spaces, load the mleftright package and issue the instruction \mleftright: That way, \left and \right will behave like \mleft and \mright throughout the document. – Mico Aug 13 '15 at 11:34
  • When I use \left(x+y=z\right)\!., the space between the right paren and the subsequent period definitely does shrink. – Steven B. Segletes Aug 13 '15 at 11:34
  • @Beyond-formulas Just define new \left and \right in the preamble and use them. It works for me. Another way to correct the spacing is using \DeclarePairedDelimiter of mathtools package. – Merzong Aug 13 '15 at 11:41
  • @Merzong I did use it then in the right place. If afterwards what you mean that I place \mright) and \mleft( instead of \right) and \left( then it does not work for me. If you mean that I keep them as \left( and \right) then it also does not work. I will edit my question with a better example. – Beyond-formulas Aug 13 '15 at 12:11
  • To load the mleftright package, issue the instruction \usepackage{mleftright} in the preamble. – Mico Aug 13 '15 at 12:38
  • @Beyond-formulas - Sorry that my earlier comments weren't clear enough. After loading the mleftright package (in the preamble), you should write \mleft and \mright (in the body of the document) instead of \left and \right to avoid getting the occasional extra spacing around the fence symbols. – Mico Aug 13 '15 at 13:22
  • @Mico does it work also if as in my case, I am breaking the line that begins with an open parenthesis and ends with a closed parathesis? Because in my example, I have \right. and \left. too. I am sensing that this does not apply in my case, isn't it? – Beyond-formulas Aug 13 '15 at 13:29
  • Sure. Compile this if you can, this is how this should look like after I follow your instructions. @Mico

    \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{mleftright} \begin{document} \begin{equation} \begin{aligned} 4x+y-z =& \mleft( \int_3^7 dr+ \right. \ & \left. y+x\mathcal{M} \mright). \end{aligned} \end{equation} \end{document}

    – Beyond-formulas Aug 13 '15 at 13:44
  • @Beyond-formulas - What are you trying to achieve by mixing-and-mismatching \mleft with \right and \left with \mright? Either use one type of instructions or the other, but don't mix them up. – Mico Aug 13 '15 at 14:02
  • I am afraid this does not work @Mico. I have replaced \left. by \mleft, \right. by \mright., \left( by \mleft( and \right) by \mright) as you suggested but with no result :(... – Beyond-formulas Aug 15 '15 at 13:00
  • @Beyond-formulas - I'm afraid "this does not work" is simply not specific enough to draw any inferences. Do you get error and/or warning messages? Are the horizontal spacing issues (which ones, by the way?) not affected by the use of \mleft and \mright? Is it the vertical size of the fences across the two rows that's unsatisfactory? Did the answer Heiko gave to your follow-up posting help at all? – Mico Aug 15 '15 at 14:22
  • Comments are not for extended discussion; this conversation has been moved to chat. – Stefan Kottwitz Aug 24 '15 at 19:04

1 Answers1

3

Your example produces

enter image description here

Which has extra space as the two \left\right pairs make \mathinner atoms which typically get \thinmuskip space around them (the same space as \, which is 1.7pt here) and additional \nulldelimiterspace (1.2pt here) from the two invisible delimiters \right. on the first line and \left. on the second.

However far more disturbing than this white space is the mis-matched size of the ().

If you use fixed size delimiters all these problems go, the brackets are the same size, and there are no null delimiters or mathinner groups creating unwanted horizontal space. I also brought the + on to the next line. If you do want it at the end of the first line it should be marked up as +{} so that it keeps its infix spacing, aligned only automatically supports the convention where binary operators start the continuation line as used below.

enter image description here

(The remaining white space between the ) and . is not white space added by TeX it is white space within the font's glyph for the ) character.

\begin{equation}
\begin{aligned}
4x+y-z =& \Bigl( \int_3^7 dr  \\
    & + y+x\mathcal{M} \Bigr).
\end{aligned}
David Carlisle
  • 757,742
  • @Beyond-formulas: See also the manual of the mathtools package, end of subsection 3.6.1 (pp. 28–29), – GuM Nov 07 '16 at 11:45