-
Notifications
You must be signed in to change notification settings - Fork 73
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #481 +/- ##
==========================================
+ Coverage 87.86% 88.88% +1.01%
==========================================
Files 42 44 +2
Lines 4852 5216 +364
==========================================
+ Hits 4263 4636 +373
+ Misses 589 580 -9 ☔ View full report in Codecov by Sentry. |
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.
From pairing -- we ran the examples from https://posit-dev.github.io/great-tables/examples/ .
Main pieces:
- Explicitly raise or warn for currently unsupported behaviors (e.g. styles)
- formatters sometimes run but their output generate latex errors
- fmt_nanoplot
- fmt_markdown
- fmt_image
- fmt_url
- fmt_integer (?) -- this seems to raise a python error
- the
md()
andhtml()
functions produce output that causes latex errors (but maybe this is okay?)
One interesting note is that quarto can handle images and urls in tables. We don't have to do the same, but it's worth documenting down quarto's behavior the road!
Now we warn when there is any definition of
|
From pairing, LGTM -- thanks for this ENORMOUS push, excited for latex tables! |
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.