Opened 3 years ago

Closed 3 years ago

Last modified 17 months ago

#62933 closed defect (fixed)

plantuml doesn't support latex

Reported by: catap (Kirill A. Korinsky) Owned by: judaew (Vadym-Valdis Yudaiev)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: plantuml

Description

Any attempt to use plantum to render something with latex produces a error like that:

formula=x
Latex=x
java.lang.ClassNotFoundException: org.scilab.forge.jlatexmath.TeXFormula
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at net.sourceforge.plantuml.math.TeXIconBuilder.<init>(TeXIconBuilder.java:53)
	at net.sourceforge.plantuml.math.LatexBuilder.buildIcon(LatexBuilder.java:67)
	at net.sourceforge.plantuml.math.LatexBuilder.getImage(LatexBuilder.java:83)
	at net.sourceforge.plantuml.math.ScientificEquationSafe.getImage(ScientificEquationSafe.java:116)
	at net.sourceforge.plantuml.creole.atom.AtomMath.drawU(AtomMath.java:98)
	at net.sourceforge.plantuml.creole.SheetBlock1.drawU(SheetBlock1.java:174)
	at net.sourceforge.plantuml.creole.SheetBlock2.drawU(SheetBlock2.java:95)
	at net.sourceforge.plantuml.skin.rose.ComponentRoseDivider.drawInternalU(ComponentRoseDivider.java:115)
	at net.sourceforge.plantuml.skin.AbstractComponent.drawU(AbstractComponent.java:78)
	at net.sourceforge.plantuml.sequencediagram.graphic.GraphicalDivider.drawInternalU(GraphicalDivider.java:62)
	at net.sourceforge.plantuml.sequencediagram.graphic.GraphicalElement.drawU(GraphicalElement.java:60)
	at net.sourceforge.plantuml.sequencediagram.graphic.DrawableSet.drawPlaygroundU(DrawableSet.java:362)
	at net.sourceforge.plantuml.sequencediagram.graphic.DrawableSet.drawU22(DrawableSet.java:282)
	at net.sourceforge.plantuml.sequencediagram.graphic.DrawableSet$1.drawU(DrawableSet.java:251)
	at net.sourceforge.plantuml.sequencediagram.graphic.SequenceDiagramFileMakerPuma2$1.drawU(SequenceDiagramFileMakerPuma2.java:211)
	at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:282)
	at net.sourceforge.plantuml.ugraphic.ImageBuilder.write(ImageBuilder.java:249)
	at net.sourceforge.plantuml.sequencediagram.graphic.SequenceDiagramFileMakerPuma2.createOne(SequenceDiagramFileMakerPuma2.java:222)
	at net.sourceforge.plantuml.sequencediagram.SequenceDiagram.exportDiagramInternal(SequenceDiagram.java:258)
	at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:144)
	at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:157)
	at net.sourceforge.plantuml.PSystemUtils.exportDiagramsSequence(PSystemUtils.java:201)
	at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:86)
	at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:160)
	at net.sourceforge.plantuml.DirWatcher2$1.call(DirWatcher2.java:94)
	at net.sourceforge.plantuml.DirWatcher2$1.call(DirWatcher2.java:90)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Looks like it has missed dependencies ;)

Attachments (1)

Screen Shot 2021-05-20 at 23.55.24.jpg (10.9 KB) - added by judaew (Vadym-Valdis Yudaiev) 3 years ago.
result with your minimal example

Download all attachments as: .zip

Change History (7)

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Owner: set to judaew
Port: plantuml added
Status: newassigned

comment:2 Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

This looks like the missing graphviz optional dependency. Try to install graphviz and try again. If all goes well, I will make the following changes to the port notes:

notes "
graphviz port is optional -- you don't need this if you only need sequence
and activity diagrams. Otherwise, install with
 
    sudo port install graphviz
"

If you get an error again, then send a minimal example of your diagram.

Last edited 3 years ago by judaew (Vadym-Valdis Yudaiev) (previous) (diff)

comment:3 in reply to:  2 Changed 3 years ago by catap (Kirill A. Korinsky)

Replying to judaew:

This looks like the missing graphviz optional dependency. Try to install graphviz and try again.

If all goes well, I will make the following changes to the port notes.

My machine has installed graphviz and textlive-full, so it isn't something like that.

If you get an error again, send a minimal example of your diagram.

Sure,

@startuml
-> test: <latex>\epsilon</latex>
@enduml

It should be rendered like that: http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuTArKoX9BIwnKh39IIn9hR2BIIqepip9pxFHX_2v75BpKe0A0G00

comment:4 Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

Thanks, your example helped a lot.

I created a PR with the fix: https://github.com/macports/macports-ports/pull/11092

Feel free to leave feedback or reopen the ticket.

Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

result with your minimal example

comment:5 Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

Resolution: fixed
Status: assignedclosed

In 0bb6a3d0391d29c65b74478666169a9fbe8d1af3/macports-ports (master):

plantuml: Add support for JLaTeXMath and change note

Fixed: #62933

comment:6 Changed 17 months ago by Vadym-Valdis Yudaiev <judaew@…>

In 2935a63e7eca3c593741b090e2d5be5cd78f762a/macports-ports (master):

plantuml: Update to 1.2022.14

Changes:

  • use GitHub releases
  • use latest Java LST as fallback.java
  • add jlatexmath variant
  • remove patch

Fixed: #66473
See: #62933

Note: See TracTickets for help on using tickets.