Reputation: 40237
I wonder if there is any way to make a plantuml two sequence diagram in single page side by side. I want to keep the same actor names in both diagram. Currently if I do something like below, it automatically combined into single sequence diagram.
@startuml
Bob -> Alice : hello
@enduml
@startuml
Bob -> Mark : Hi
@enduml
But expected two sequence side by side
Upvotes: 19
Views: 17795
Reputation: 8098
if you just want to mark "newpage" you can try something like this
@startuml
' define
!define NEW_PAGE_1 == newpage ==
!definelong NEW_PAGE_2(obj)
note over obj: newpage
!enddefinelong
' main
Bob -> Alice : hello
NEW_PAGE_1
Bob -> Mark : Hi
NEW_PAGE_2(Bob)
Bob -> Carson
@enduml
Upvotes: 3
Reputation: 8098
newpage: The newpage keyword is used to split a diagram into several images.
@startuml
header SayHello
footer Page %page% of %lastpage%
Bob -> Alice : hello
newpage last page
Bob -> Mark : Hi
@enduml
Result:
You also could define a variable like "PAGE_SETTING" to decide whether on or off it.
@startuml
' seton demo
!define PAGE_SETTING newpage
header SayHello
footer Page %page% of %lastpage%
Bob -> Alice : hello
PAGE_SETTING
Bob -> Mark : Hi
@enduml
Result:
Upvotes: 27