I've created a command \newcommand{\br}[1]{$\left\{{#1}\right\}$}
to provide left and right curly braces surrounding an input.
The usage \br{g \in G : \theta(g) = M/N} works perfectly until I try to use
it in alignment as follows:
\begin{align*}
\ker\theta &= \br{g \in G : \theta(g) = M/N} \\
&= \br{g \in G : (M/N)Ng = M/N}
\end{align*}
Is there a better macro for enclosing
{}?Is there a way to use this or a better macro within alignment?
Update:
There is an alternative to the macro I defined called \Set in the braket package. This is due to a comment in How to automatically resize the vertical bar in a set comprehension? commented by ShreevatsaR.
\usepackage{braket}
\begin{align*}
\ker\theta &= \Set{g \in G \colon \theta(g) = M/N} \\
&= \Set{g \in G \colon (M/N)Ng = M/N}
\end{align*}

$...$in the definition of the command. thealign*environment puts you into math mode, so the$signs are redundant, and cause an error. it would be better to omit the$signs from the command definition, and instead enter them around the command when you use it. – barbara beeton Feb 21 '17 at 03:20\newcommand{\brr}[1]{\left\{{#1}\right\}}Works like a charm. If you care to drop that as an answer I'll accept it. Thx! – Athena Widget Feb 21 '17 at 03:49\brusing\DeclarePairedDelimiterfrom mathtools. – daleif Feb 21 '17 at 08:01