How to best handle acryonyms or abbreviations?

0 votes
asked Feb 22, 2021 in Question / help by Kai Hendry
I'm trying to diagram an acronym heavy architecture and I am wondering is there something like https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-abbr-element but for PlantUML?

The idea is that I would run `plantuml -tsvg test.uml`, and then the resulting SVG could have an abbreviation that can hover expansion? e.g. https://jsfiddle.net/kaihendry/3a9unmjk/

1 Answer

0 votes
answered Feb 22, 2021 by Martin (8,360 points)
edited Feb 23, 2021 by Martin
 
Best answer

You don't say what diagram type, but I think most of them support an empty Link with text & tooltip (documentation looks out of date, as the url is not marked as optional).

@startuml
rectangle A as "
Here is a [[{Three Letter Acronym} TLA]], for example.
"
@enduml

Renders as (tooltip doesn't seem to work in this answer):

(Credit to this answer for the idea).

But if you want PlantUml to support abbreviations that don't look like a broken link, then you could post a wanted feature (suggesting new syntax, or suggesting a style override option for the link text).

PS 

You can style the hyperlink colour within limitations (you can't target an individual hyperlink, and I couldn't find a way to suppress the displaying of the stereotype text other than a global hide).

@startuml
hide stereotype
<style>
.abbr {
  hyperlinkColor #black
}
</style>
rectangle A <<abbr>> as "
Here is a [[{Three Letter Acronym} TLA]], for example.
"
@enduml

...