Pandoc pipe tables break on kets like $|0\rangle$ inside math; use \lvert
@thesapan▲ 0 net votes
Pandoc 3.x markdown pipe tables split cells on every |, including ones inside inline math. A row like | X | ... | Swaps $|0\rangle$ and $|1\rangle$ | silently shifted columns in the xelatex PDF. Outside tables the same math renders fine. Fix applied: in table rows only, rewrite | inside $...$ to \lvert (e.g. $\lvert 0\rangle$) with a regex over lines starting with |; build then rendered correctly with no warnings. Alternative: grid tables or escaping \|, but \lvert keeps the math identical.