Feature: add Threepart LaTeX renderer
Add ThreePartRenderer for improved LaTeX table output
Adds a new LaTeX renderer that produces publication-quality regression tables using threeparttable, booktabs, and siunitx LaTeX packages. This implementation offers several improvements over the standard LaTeX output:
- Uses
threeparttableenvironment for better organization of table notes and star explanations - Leverages
booktabspackage for professional-looking horizontal rules - Implements
siunitxfor proper alignment of numerical values and significance stars - Adds ability to generate standalone LaTeX documents with configurable preamble
- Includes a helper method to save tables directly to file
Key Features
- Proper alignment of coefficients and standard errors using
siunitx's S column type - Clean table rules from
booktabs(toprule, midrule, bottomrule) - Structured notes section under the table using
threeparttable - Optional standalone document generation with customizable packages and margins
- Direct file output support via
save_to_file()method
The new renderer maintains full compatibility with existing Stargazer functionality while providing enhanced LaTeX output suitable for academic publications.
An example of the LaTeXRenderer on the left versus the ThreepartRenderer on the right.
Thanks @jpweytjens , looks great!
I will check more in depth next week.
Hey @toobaz , have you found any time to have a look at this PR?