[Tex/LaTex] How to make vertical bar in equations

equationsmath-mode

When I try this:

\begin{equation}
    \overline{bel}(x_{t}) = p (  x_{t}  \textbar z_{1:t-1} , u_{1:t} )
\end{equation}

I get following warning:

Command \textbar invalid in math mode on input line 12.

I aim to produce following output:
enter image description here

What should I do ?

Best Answer

Simply typing | should be completely sufficient:

\begin{equation}
    \overline{bel}(x_{t}) = p (  x_{t} | z_{1:t-1} , u_{1:t} )
\end{equation}

If you show us what the result is supposed to be, we can maybe help a little more.

Please, also provide a MWE (minimum working example, that is a complete file with preamble and only what is actually needed).