Selecting the diagram style

0 votes
asked Sep 26 in Question / help by allwi (120 points)

Hi, for a while I'm using PlantUML to create sequence diagram.
Everything works fine ... but looked a bit boring and "geek"-like.

So I google for nice sprites and found PlantUML Icon-Font Sprites https://github.com/tupadr3/plantuml-icon-font-sprites#plantuml-icon-font-sprites 
I included the sprites successfully in my sequence diagram but as soon as I used them, I got a syntax error.
After some investigation, I discovered that PlantUML tries to create state diagrams and certain elements of the sequence diagram (like the separator) are not valid.

So my two questions:

 1. How does PlantUML decide which diagram type to draw?
 2. How can I change this to sequence diagrams?

**Example**

    @startuml
    !pragma teoz true
    skinparam defaultTextAlignment center
    
    !include puml-icons/common.puml
    !include  puml-icons/font-awesome-5/user.puml
    
    hide footbox
    /'FA5_USER(Alice, Alice)
    FA5_USER(Bob, Bob)'/
    
    Alice -> Bob: Authentication Request
    Bob --> Alice: Authentication Response
    @enduml

    @startuml
    !pragma teoz true
    skinparam defaultTextAlignment center
    
    !include puml-icons/common.puml
    !include  puml-icons/font-awesome-5/user.puml
    
    hide footbox
    FA5_USER(Alice, Alice)
    FA5_USER(Bob, Bob)
    
    Alice -> Bob: Authentication Request
    Bob --> Alice: Authentication Response
    @enduml


  [1]: https://github.com/tupadr3/plantuml-icon-font-sprites#plantuml-icon-font-sprites
  [2]: https://i.stack.imgur.com/gxi7m.png
  [3]: https://i.stack.imgur.com/IJUAp.png

commented Sep 26 by albert (2,540 points)
In the last comment of the issue: https://github.com/tupadr3/plantuml-icon-font-sprites/issues/2 I read "This is now included in V1.2017.19", did you try the direct from plantuml? I tried the example they gave themselves but this doesn't work ( :-( )

1 Answer

0 votes
answered Sep 26 by plantuml (205,520 points)

About your point 2, you can use :

@startuml
!pragma teoz true
skinparam defaultTextAlignment center

!include <tupadr3/common>
!include <tupadr3/font-awesome-5/user>

hide footbox
participant Alice as "<$user> Alice"
participant Bob as "<$user> Bob"

Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@enduml

http://www.plantuml.com/plantuml/uml/ROr1JWCn34NtFeKxOXjrWTYWgcev0k82RiRJHYHsI6nHSNf2owRIBB_ztl-7RjJCIuPDRNGkXCRwWzQSeNycgTIeuCmBUROFljenfxCK5iF8Ojm0DabYzfbnPrvfRi_RgAMex5S-Yue5-kQkXSFBrZktFS0b3MPHjPDUeLAp55EbCJ768YDrd7PFD_P-cHwWDpqz82DF07SrtE8h7jqkB4CXIohupb_EtU1F3U6_TONgLQKp75XcB_aN

commented Sep 27 by anonymous

Hi plantuml,

thanks for your quick answer. The old syntax worked and the new syntax (sorry, I didn't know that's included already) works also very well.

But even with the new syntax, I only get state and not sequence diagrams:

@startuml
' PlantUML stdlib now includes Icon-Font Sprites! See https://github.com/tupadr3/plantuml-icon-font-sprites

!include <tupadr3/common>
!include <tupadr3/font-awesome-5/user>

title Styling example

FA5_USER(Alice, Alice)
FA5_USER(Bob, Bob)

Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@enduml

...