# How to type summation notation with a vertical line in Latex?

I need to type the following summation symbol in Latex. Could anyone help me? Literally, there needs to be a vertical line in a summation symbol, and $\hat{\beta}_2$ is just a subscript. Thanks in advance!

• I think @Sigur's comment is the answer to your question. – Sina Ahmadi Feb 21 at 1:35
• @Sigur Your solution has incorrect spacing, just sayin. For example, try: x$\clap{$\sum$}\Big\vert_{\hat{\beta}_2}$ – Steven B. Segletes Feb 21 at 1:39
• @sigur worse than that...the \sum is wrongly shifted left. – Steven B. Segletes Feb 21 at 1:41
• @StevenB.Segletes, specially the position of the limits. – Sigur Feb 21 at 1:44

Fine adjustments can be made to the \vert placement by placing positive or negative lengths in the 2nd argument (horizontal) or 4th argument (vertical) to \stackinset.
\documentclass{article}
inline: $\stackinset{c}{}{c}{}{\Big\vert}{\sum} _{\hat{\beta}_2} x_i$