1

How can I get the set brackets to look like this?

enter image description here

2 Answers2

4

You can use \left\{ and \right\}. They autosize your brackets around your content and the item that follows them, in this case \{, is the delimiter.

egreg
  • 1,121,712
RhythmInk
  • 537
3

With mathtools you can define a \set command, which accepts an optional argument: \big, \Big,&c. to control the size of the brackets. The starred version is equivalent of a pair of \left ··· \right around the braces.

As to the separator, @egreg pointed there's a small difference between : and \colon. I propose both, so the choice depends on one's taste:

\documentclass[12pt]{article}

\usepackage{mathtools}
\DeclarePairedDelimiter\set{\{}{\}}
\newcommand\numberset[1]{\mathbf{#1}}
\newcommand\Real{\numberset{R}}

\begin{document}

\begin{align*} 
& \set*{\begin{pmatrix}x + 2y\\x\\-y\end{pmatrix}: x, y\in\Real} \\[3ex]
&\set*{\begin{pmatrix}x + 2y\\x\\-y\end{pmatrix}\colon x, y\in\Real}
\end{align*}

\end{document} 

enter image description here

Bernard
  • 271,350
  • 1
    Should \colon be used instead of :? – Mico Oct 11 '15 at 00:21
  • You're right. Not sure may people will see the difference (~0.6pt more horizontal spacing after the colon), nor that's worth the typing (unless we get it it automatically in the place of : using xparse. At any rate I changed it. Thanks for your eagle-eye ;o) – Bernard Oct 11 '15 at 00:38
  • @Mico No; here the colon is used as a relation symbol, so : is the right input; \colon leaves a small space at its left and a larger space at its right. – egreg Oct 11 '15 at 10:35
  • @egreg: I noticed that, and that's why I ultimately preferred it… – Bernard Oct 11 '15 at 11:41
  • I hope you don't mind my edit, then. I recommend \mathbf{R} instead of \mathbf R: the former requires two keystrokes more, but it's clearer. Of course one should have \newcommand{\numberset}[1]{\mathbf{#1}} and then \newcommand\real{\numberset{R}}, so as to get uniform appearance without needing explicit mark up. – egreg Oct 11 '15 at 11:42
  • I don't mind at all. I'll just add the other version, so the readers may choose knowingly.Your suggestion for a \numberset command is excellent, and I'll retain it! – Bernard Oct 11 '15 at 11:47
  • @egreg - Thanks for clearing up my mis-understanding of the role/purpose of the : symbol in this example. – Mico Oct 11 '15 at 13:26