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

Option to write render_html or render_latex output to a file #29

Open
MaxGhenis opened this issue May 31, 2020 · 1 comment · May be fixed by #38
Open

Option to write render_html or render_latex output to a file #29

MaxGhenis opened this issue May 31, 2020 · 1 comment · May be fixed by #38

Comments

@MaxGhenis
Copy link
Contributor

This is especially helpful for render_latex, since a common workflow is to store each tex component as separate files, and then include them in the master tex file. It'd be nice to have a render_latex(out='out.tex') option.

Current workaround (which would probably be the way to implement the feature) is:

f = open("out.tex", "w")
f.write(stargazer.render_latex())
f.close()
@toobaz
Copy link
Collaborator

toobaz commented May 31, 2020

Current workaround (which would probably be the way to implement the feature) is:

Just for the records, you can spare one line:

with open("out.tex", "w") as f:
    f.write(stargazer.render_latex())

... but sure, this would be nice to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants