Skip to content
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

ENH: (Styler|DataFrame).to_typst() #57617

Open
1 of 3 tasks
janosh opened this issue Feb 25, 2024 · 2 comments
Open
1 of 3 tasks

ENH: (Styler|DataFrame).to_typst() #57617

janosh opened this issue Feb 25, 2024 · 2 comments
Labels
Enhancement IO LaTeX to_latex Needs Discussion Requires discussion from core team before further action

Comments

@janosh
Copy link
Contributor

janosh commented Feb 25, 2024

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

typst is a new markup language for scientific documents https://github.com/typst/typst. i think of it as latex for the 21 century.

Feature Description

i've used (df|styler).to_latex many times and would find an equivalent (df|styler).to_typst equally useful now that i've transitioned to Typst.

Alternative Solutions

export to JSON/CSV and use Typst native JSON/CSV import feature and generate table in Typst rather than in pandas. drawback: looses styling and all customization options available with Styler

Additional Context

No response

@janosh janosh added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 25, 2024
@rhshadrach rhshadrach added IO LaTeX to_latex Needs Discussion Requires discussion from core team before further action and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 25, 2024
@rhshadrach
Copy link
Member

rhshadrach commented Feb 25, 2024

Thanks for the request. I think we'll have to balance the popularity of the format vs the maintenance burden of to_typst. If adding in to_typst is not at all involved, then I think I'd be open to it. However, if it rivals the implementation to_latex while being an order of magnitude less popular (not sure - but I'd guess that's currently the case), then I think we should hold off.

pandoc now support typst - can you try converting the output of to_latex to typst using that for your use cases and let us know if any difficulties are encountered?

cc @attack68

@attack68
Copy link
Contributor

Agreed, nothing more to add. I think we would also need multiple developers familiar with typst to ensure that any development was pursuing the right direction.

to_latex was a huge implementation: #40422 with many follow ups and add ons.
to_string was a very quick job: #44502

A compromise would be allow a PR to be submitted on the scale of to_string and see if there are any follow up issues from users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO LaTeX to_latex Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

No branches or pull requests

3 participants