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

Hoist typesetting to widget manager interface? #3849

Open
bollwyvl opened this issue Oct 10, 2023 · 2 comments
Open

Hoist typesetting to widget manager interface? #3849

bollwyvl opened this issue Oct 10, 2023 · 2 comments

Comments

@bollwyvl
Copy link
Contributor

References

Problem

In the absence of window.MathJax.Hub.Queue, fancy description typesetting fails.

Proposed Solution

As this seems like an host application-level concern, moving this to the manager would ensure that applications could provide this capability more robustly.

Some of the following might work:

  • add a typeset? to IWidgetManager and prefer this
  • add typeset(element: HTMLElement, text: string, manager?: IWidgetManager)
    • prefer the manager's typesetter, fall back to the window-level method otherwise to maintain backwards compatibility

Additional context

It would actually be quite nice if these were actually run through text/ipython-gfm typesetting, but this would be a breaking change if folk expected only $ replacement, unless it was opt-in.

@ibdafna
Copy link
Member

ibdafna commented Feb 20, 2024

@bollwyvl this should be fixed by your work in #3847 . Good to close this issue?

@bollwyvl
Copy link
Contributor Author

No, this hasn't been PRd yet. As it would be an additive feature to the manager interface, I'm not sure if this would be a breaking change... I haven't looked for in-the-wild uses of DescriptionView.typeset.

I think the larger point would be looking at a bunch of places where typeset is used (and some places it probably isn't but should be) and using the host application's markdown renderer so that latex just shakes out of it.

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

No branches or pull requests

2 participants