How to use the themes?

0 votes
asked May 7, 2021 in Question / help by anonymous

I notice the github page contains a themes folder, but I can't find out from the docs how you include those themes in a plantuml file. I tried just including the path to the file in the repo, but that didn't work... I know I can follow the instructions here to  include a theme, but it looks like they're now available within standard plantuml, but it's not documented?

2 Answers

0 votes
answered May 7, 2021 by plantuml (294,960 points)

Right now, it's still work in progress.

It's available as beta on the online server, but not really documented nor finished.

You have to wait until next official release, in a couple of weeks.

We'll post a message here when this will be ready.

Thanks!

commented May 7, 2021 by The-Lu (63,920 points)

Hello all,

I have just beginning the documentation with:

@startuml
!theme silver
a -> b
@enduml

on:

TBC... wink 
Regards,
Th.

0 votes
answered May 8, 2021 by anonymous

My own solution, which might be useful until the new official version drops was to clone the themes repo (into ~/misc/puml-themes) and then use the following function:

!$THEMEPATH=%getenv("HOME")+"/misc/puml-themes/themes/"
!function $themeinclude($p)
!$PPATH = $THEMEPATH+$p+"/puml-theme-"+$p+".puml" 
!return $PPATH
!endfunction

Then use it as !themeinclude("minty") or whatever.

commented May 8, 2021 by plantuml (294,960 points)

Ok, I see.

This bring us to another idea :-)

Maybe we could extends the !theme directive so that you could have :

!theme minty from %getenv("HOME")+"/misc/puml-themes/themes/"

or

!theme minty from http://whatever.com/themes/

And this would also do the concatenation to puml-theme-minty.puml for you

What do you think about it ?

commented May 8, 2021 by anonymous
Yeah! I mean, it would be great to be able to use the !theme functionality to use themes beyond the original set. That said, it's not that hard to import a theme manually, so I think the most important thing is to make using the builtin themes as easy as possible.
...