I have a simple PlantUML
diagram in an org
file and I want to export the entire document to pdf. The problem is that the diagram is embedded correctly, but the picture takes up an entire page. SECOND, the image gets input twice--so need to remove the extra copy. So I am trying to figure out how to resize the picture.
The code I am using looks like this.
#+NAME: classdiagram
#+BEGIN_SRC plantuml :width 5cm :height 5cm :file try.png
@startuml
Class01 <|-- Class02
@enduml
#+END_SRC
But when I create the latex and generate the PDF, the PNG file takes up the entire page. I tried to generate a JPG as well, but still no luck.
I tried a few different ways to get this to work like:
#+NAME: classdiagram
#+ATTR_LATEX: :width 0.6
#+BEGIN_SRC plantuml :file try.png
@startuml
Class01 <|-- Class02
@enduml
#+END_SRC
However, the sticking point seems to be that the Latex
that is generated looks like this:
\includegraphics[width=.45\linewidth]{try.png}
\begin{center}
\includegraphics[width=.9\linewidth]{try.png}
\end{center}
NOTE: This image gets imported twice, which also needs to be corrected.
Anyone know the right way to fix this and resize the image?
package.el
please test withemacs -Q -f package-initialize
whether you also get the duplicated images. If you don't usepackage.el
please test withemacs -Q
.