Closed dsanson closed 12 years ago
Alt text and ditaa options should be supported, but I am not sure about the best syntax yet. The markdow should not lead to errors if processed without the ditaa-markdown filter. Just allowing arbitrary text will make the source a custom non-compatible variant of markdown. At least ditaa options can be supported similar to the existing .numberLines
feature. At least this works, even with the scale
option:
~~~~ {.ditaa .no-separation .no-shadows .scale:0.4}
We could support image captions similar to table captions:
~~~~ {.ditaa}
...
~~~~
Figure: Hello world
would become
![Hello World](image-1.pdf "Hello world")
I merged your fork and modified the syntax as described above.
Nice! Good point about compatibility. And much more elegant code than my kludgy perl :-)
On Thu, Jan 19, 2012 at 5:26 AM, Jakob Voss reply@reply.github.com wrote:
I merged your fork and modified the syntax as described above.
Reply to this email directly or view it on GitHub: https://github.com/nichtich/ditaa-markdown/issues/2#issuecomment-3560714
Well, the Perl code is just a hacked prototype anyway. I stable solution would be written in Haskell ;-)
Often in the same document I like to have both diagrams with
--no-separation
and diagrams with separation. So it would be nice to be able to pass options to ditaa on a per image basis.In my fork, I've implemented this by allowing
{.ditaa <opts>}
, and passing the<opts>
on to ditaa. Not sure that is the best solution, but it seems to work okay.I don't know how to go about making this compatible with the other suggestion, of allowing alt text to occur after the
.ditaa
. Perhaps something like this:{.ditaa "Alt Text" <opts>}
. Or maybe just treat anything after.ditaa
up to the first word beginning with a-
as the alt text, and everything from then on as options?