Open mood-indigo opened 1 year ago
I'm not sure whether the bug is in iplantuml or plantweb. I did an experiment based on Python API, I use this code cell
from plantweb.render import render
CONTENT = """
Bob -> Alice : Can you solve: <math>ax^2+bx+c=0</math>
Alice --> Bob: <math>x = (-b+-sqrt(b^2-4ac))/(2a)</math>
"""
output = render(
CONTENT,
engine='plantuml',
format='svg',
cacheopts={
'use_cache': False
}
)
with open("alice+bob.svg", "wb") as f:
f.write(output[0])
The AsciiMath code was not correctly formatted. But when I changed the format to png
, it turned out correct.
This shows that the bug is in plantweb.
I copied this example from Math in PlantUML
to p.uml
In a JupyterLab notebook, I have this code cell
The generated p.svg does not shows beautiful math, it still shows the AsciiMath code:
But when I changed the code cell to
the generated p.png looks beautifully formatted.![p](https://user-images.githubusercontent.com/112918814/223717830-0b94c4fb-5ea9-41e4-a40f-b3818b138541.png)
The
--format auto
and--format svg
do not correctly format the AsciiMath and jLatexMath code.