11

I have the following expression

$$\left\{\varphi\in\text{End}\left({\widetilde{E}/\overline{\F}_{\Pf}}\right)\mid \varphi\text{Frob}_{\Pf}=\text{Frob}_{\Pf}\varphi\right\}$$

and would like to know how to match the length of \mid to the length of \left\{ and \right\}. Thanks!

2 Answers2

15

For middle stretchable delimiters you can use \middle:

\documentclass{article}
\usepackage{amsmath}

\newcommand\F{F}
\newcommand\Pf{Pf}
\DeclareMathOperator{\End}{End}
\DeclareMathOperator{\Frob}{Frob}

\begin{document}

\[
\left\{\varphi\in\End
\bigl(\widetilde{E}/\overline{\F}_{\Pf}\bigr)
\,\middle\vert\, 
\varphi\Frob_{\Pf}=\Frob_{\Pf}\varphi\right\}
\]

\end{document}

enter image description here

Notice also the use of \DeclareMathOperator to produce the right font and spacing for "End" and "Frob". Also, $$...$$ shouldn't be used in modern LaTeX documents; use \[...\] instead. Since I didn't know the definitions of some commands, I defined them provisionally.

Gonzalo Medina
  • 505,128
4

For completeness here is the one I normally use

\usepackage{mathtools}
\DeclarePairedDelimiterX\Set[2]{\{}{\}}{#1\,\delimsize\vert\,#2}

Edit 2014. After using \Set{A}{B} for some time, this syntax is not particularly natural, too far from the actual meaning. Instead I'm now using this

\providecommand\given{} % is redefined in \Set
\newcommand\SetSymbol[1][]{\nonscript\:#1\vert\nonscript\:}
\DeclarePairedDelimiterX\Set[1]{\{}{\}}{
  \renewcommand\given{\SetSymbol[\delimsize]}
  #1
}

Now we can simply use

\Set{ x\in A \given x^2 > 1 }

much much closer to the mathematical meaning.

I use the \SetSymbol because there are very complicated set constructions, where one cannot use \Set (\{ and \} on separate lines), and thus in that case one may want to be able to refer to the given symbol for sets, just in case one want change the symbol later on.

daleif
  • 54,450