I want to write PlantUML diagrams from within LyX, and I want to put the result right into the document itself. To do so, I attempted to create a comment environment, in which I put the diagram description.
Basically, PlantUML scans a directory for a bunch of text like the following:
@startuml foo.png
(A) --> (B) : x
(B) --> (C) : y
@enduml
...converts it on the fly to something GraphViz understands, then writes the output in foo.png.
To do this, I tried to put the PlantUML source in a comment block. However, this results in the following output in the LyX file:
\begin_inset Note Note
status open
\begin_layout Plain Layout
@startuml foo.png
\end_layout
<snip/>
\end_inset
I tried to work around this by putting the source in an ERT block, but this simply adds a \begin_inset ERT, without removing the \begin_layout lines. How can I work around this?