4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PlantUMLで、labelなんかにUML他を埋め込む方法

Posted at

基本

PlantUMLで、labelなんかにsaltを埋め込むには

{{
salt
    {
        []  ここにsaltを書く
    }
}}

ってやれば、埋め込む事が出来る。12

label salt [
    {{
    salt
        {
            []  ここにsaltを書く
        }
    }}  
]

SoWkIImgAStDuSf9J4hDKKXMYEQghkOgJimfuQhcKb28ZbLGUDmu6OnMWqGVDqrwDdl7uyP-hbekhjfQhbWkXzIy5A010000.png

で、

(説明文書が見あたらないが、)@startXXX宣言があるものの多くは、

{{XXX

    'ここにPlantUML他の目的の構文を

}}

で埋め込むことができる。3

@startuml

object a 

label salt [
    {{
    salt
        {
        	"salt"
        	[]  ここにsaltを書く
        }
    }}
]

label uml [
    {{uml
        :ここから;
        note right: umlも
        :そこまで;
    }}
]

label gantt [
    {{gantt
        [ganttチャートも] lasts 5 days
        [その次のテスト] lasts 10 days
    }}
]

label yaml [
    {{yaml
        yamlも: ほら
        jsonも: 同様さ
    }}
]

a -> salt
salt --> uml
uml -> gantt
gantt -> yaml


@enduml

PL71IiD043sxNp7qNj23bnIa_n5osDfGBMi2tVLGIW-x2w8eA8eWY0Vnq8FYML7ycS5yXpDJiWaOaicyDs_cPR9Zw_J2dPuOfUh9l3nqe44feoUb0QkDWrm1NQkLl9YHHBYKxGouCEXmNW2WlvFxbMiORfl73_JNIRDM4jUgQEte8v8RvKcPjPCkCLoC4btLheJ5yUp8PToA8VGxdgJZ1_rczCzefYlNBIOejUO2CNgCBnY_.png

  • saltのみ波括弧二つの次の行で宣言 {{\nsalt
  • 残念ながらditaaや、jcckitとか出来ないものも有る。

こう言う書き方も可能

@startuml

label salt [
    {{
    salt
        {
        	"salt"
        	[]  ここにsaltを書く
        }
    }}
    
    {{uml
        :ここから;
        note right: umlも
        :そこまで;
    }}
]

@enduml

SoWkIImgAStDuUBAIKnApL4eJimfKOZcKW22wceG1HO1Cy1YS9OII5m9pesELL1ut3WPZ5Q3f1utJNesUyVZndwuabekBZ05fQkhGTR2PQrWkhiVDtLQmuNpyajI5OeoqpDAh1I0wXytDI7hc0lMiUznut9hXE6nN5nS3gbvAI3Z0G00.png

Noteなんかに埋め込むには

こんな風に

@startuml

start
: 何やら;
note right
    {{
    salt
        {
        	"salt"
        	[]  ここにsaltを書く
        }
    }}
end note

stop


@enduml

SoWkIImgAStDuU82ixYi59xidVgugULnKwSrLrv-IQf2KMPwHWcN0X1KLuEfuiGS21yi1cTnAe4ab13yw5W5XSUDay5eDKZkSTEaPxDtF6xiXwkfvGAJjLofUIaA8Dj0piWluEBYSW2A09q50000.png

VS Codeでのメモ取りに重宝している

  1. Saltをアクティビティ図の上に表示する (https://plantuml.com/ja/salt#89e5b0978f17879e )他、ネットでの例より

  2. 要素別の可否は未確認( https://plantuml.com/ja/deployment-diagram )

  3. umlの場合は省略可能

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?