#plantuml
1 messages · Page 1 of 1 (latest)
I'm trying to write plantmul diagrams in a document. They get generated but won't be palced in my document
Could you post the log file? I suspect you either didn't run with --shell-escape or have an Inkscape related issue.
I'm certain it ran because teh SVG was made after I told latex to compile teh document
But here you go
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.
I never set anything about draft
I tried teh PDF with Foxit, same issue.
SVG's show up just fine if I put them in
Don't know... Works on my end...
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?
Latex can't directly process SVGs, hence the need to call Inkscape to convert it.
Ye and I can convert the SVG using inkscape, but in this scenario, it just doesn't happen
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
I've seen Windows users complaining Inkscape is troublesome to run through cmd.exe. The docs also have some insight there. https://inkscape.org/learn/faq/#how-to-use-inkscape-from-the-command-line
Can you try running the command in a prompt (instead of letting the LaTeX compiler call the command for you)
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
\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
Yes, includesvg. Includegraphics is for raster