Login  Register

can i masquerade literal/codeblock as image/figure

Posted by hjwp on Jun 25, 2019; 10:55am
URL: https://discuss.asciidoctor.org/can-i-masquerade-literal-codeblock-as-image-figure-tp6968.html

I occasionally want to use ascii-art diagrams as illustrations, but i'd like the captions for them to say "figure 1-1" instead of "example 1-1", is that possible using masquerading somehow?

here's the kind of thing i've been trying:

[[a_diagram]]
[figure]
.A diagram
--
....

   +=====================+
   | ascii diagrams ftw  |
   +---------------------+
   | hello               |
   | there               |
   +---------------------+ 

....
--
I've tried "figure" and "image" but no luck so far?