====== plantuml Plugin ====== ---- plugin ---- description: Create UML diagrams author : Andreone email : nfauvet@free.fr type : syntax lastupdate : 2015-06-19 compatible : weatherwax, detritus depends : conflicts : similar : seqdia, graphviz tags : !obsolete, uml, diagram downloadurl: https://github.com/andreone/dokuwiki_plantuml/zipball/master bugtracker : https://github.com/andreone/dokuwiki_plantuml/issues sourcerepo : https://github.com/andreone/dokuwiki_plantuml donationurl: ---- Java applets such as used in this plugin are not supported in recent browsers anymore. Alternative for this plugin is [[plugin:plantumlparser]]. ===== Download and Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. Two modes are available: local rendering or remote rendering. ==== New Plugin as replacement ==== :!: A perhaps better maintained and more stable plugin can be approached here: [[plugin:plantumlparser]] ===== Local Rendering ===== If you choose local rendering, you'll need * [[http://plantuml.sourceforge.net/download.html|plantuml.jar]] * [[http://www.java.com/download|Java runtime]] PlantUML doesn't require anything more to render //sequence diagrams//. However, for other diagram types, you'll also need to install * [[http://www.graphviz.org|Graphviz]] See [[http://plantuml.sourceforge.net/faqinstall.html|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. Note that for remote rendering, the following version seems to work better: [[https://github.com/vpsfreecz/dokuwiki-plugin-plantuml]] ===== History ===== * 2011-07-16 * Fixed issue: remote rendering failed * 2011-19-03 * Fixed issue [[https://github.com/Andreone/dokuwiki_plantuml/issues/10|#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 * Complete rewrite. * Images are now saved in the cache folder. * Remote image generation support (default to http://plantuml.no-ip.org/plantuml/uml) * Alignment support. * Odt support. * 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 ''%%%%'' and ''%%%%''. This block: Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice <-- Bob: another authentication Response renders this: {{ http://plantuml.sourceforge.net/img/sequence_img001.png }} ==== Control display size ==== Inside the start tag , you can specify the width and/or height of the image using one of the following ways: ==== Image Title ==== By default, html img title attribute is set to "PlantUML Graph". You can specify your own graph title like this: 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 [[https://github.com/Andreone/dokuwiki_plantuml/issues/21|Github issue]].\\ \\ You can workaround adding one line in ''/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"); } --- [[user>atisne|atisne]] //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" ((I imagine it will get tedious changing the java version; is there a way to make this version independent?)) (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