I would like to add captions such as โFigure 1: Blah Blahโ to my images in Pandoc, and be able to reference them as shown. Figure 1. I use gpp (preprocessor) to add captions to my images and do all kinds of fancy things like resize, format, etc. However, I cannot implement a counter for images like Figure1, Figure2, etc.
I defined the following function in my gpp script:
\define{\counter}{0} \defeval{count}{\eval{\counter+ 1}
and I call it in my script: \count
However, \counter does not get the score in my gpp script, and I see the following error: unfinished macro
How do I execute this counter? I use -T (tex) mode in gpp
source share