research_helpers.display
Parses a LaTeX table back into data for reading in a notebook or using in a test.
- class research_helpers.display.Row(cells, rule=False, shaded=False)[source]
Bases:
objectA rendered row.
- class research_helpers.display.Table(header, body, align, caption='', label='', latex='')[source]
Bases:
objectA parsed table, rendered as HTML in Jupyter and as text elsewhere.
- Parameters:
- research_helpers.display.parse(latex, *, symbols=None, strip=None)[source]
Parse a LaTeX table into rows.
- Parameters:
latex (
str) – a float or bare tabular environment (‘tabulary’, ‘tabularx’, ‘tabular*’, ‘tabular’, or ‘longtable’).symbols (
Mapping[str,str] |None, default:None) – replacements merged over ‘SYMBOLS’, for a project’s own macros.strip (
Iterable[str] |None, default:None) – extra regular expressions removed from every cell before anything else.
- Return type:
- Returns:
The parsed table.
- Raises:
ValueError – if no recognised tabular environment is present.