-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow rendering of tables to LaTeX #481
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #481 +/- ##
==========================================
- Coverage 87.86% 85.81% -2.05%
==========================================
Files 42 44 +2
Lines 4852 5238 +386
==========================================
+ Hits 4263 4495 +232
- Misses 589 743 +154 ☔ View full report in Codecov by Sentry. |
@@ -71,6 +71,20 @@ | |||
create_heading_component_h, | |||
create_source_notes_component_h, | |||
) | |||
from great_tables._utils_render_latex import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move these out of gt.py
along with the definition _render_as_latex()
?
But as it exists, this code is...
- importing
as_latex
, which... - calls
_render_as_latex()
, that is defined in this file, which... - calls the
create_*()
functions defined in_utils_render_latex
So the path is going...
_export.as_latex()
->gt.py
->_utils_render_latex()
Ideally it seems like it should just be going...
_export.as_latex()
->_utils_render_latex()
And then we just assign the function to GT.as_latex()
This feature PR implements the rendering of tables to LaTeX, addressing #75 and #178. This will be exposed through the
as_latex()
method on theGT
class. If in Quarto and the render target is LaTeX, tables will be automatically rendered as LaTeX tables.Preview: https://pr-481--gt-python.netlify.app/a-latex_examples/index.pdf.