# Formulas in the Text control

posted 4 years ago

Hi,

is there a 'natural' way to get a formula output in the gui?

Let's say something like an equation (not very complex) as content of a Text control or label.

I would like to avoid to do something like transform a latex equation to a png and add it as

an ImageView.

Thanks for any hints,

Marco

P.S.: I am still stuck with javafx 1.3.

is there a 'natural' way to get a formula output in the gui?

Let's say something like an equation (not very complex) as content of a Text control or label.

I would like to avoid to do something like transform a latex equation to a png and add it as

an ImageView.

Thanks for any hints,

Marco

P.S.: I am still stuck with javafx 1.3.

posted 4 years ago

I am not sure if JavaFX supports it.

But it would be better if you could move to JavaFX 2.0 as you know JavaFX 1.3 is no longer supported. And you would surely want to get hold of the latest developments happening.

If you still want to stick with JavaFX script - you can check out the DSL- Visage.

But it would be better if you could move to JavaFX 2.0 as you know JavaFX 1.3 is no longer supported. And you would surely want to get hold of the latest developments happening.

If you still want to stick with JavaFX script - you can check out the DSL- Visage.

Mohamed Sanaulla | My Blog

John Damien Smith

Ranch Hand

Posts: 270

13

posted 4 years ago

For JavaFX 2.0+ use http://www.mathjax.org/ in a webview to display math.

Some simple mathml (http://www.w3.org/Math/) equations will also work in webview.

An example of mathml usage in JavaFX is here: https://gist.github.com/1775799 "Display a Quadratic formula in JavaFX using MathML in a WebView"

Some simple mathml (http://www.w3.org/Math/) equations will also work in webview.

An example of mathml usage in JavaFX is here: https://gist.github.com/1775799 "Display a Quadratic formula in JavaFX using MathML in a WebView"