rkrug / plantuml

R package to build UML graphs using plantuml
https://rkrug.github.io/plantuml/index.html
GNU General Public License v3.0
76 stars 8 forks source link

Add preview to knit engine #14

Closed rkrug closed 4 years ago

rkrug commented 4 years ago

It should be relatively easy, to add an inline preview to the knit engine, as the resulting file only needs to be printed to a graphics device?

Based I=on a question from @retorquere

rkrug commented 4 years ago

Done in https://github.com/rkrug/plantuml/commit/dacde08118ca85d6cfc9c86ee855a2a0304d3508

rkrug commented 4 years ago

@retorquere Now you have an inline preview when you set plantuml.preview = TRUE

retorquere commented 4 years ago

Is this on master or on dev?

rkrug commented 4 years ago

On master. I merged it from dev.

retorquere commented 4 years ago

This is going to sound dumb, but beyond adding plantuml.preview = TRUE, what should I do? Or where should I see the preview?

rkrug commented 4 years ago

You have to run the code block in RStudio. There is a little triangle on the right of the beginning of the code block - clicking it will run the code and the graph will be shown below the code.

retorquere commented 4 years ago

I must not have upgraded properly then -- I did that and I just see the path of the image file.

retorquere commented 4 years ago

I've reinstalled the package, but no dice -- what am I doing wrong here: https://gist.github.com/b76fe910922ec31ba668f6f9c1386c45

rkrug commented 4 years ago

Hm. Works for me:

Screenshot 2020-06-23 at 14 13 20
retorquere commented 4 years ago

I've removed and reinstalled plantuml, I've cleared my environment, but it doesn't show up for me.