Skip to main content

Latex

Display a latex formula to the user.

Examples

Basic Example

The following example demonstrate some of the available functionality for display_latex

from abstra.forms import display_latex

display_latex("\(ax^2 + bx + c = 0\)")

Basic Example

The following example demonstrate some of the available functionality for display_latex

from abstra.forms import display_latex

display_latex(
"""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}.$$"""
)

Parameters

NameDescriptionType
textThe latex formula to display to the userstr
end_programWhether the program should end after the widget is shown. Defaults to False.bool
full_widthWhether the input should use full screen width. Defaults to False.bool
button_textWhat text to display on the button when the widget is not part of a Page. Defaults to 'Next'.str