jazzband / prettytable

Display tabular data in a visually appealing ASCII table format
https://pypi.org/project/PrettyTable/
Other
1.36k stars 155 forks source link

Add a get_latex_string() method #131

Closed kinianlo closed 2 years ago

kinianlo commented 2 years ago

Is your feature request related to a problem? Please describe.

Unable to get code that produces the table in LaTex.

Describe the solution you'd like

Add a get_latex_string() method that returns latex code which reproduces the table in LaTex. Should be very similar to the get_html_string() method.

Describe alternatives you've considered

Get string in Markdown format and translate them into latex code using other tools, eg https://tableconvert.com/.

Additional context

The prettytable counterpart in Julia has the desired feature: https://ronisbr.github.io/PrettyTables.jl/stable/man/latex_backend/

hugovk commented 2 years ago

PR welcome!