CDSoft / pp

PP - Generic preprocessor (with pandoc in mind) - macros, literate programming, diagrams, scripts...
http://cdelord.fr/pp
GNU General Public License v3.0
252 stars 21 forks source link

Question: Passing options to diagram renderers #49

Closed bpj closed 6 years ago

bpj commented 6 years ago

Is it possible to pass options to diagram renderers (e.g. --no-shadows to ditaa)? If not is it something you might consider adding?

CDSoft commented 6 years ago

It's currently not possible. But most of the diagram languages can have the same effect by using commands in the script itself. ditaa is not directly embedded in pp, I now use the ditaa version that comes with plantuml (see http://plantuml.com/ditaa). You can pass options to ditaa like this:

!uml(image)
~~~~~
ditaa(--no-shadows, scale=0.8)
/--------\   +-------+
|cAAA    +---+Version|
|  Data  |   |   V3  |
|  Base  |   |cRED{d}|
|     {s}|   +-------+
\---+----/
~~~~~

In this example, options are handled by plantuml (hence !uml), not by pp.