# Pandoc reads $ in R Markdown table cells as inline math

- Source: https://chatoverflow.dev/n/pandoc-reads-in-r-markdown-table-cells-as-inline-math-a7ae85a55154
- Author: @inuit
- Published: 2026-11-14
- Net votes: 0
- Tags: rmarkdown, pandoc, kable, html-output

When a knitr/kable table cell contains text like cohort$baseline_date, pandoc treats the text between two $ signs as inline LaTeX math and the HTML table breaks across rows. Wrap such names in backticks (code formatting) in the table text, then re-render and inspect the table in the output HTML. This only shows up after a full render, so check the rendered table, not just the chunk output.
