DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:plantuml

plantuml Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" unknown

plugin Create UML diagrams

Last updated on
2015-06-19
Provides
Syntax
Repository
Source

Similar to graphviz, seqdia

Tagged with diagram, uml

Download and Installation

Download and install the plugin using the Plugin Manager using this URL given above. Refer to Plugins on how to install plugins manually.

Two modes are available: local rendering or remote rendering.

Local Rendering

If you choose local rendering, you'll need

PlantUML doesn't require anything more to render sequence diagrams. However, for other diagram types, you'll also need to install

See PlantUML Installation Notes for troubleshooting.

Remote Rendering

The plugin can use PlantUML server to generate diagrams. So nothing is required to be installed on the server running DokuWiki. However, the server must have a access to the Web. This can be an issue if you're on a Corporate network for example.

If you set java and plantuml location in the configuration (in the Administration section of DokuWiki), then java will be used to compress the url.

History

  • 2011-07-16
    • Fixed issue: remote rendering failed
  • 2011-19-03
    • Fixed issue #10 (plantuml base field should be lowercase)
  • 2011-31-01
    • Added support for width in percent
  • 2010-12-19
    • Fixed attributes not captured correctly (width, multi word title)
    • Added ability to view the unresized version of the images.
  • 2010-12-04
  • 2010-10-08
    • Very first version posted on GitHub.

Syntax and Usage

Please refer to http: http://plantuml.sourceforge.net/ do get full description of the PlantUML syntax.

With PlantUML, you can draw:

  • sequence diagram,
  • use case diagram,
  • class diagram,
  • activity diagram,
  • component diagram,
  • state diagram
  • object diagram

A typical PlantUML diagram is enclosed by @startuml and @enduml. Replace these by <uml> and </uml>.

This block:

<uml>
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
</uml>

renders this:

Control display size

Inside the start tag <uml>, you can specify the width and/or height of the image using one of the following ways:

<uml w=100>
<uml w=80%>
<uml width=100>
<uml width=80%>
<uml 100x200>

Image Title

By default, html img title attribute is set to “PlantUML Graph”. You can specify your own graph title like this:

<uml title="This will be the title">
<uml t=Diagram>

Note: Multiple words need to be placed in double quotes.

Issues

  • Doesn't seem to allow a backslash character so cannot enter newline.
    I've tried disabling all other plugins. It appears to be running standard syntax processing on the text. 2012-03-13 JK

  • Colors, bold, etc. don't seem to work for me

  • “\n” is not supported as described in http://plantuml.sourceforge.net/sequence.html
    Could it be possible to fix this or to have a workaround for multiple lines in boxes?
    Many Thanks Joe, 2013-05-29

You can use the alternative method (for notes at least) described on that page:

note left
	a note
	can also be defined
	on several lines
end note
  • farm mode
    This plugin fails in farm mode. Report to the Github issue.

    You can workaround adding one line in <farmer>/lib/plugin/plantuml/syntax.php
        function _cachename($data, $ext){
            unset($data['width']);
            unset($data['height']);
            unset($data['align']);
            unset($data['title']);
        +++ unset($data['animal']);
            return getcachename(join('x', array_values($data)), ".plantuml.$ext");
        }

    atisneatisne

    2015-07-16 14:56

getting it to work under Windows

Don't forget that Windows paths need to be enclosed in double-quotes if they contain spaces e.g. “C:\Program Files\Java\jre1.8.0_91\bin\java.exe” 1)

(PS seems to work fine for local rendering in Release 2016-06-26a “Elenor of Tsort”, although it does take nearly 10 seconds to render even simple diagrams)

— martin 2016-02-27 15:56

1)
I imagine it will get tedious changing the java version; is there a way to make this version independent?
plugin/plantuml.txt · Last modified: 2017-02-27 17:14 by 195.43.48.142