# Passing image's caption in a doxygen alias woes

asked Dec 19, 2013 in Bug

Documenting PlantUML diagrams inline with Doxygen is great, esp. with the ALIAS.

However, I'd like to pass along a "caption" for that image to Doxygen, but plantuml (r7988) misinterprets it.

Here's what I'd like to do:

`ALIASES += "startuml{2}=\image html \1 \"\2\"\n\image latex \1 \"\2\"\n\if DontIgnorePlantUMLCode"`
`ALIASES += "startuml{3}=\image html \1 \"\2\" \3\n\image latex \1 \"\2\" \3\n\if DontIgnorePlantUMLCode"`

and in my source code:

@startuml{myimage.png,This is my caption text}

.. PlantUML code

@enduml

and also

@startuml{myotherimage.png,This is my other caption text,width=16cm}

.. PlantUML code

@enduml

plantuml does generate an image, but gives it the name "myimage.png,This is my caption text". Could it use only the first argument for the file name ?

Thanks

answered Dec 20, 2013 by (235,420 points)
selected Dec 23, 2013 by rmric

This is very specific to DOxygen usage, but we think that there should be no impact on other plugins.

This beta will give myotherimage.png as file name for:

@startuml{myotherimage.png,This is my other caption text,width=16cm}

Caracters after the comma are simply ignored.

Is this what you are looking for ?

commented Dec 23, 2013 by (2,140 points)
As usual, very quick answer, and effective solution. The beta is working great with the following refactorized macro:

ALIASES                += "startuml{3}=\image latex \1 \"\2\" \3\n\image html \1 \"\2\" \3\n\if DontIgnorePlantUMLCode"
ALIASES                += "startuml{2}=\startuml{\1,\2,}"
ALIASES                += "startuml{1}=\startuml{\1,,}"

Thanks