Show param docstrings with LaTeX rendering
Is your feature request related to a problem? Please describe.
I’m using a pn.Param() object which shows my parameters as inputs with the docstring visible on hover - but my docstrings contain LaTeX text and are not being rendered properly.
Describe the solution you'd like
Is there a way to to get these docstrings to format correctly (e.g. in
example_param = param.Number(label="example", doc=r"an example of $LaTeX$ formatting, $\frac{1}{2}$"), how to get this to render correctly in the GUI?
Describe alternatives you've considered
I am aware of pn.pane.LaTeX but this does not interact with pn.Param objects unfortunately.
Additional context
Could you try if adding pn.extension('mathjax') or pn.extension('katex') solves your problem?
Unfortunately doesn't work - i've had pn.extension('katex', 'mathjax', notifications=True) in my code for a while, and LaTeX panes show up fine - they just don't support Param objects, hence no formatting for docstrings or labels.
This will probably require a change in Bokeh to allow LaTeX rendering in the tooltips. Thoughts @mattpap?
Yes it will, but it would be even better if it "just worked" in all relevant contexts without the need for intervention everytime.
any workarounds? it would be good to have this solved. Also unicode characters in names or labels are not displayed correctly either. You can use them for attribute names but then the gui displays a "^" character.
class Sky(param.Parameterized):
name = param.String(default='Sky',)
λ_min = param.Number(default=1.0, doc=r"$$\lambda_{min}~[μm]$$")
This won't display correctly in the panel.