1

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

enter image description here

3

2 Answers 2

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.

1
  • 2
    Note that \left{ is illegal.
    – egreg
    Oct 10, 2015 at 23:01
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

7
  • Should \colon be used instead of :?
    – Mico
    Oct 11, 2015 at 0: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, 2015 at 0: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, 2015 at 10:35
  • @egreg: I noticed that, and that's why I ultimately preferred it…
    – Bernard
    Oct 11, 2015 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, 2015 at 11:42

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.