Support pipe char in math mode inside a table

I would like to insert a mathematical expression involving a pipe char, e.g. $p(A|B)$ inside a table. However, this creates a new table cell instead of printing the character.

Escaping the pipe char as in $p(A \| B)$ solves the cell splitting issue. Nevertheless, instead of the pipe char a norm symbol ("||") is rendered.

Searching online, I found this very similar issue on the Atom editor forums, maybe that helps: Pipe character within $..$ in markdown table breaks equation across columns · Issue #185 · atom-community/markdown-preview-plus · GitHub

Is it possible to put an expression like $p(A|B)$ inside a tabular environment, and make it render correctly? Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.