torchcell.paper.tables.tex_escape

tex_escape(s: str) → str[source]

Escape the LaTeX specials that show up in dataset table cells.

Note $ is escaped too, so pass already-formed math (e.g. n×1) using the unicode source characters (×) and let this build the math, rather than embedding raw $...$ yourself.