#plantuml

1 messages · Page 1 of 1 (latest)

placid mason
#

PlantUML package makes the charts but won't place them in the document.

#

I'm trying to write plantmul diagrams in a document. They get generated but won't be palced in my document

rain arch
#

Could you post the log file? I suspect you either didn't run with --shell-escape or have an Inkscape related issue.

placid mason
#

But here you go

rain arch
#

So can you open Documentation-plantuml-svg-converted-to.pdf with another PDF viewer?

Also, are you explicitly using draft?

1284| ! Package luatex.def Error: File `Documentation-plantuml-svg-converted-to.pdf'
1285| not found: using draft setting.
placid mason
#

I tried teh PDF with Foxit, same issue.

#

SVG's show up just fine if I put them in

rain arch
#

Have you checked that you can actually call inkscape since you enable an epstopdf rule for it?
\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{inkscape -z --file=#1 --export-pdf=\OutputFile}

E.g. have you tried running inkscape -z --file=Documentation-plantuml.svg --export-plantuml-svg-converted-to.pdf in a prompt?

rain arch
placid mason
#

Dunno why

#

Like I can put any svg I want in my document and it'll show up in it, but PlantUML just doesn't

rain arch
#

Can you try running the command in a prompt (instead of letting the LaTeX compiler call the command for you)

placid mason
#

Also again, if I put an SVG in my LaTeX file directly, it gets converted to PDF and palced in teh document. Dunno why Plant UML doesn't do it

rain arch
#
\documentclass[12pt, a4paper]{report}

\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage[output=svg]{plantuml}
\usepackage{svg}

\epstopdfDeclareGraphicsRule{.svg}{pdf}{.pdf}{
  inkscape.com -z --file=#1 --export-pdf=\OutputFile
}

\begin{document}
\begin{plantuml}
@startuml
class Car

Driver - Car : drives >
Car *- Wheel : have 4 >
Car -- Person : < owns
@enduml
\end{plantuml}

\bigskip
\includesvg{Documentation-plantuml-copy.svg}

\bigskip
\includegraphics{Documentation-plantuml-copy.svg}
\end{document}

This is a mwe I can generate on my end. I've added the .com prefix so that Inkscape will output errors when the latex compiler calls it (otherwise, it fails silently on Windows). Note Documentation-plantuml-copy.svg is just a copy of the plantuml output that I backed up after compiling once.

if I put an SVG in my LaTeX file directly

How did you include it in your document? As you can see above, one can either rely on the svg package through the \includesvg command, which takes care of correctly calling whatever conversion backend (Inkscape most likely) or through \includegraphics, like a normal figure, which then relies on the \epstopdfDeclareGraphicsRule in the preamble.

It's hard to say what is going wrong without access to your machine, but hopefully the code above can help you narrow down the issue.

#

Here's the svg file that I backed up if you can't generate it for some reason

placid mason