You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it would be possible to add support for Latex strings? The package Latexify is pretty useful for producing and displaying the differential equations used in your code, but unfortunately they are not correctly rendered with Quarto (korsbo/Latexify.jl#222). I have tried to convert it using Markdown.parse(), but sadly this also does not render.
MWE below.
Using ParameterizedFunctions, Latexify
sir_ode = @ode_def SIRModel begin
dS = -β*S*I
dI = β*S*I-γ*I
dR = γ*I
end β γ
latexify(sir_ode)
Output in the notebook (i.e. doesn't render the equation):
L"\begin{align}
\frac{dS(t)}{dt} =& - \beta I\left( t \right) S\left( t \right) \\
\frac{dI(t)}{dt} =& - \gamma I\left( t \right) + \beta I\left( t \right) S\left( t \right) \\
\frac{dR(t)}{dt} =& \gamma I\left( t \right)
\end{align}
"
latexify(sir_ode) |> Markdown.parse # or Markdown.parse("$(@latexrun $(sir_ode))")
\begin{align} \frac{dS(t)}{dt} =& - \beta I\left( t \right) S\left( t \right) \ \frac{dI(t)}{dt} =& - \gamma I\left( t \right) + \beta I\left( t \right) S\left( t
\right) \ \frac{dR(t)}{dt} =& \gamma I\left( t \right) \end{align}
A similar result occurs when using the suggested Markdown.parse(latexify(sir_ode), double_linebreak=true)
The text was updated successfully, but these errors were encountered:
I was wondering if it would be possible to add support for Latex strings? The package
Latexify
is pretty useful for producing and displaying the differential equations used in your code, but unfortunately they are not correctly rendered with Quarto (korsbo/Latexify.jl#222). I have tried to convert it usingMarkdown.parse()
, but sadly this also does not render.MWE below.
Output in the notebook (i.e. doesn't render the equation):
A similar result occurs when using the suggested
Markdown.parse(latexify(sir_ode), double_linebreak=true)
The text was updated successfully, but these errors were encountered: