Repository navigation
LaTeX code in radio bullets #10209
Replies: 2 comments
|
LaTeX rendering in marimo's Solution 1: Use raw strings (most common fix)Python string escaping can break LaTeX. Use raw strings: import marimo as mo
options = {
r"$x^2 + y^2 = r^2$": "circle",
r"$\frac{a}{b}$": "fraction",
r"$\int_0^\infty e^{-x} dx$": "integral"
}
radio = mo.ui.radio(options=options, label="Choose:")The Solution 2: Use
|
|
I checked this against marimo 0.25.0. The limitation is in For an assessment, a working layout is to let the radio select a letter, and render the equations as Markdown below the choices: import marimo as mo
answer = mo.ui.radio(
options={"A": "circle", "B": "fraction"},
label="Choose the correct equation",
)
mo.vstack([
answer,
mo.md(r"**A.** $x^2 + y^2 = r^2$"),
mo.md(r"**B.** $\frac{a}{b}$"),
])In a downstream cell, read |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am developing a multiple-question assessment. I have a problem: LaTeX code does not render in a radio bullet. Please see the attached image.

Does anyone know how I can overcome this problem?
Thanks.
All reactions