17

What is the purpose of \left., i.e., \left followed by a period? Similarly for \right.

E.g. for \right. and \left (no period)

begin{eqnarray}\label{Dsys}
  \textcolor[rgb]{.25,.0,.8}{%
    \left\{\begin{array}{l}
              u_t=F(u) \\ \\ 
              u(0)=u_0\in H,
           \end{array}
     \right. 
  }
\end{eqnarray}
  • 3
    Off-topic/aside: Don't use eqnarray. It's badly deprecated. Much better alternatives are readily available. – Mico May 1 '18 at 5:41
  • 3
    @HenriMenke I think you would need to point to a duplicate answer here (there probably is one) almost every question could be closed if "read the manual" was an acceptable close reason. – David Carlisle May 1 '18 at 8:04
  • @DavidCarlisle - A search for the Missing delimiter (. inserted) warning message brings up (at least) 76 "hits". (Most of these hits are related to users either forgetting to provide a suitable fence symbol or to forgetting that curly braces must be entered as \{ and \} and hence expressing surprise that \left{ ... \right} doesn't generate the intended output.) Somewhat to my surprise, I couldn't find an earlier question that asked directly what \left. and/or \right. do... – Mico May 1 '18 at 11:46
  • 4
    Closing this question goes against the grain of the desire to make Stack Overflow and the entire Stack Exchange network a more welcoming place. Marking as a duplicate of a question asking for books is downright insulting. This question has a short and simple answer; it does not require a book. – David Hammen May 1 '18 at 12:24
  • See also tex.stackexchange.com/q/77589/15925 – Andrew Swann May 1 '18 at 13:51
32

I assume you're familiar with the most common use case for \left and \right, which is to provide automatic sizing of visual delimiters or "fences" -- round parentheses, square brackets, curly braces, angle-brackets, vertical bars, etc -- so that the "fences" may visually enclose the material they surround. Example:

\[ \left( \frac{a}{b} \right) \]

Well, sometimes a "one-sided fence" is called for. The example code you provided is such a case: we need a large curly brace to the left of the array, but nothing to the right of the array. To cater to such needs, TeX lets you "pair" the \left\{ statement with a \right. statement. If you will, the "." symbol after \right denotes "no fence on this side". Because \left and \right must occur in pairs and need to operate on something, it wouldn't work to write \right without a suitable argument. (As explained below, LaTeX issues a warning message if no suitable argument is encountered.) Similarly, there may be cases for which one needs to "pair" a \left. directive with a \right| directive, as in

\[ \left. \frac{\partial f}{\partial x} \right|_{x=x_0} \]

Aside: In case you're wondering how TeX goes about processing the material that immediately follows \left and \right, here's a TeXnical explanation. As @egreg has pointed out in a comment, TeX assigns a "delimiter code" (\delcode for short) to all (math-mode) tokens: "fence symbols" -- such as round parentheses, square brackets, curly braces, and vertical bars -- have a positive \delcode, the . ("dot", "period", "full stop") symbol has a \delcode of zero, and all other tokens have -1 as their \delcode. If the token that follows \left or \right has a positive \delcode, i.e., if a "real" fence symbol is to be processed, the fence is sized according to TeX's algorithms; if the \delcode is zero, nothing is done (apart from the insertion of a bit of horizontal whitespace); and if the \delcode is negative, TeX issues a

Missing delimiter (. inserted)

warning message. This message should be taken seriously, i.e., one should examine the code and fix it appropriately. For more information on \delcodes, do peruse Chapter 17 of The TeXbook, entitled "More about Math", and especially the second double-dangerous-bend material on p. 156. For still more information, please check out pages 290 and 345 of The TeXbook.

Incidentally, the amsmath package provides an environment called cases which is designed to typeset your example code in a way that focuses on the meaning of what you're writing, without distractions about how one should go about implementing the typesetting chore.

\documentclass{article}
\usepackage{amsmath,xcolor}
\begin{document}
\begin{equation}\label{Dsys}
\textcolor[rgb]{.25,.0,.8}{%
   \begin{cases}
       u_t=F(u)    \\ 
       u(0)=u_0\in H
   \end{cases} 
}
\end{equation}
\end{document}
  • 7
    The special status of . comes from the fact its \delcode is 0; “true” fences have positive \delcode, all other characters have \delcode set to −1. – egreg May 1 '18 at 6:30
  • 1
    @egreg - Many thanks for mentioning the \delcode system; I've updated my answer to provide an entire paragraph on this topic. – Mico May 1 '18 at 11:30
  • If you'd like to learn more about delimiters and \delcode, another good reference is section 21.2, "Delimiters", on pp. 191f. of Victor Eijkhout's book TeX by Topic. (Type texdoc texbytopic to bring up a copy of this document.) – Mico May 1 '18 at 20:20
  • 1
    After \left or \right one can also have \delimiter; indeed, macros such as \lceil are defined as \delimiter"4264306 (after \delimiter one should have a 28 bit integer). – egreg May 1 '18 at 20:23
  • @egreg - Thanks. Let's see if the OP (or anyone else...) posts a follow-up query about what's allowed/expected to follow \left and \right. – Mico May 1 '18 at 20:26

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.