How can I get the set brackets to look like this?
Asked
Active
Viewed 2,906 times
1
-
1Welcome to TeX.SX! See if How to make brackets larger? answers your question. – Torbjørn T. Oct 10 '15 at 22:43
-
See also bigger parentheses in equations – Torbjørn T. Oct 10 '15 at 22:45
-
"to look like this?" instead of like what? Please clarify, e.g. by showing us what you've come up with so far. Right now it seems like you're asking about some of the most basic tools found in every tutorial. – JJM Driessen Oct 10 '15 at 22:54
2 Answers
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.
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}
Bernard
- 271,350
-
1
-
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
:usingxparse. 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;\colonleaves a small space at its left and a larger space at its right. – egreg Oct 11 '15 at 10:35 -
-
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
\numbersetcommand 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

