10BC0 TeX on Markup widgets Div, Paragraph by IuryPiva · Pull Request #11585 · bokeh/bokeh · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@IuryPiva
Copy link
Contributor
@IuryPiva IuryPiva commented Sep 10, 2021
from bokeh.io import show
from bokeh.models import Div

div = Div(text="""This text includes some math $$\sin(x)$$ and is <b>html</b>!""", enable_tex=True, width=200, height=100)

show(div)

image

const div = new Div({
  text: `When \\(a \\ne 0\\), there are two solutions to \\(ax^2 + bx + c = 0\\) and they are
    $$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}.$$`,
})

await display(div, [320, 120])

image

Discussion on bundler and finding mathstrings #11589

@IuryPiva IuryPiva self-assigned this Sep 10, 2021
@IuryPiva IuryPiva added this to the 2.4 milestone Sep 10, 2021
@tcmetzger
Copy link
Member

(Narrative) documentation will be included in #11544

@mattpap
Copy link
Contributor
mattpap commented Sep 13, 2021

We've just discussed the remaining required changes, so this should be finished soon.

@bryevdv
Copy link
Member
bryevdv commented Sep 13, 2021

Thanks @mattpap @IuryPiva for getting this over the finish line

@bryevdv
Copy link
Member
bryevdv commented Sep 13, 2021

@mattpap is this good to merge now? I would like to cut the RC today if possible

@mattpap mattpap merged commit 051ea58 into branch-2.4 Sep 13, 2021
@mattpap mattpap deleted the iurypiva/mathtext-on-div-widget branch September 13, 2021 18:59
@tcmetzger tcmetzger mentioned this pull request Dec 6, 2021
7 tasks
bryevdv pushed a commit that referenced this pull request Dec 13, 2021
* TeX working on div widgets

* add missing inline prop to bokeh

* baselins for tex on div

* check for property exist instead of getting all property values

* restore default options

* use mathjax namespace

* export mathjax provider

* update div imports

* remove log and unnecessary filter

* update mathjax namespace

* update find math function

* unit tests find_math_parts

* update docstrings

* check for mathstrings by default; have a disable flag

* update markups to accept tex

* update import order

* update baselines

* remove outdated baselines

* change is_tex_string to contains_tex_string

* give latex tests some threshold

* threshold fix

* fix wrong style on paragraph

* remove needless thresholds

* removed tex support from pre

* Fix typo

* smaller sample text for pre test not latex

* update pre baselines

* use doublequotes

* snake case

* remove random whitespace

* update docstrings

* replace find math with regexs and mathjax implementation

* move processing of tex to views

* output which tests has caused errors

* update contains_tex check

* check if parts are undefined

* update docstrings

* add line between tests

* remove test description

* rename find_math to find_tex

* remove todo warning

* remove needless regex flag

* update provider interaction

* make code consistent with other markups
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0