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
Name | Description | Type |
---|---|---|
text | The latex formula to display to the user | str |
end_program | Whether the program should end after the widget is shown. Defaults to False. | bool |
full_width | Whether the input should use full screen width. Defaults to False. | bool |
button_text | What text to display on the button when the widget is not part of a Page. Defaults to 'Next'. | str |