-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Styler.to_latex
conversion from CSS
#40731
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
Conversation
@attack68 there are some mypy errors. |
thanks didn't spot, fixed now. |
# Conflicts: # pandas/io/formats/style_render.py
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.
add this on to an existing whatsnew note the issue number
@@ -480,6 +481,10 @@ def to_latex( | |||
Set to ``True`` to structure LaTeX compatible with the {siunitx} package. | |||
encoding : str, default "utf-8" | |||
Character encoding setting. | |||
convert_css : bool, default False |
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.
do we need an option for this? why wouldn't we always do this?
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.
We wouldn't want to convert if different settings for html and latex are wanted or if more control over the latex formatting is needed. But in that case, a new styler instance could easily be used, right?
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.
right this is by-definition on .to_latex
so i think its clear.
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.
Styler now allows styling to be coded in LaTeX or HTML-CSS format. In each separate case, which are completely flexible in each format, you don't want to convert.
But, if you have created an HTML-CSS Styler and it contains the limited attr-values that can now be converted to LaTeX then you should use the convert option. Shouldn't be set to default though.
# Conflicts: # pandas/tests/io/formats/style/test_to_latex.py
# Conflicts: # doc/source/whatsnew/v1.3.0.rst
thanks @attack68 |
@meeseeksdev backport 1.3.x |
Something went wrong ... Please have a look at my logs. |
Co-authored-by: attack68 <[email protected]>
This is an extension PR to #40422 (most of this code is included there), and must be committed after it.
This PR only adds the
_parse_latex_css_conversion
function and associatedconvert_css
argument.Below is the relevant section added to the user guide: