2

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 ?

6
  • 1
    Not sure of what you want to obtaim, but why not \bar?
    – Bernard
    Jun 10, 2016 at 14:36
  • I want to write this equation without any warning ! Sorry I don't understand what do you mean (but why not \bar) ?
    – naman
    Jun 10, 2016 at 14:39
  • Is bel supposed to be a function?
    – Bernard
    Jun 10, 2016 at 14:50
  • It works now by deleting \textbar and write | .
    – naman
    Jun 10, 2016 at 14:52
  • 1
    Try with \mid instead.
    – Bernard
    Jun 10, 2016 at 14:52

2 Answers 2

3

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).

2
  • 10
    Probably \mid would have a better spacing.
    – Bernard
    Jun 10, 2016 at 14:51
  • @Bernard - could you post that as an answer so that I can upvote it? Dec 26, 2017 at 12:57
-1

use \text{\textbar} (amsmath package is needed)

1
  • 2
    Using a text symbol for a mathematical operator is never a good idea. \mid is really the best alternative here. May 22, 2022 at 14:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .