Version 16 (modified by rjollos, 22 months ago) (diff)

Added syntax highlighting.

The trunk is a development version that works with Trac 0.11 and later. The code is thought to be stable, but please be ready to do some testing and report defects if you intend to install it on a production system. A tag will be created for version 2.0 when the code is known to be stable. Posting a note to #9958 about your experience using the plugin would be very appreciated.

Planned Enhancements

  • Work towards v2.0, improving documentation and fixing minor defects.
  • Render plantuml files from repository #7053.


  • 19-March-2012: License changed from GPL to BSD 3-Clause, which is the license used by Trac.

Render PlantUML Diagrams


PlantUML is a java utility that allows generation of different types of UML diagrams (sequence, activity, state, use cases, objects, ...) from a simple text description file.

This plugin allows the integration of PlantUML on Trac Wiki pages, dynamically generating and embedding the diagrams.


  1. As a WikiProcessor with markup:
    Alice -> Bob: Authentication Request
    Bob --> Alice: Authentication Response
    Alice -> Bob: Another authentication Request
    Alice <-- Bob: another authentication Response
  2. More information on the PlantUML language and different types of UML diagrams can be found in PlantUML Website


  1. Be noticed:
    1. Below instructions should be specific for some O.S. Please, help expanding this instructions.
    2. Broader installation guidelines are made available at TracPlugins
    3. Unused sections are suggested to be kept under comment. In future you might need it. For example:
      1. '''Check''' dependencies:
         i. none required
    4. [sudo], when used, is optional case you already have enough authority to modify your server.

  2. Check dependencies:
    1. a valid Java runtime
    2. plantuml.jar: save it to the location that you'll specify in the configuration section /path/to/plantuml.jar.
      • $ [sudo] wget
      • Check version of PlantUML jar:
        $ cd /path/to/plantuml.jar
        $ [sudo] java -jar plantuml.jar -version
    3. Graphviz: check if installed and working as required in graphvizdot.
      $ [sudo] java -jar plantuml.jar -testdot

  3. Install component:
    • with easy_install, globally:
      $ [sudo] easy_install

  4. Enable this component as follows:
    • by updating trac.ini file under appropriate configuration section;
      plantuml.* = enabled
    • or accessing your Admin panel (under selected Trac environment ..admin/general/plugins ).

  5. Configure Trac environment as follows:
    • by updating trac.ini file under appropriate configuration section;
      plantuml_jar = /path/to/plantuml.jar
      java_bin = /path/to/java_bin (optional, if Java binary is not on the search path)
      • example plantuml_jar = /project-resources/trac/plugins
      • example java_bin = java assumes that the Java binary is on the search path.

    • or accessing your Admin panel (under selected Trac environment ..admin/general/plugins ).

  6. Restart web server:
    • Apache on Ubuntu, example command line:
      $ [sudo] /etc/init.d/apache2 restart

  7. Test if this component is working properly (main environment and secondary ones if you have).
    1. If this component is installed correctly, then the example shown in the #Usage section should be also displayed on the WikiMacros#PlantUML-macro page.

Bugs/Feature Requests

Existing bugs and feature requests for PlantUmlMacro.

If you have any issues, create a new ticket.

Source & Download

You can check out PlantUmlMacro using Subversion, or browse the source with Trac, or download the zipped source.

Recent Changes

[13476] by rjollos on 2013-12-15 10:00:18
2.0dev: Restore Python 2.4 compatibility after [13395]. Fixes #11364, Refs #10998.

Untested patch. Please report any issues to #11364.

[13397] by rjollos on 2013-09-19 11:00:08
Fixed some defects in [13395]: added support for image maps. Refs #10998.

It seems that PlantUML only supports using stdin and stdout together, and there doesn't seem to be a way to generate the image map content when outputting to stdout. The documentation on image maps from PlantUML is almost non-existent, so it is hard to be sure. Therefore, we output the markup to a file, and pass the filepath of the markup file to PlantUML, outputting the png and cmapx to files in the same directory.

Thanks to Erwin Rademakers for coming up with this solution, and testing r13395.

[13395] by rjollos on 2013-09-19 04:19:10
Added support for image maps. Refs #10998.

Thanks to Erwin Rademakers for the initial version of the patch applied here.


Author: airadier
Maintainers: airadier, rjollos
Contributors: ebencheung
License: BSD 3-Clause

Attachments (1)

Download all attachments as: .zip