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

Enable a fallback mime bundle for e.g. PDF output #2325

Open
flying-sheep opened this issue Feb 27, 2019 · 1 comment
Open

Enable a fallback mime bundle for e.g. PDF output #2325

flying-sheep opened this issue Feb 27, 2019 · 1 comment

Comments

@flying-sheep
Copy link
Contributor

Widget._ipython_display_() just creates plaintext and the widget mimetype.

subclassing widgets should have a way to inject their own.

For this, we should replace the use of _ipython_display_ with the use of _repr_mimebundle_. Then we can do:

def MyWidget(Widget):
    def _repr_mimebundle_(self):
        return {
            **super()._repr_mimebundle_(),
            'text/latex': ...
        }
@vidartf
Copy link
Member

vidartf commented Mar 4, 2019

Thanks. I think the plan is to make this switch for the next major release, c.f. #1811.

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

No branches or pull requests

2 participants