Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
variable-sized “such that” pipe

I currently have this LaTeX code:

\text{Aff}(M) := \left \{ \sum_{i=1}^k \lambda_i p_i | p_i \in M, \lambda_i \in \mathbb{K}, \sum_{i=1}^k \lambda_i = 1\right \}

Which produces this:

enter image description here

But I would like to get a long pipe for my set, not this "|" short one. How can I make it long?

share|improve this question

marked as duplicate by Werner, Loop Space, egreg, Marco Daniel, Gonzalo Medina Aug 24 '12 at 21:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers 2

up vote 4 down vote accepted

You can use \middle|:

\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}

\begin{document}

$\mathrm{Aff}(M) := \left \{ \sum_{i=1}^k \lambda_i p_i \, \middle| \, p_i \in M, \lambda_i \in \mathbb{K}, \sum_{i=1}^k \lambda_i = 1\right \}$

\end{document}

enter image description here

Notice the two fine spaces I introduced (before and after the vertical bar) and the change from \text to \mathrm.

If instead of the \left\{...\right\} delimiters, some of the commands in the \big..., \Big... family is being used, then one can use the corresponding \bigm,\Bigm,... command:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$\bigm\lvert\quad\Bigm\lvert\quad\biggm\lvert\quad\Biggm\lvert$

\end{document}

enter image description here

share|improve this answer
    
Thanks for your answer, but it doesn't work in Wikipedia. But I've found this work-around: $\mathrm{Aff}(M) := \left \{\left. \sum_{i=1}^k \lambda_i p_i \ \right|\ p_i \in M, \lambda_i \in \mathbb{K}, \sum_{i=1}^k \lambda_i = 1\right \}$ –  moose Aug 24 '12 at 20:59
    
Somebody mentioned that I should not use \text{} and nod \mathrm{} but \operatorname{}. –  moose Aug 24 '12 at 21:16
    
@moose that depends on whether you want "Aff" to behave as an operator or not. –  Gonzalo Medina Aug 24 '12 at 21:19
add comment

The braket package provides this functionality for creating sets using the notation \Set{...|...}:

enter image description here

\documentclass{article}
\usepackage{amssymb,amsmath}% http://ctan.org/pkg/{amssymb,amsmath}
\usepackage{braket}% http://ctan.org/pkg/braket

\begin{document}

$\mathrm{Aff}(M) := \Set{ \sum_{i=1}^k \lambda_i p_i | 
  p_i \in M, \lambda_i \in \mathbb{K}, \sum_{i=1}^k \lambda_i = 1 }$

\end{document}​
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.