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

TeX on Markup widgets Div, Paragraph #11585

Merged
merged 45 commits into from
Sep 13, 2021
Merged

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 In Progress in CZI R3: LaTeX, maintenance and exports via automation 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

bokeh/embed/bundle.py Outdated Show resolved Hide resolved
bokeh/embed/bundle.py Outdated Show resolved Hide resolved
bokehjs/test/framework.ts Outdated Show resolved Hide resolved
@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
CZI R3: LaTeX, maintenance and exports automation moved this from In Progress to Done 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants