Closed jamshark70 closed 2 months ago
Good question. I don't think there is a specific guideline for this. I took a quick look at a bunch of different papers from the past ICLC's and based on that most people don't consider code examples a figure, and also they don't give them any caption.
I guess, since the codeblocks are rendered in-line at the correct location with the text (as opposed to figures that can be located elsewhere in the paper), for most it is enough to refer to the example by saying things like "in the following example...:", "in the above example...", etc.
I recommend you decide for yourself if it makes sense in your case to add the label/caption. In case you do add it, I think it makes sense to have the styling similar to the captions of the Figures, so: below and centered.
In case you do add it, I think it makes sense to have the styling similar to the captions of the Figures, so: below and centered.
In Markdown --> LaTeX --> PDF, centering seems not to be obvious (Web search shows no clear answer; there's a feature request on pandoc but it's not implemented), so it seems the best (only?) solution is just to avoid captions altogether.
Hi, I think with just pandoc it's hard to add figure labels with markdown+pandoc ... ultimately, both ways are acceptable, if you want to add code as figures to reference them in the text, it's ok ... if it doesn't quite work out with markdown and pandoc we can also troubleshoot that in the final editing step before publication.
Hi, it's not clear to me what is the correct way to label code examples in papers. Are they Figures? Or Example 1, 2, 3...? With caption or without? Label and caption above or below the example? Centered?
Figures automatically generate formatting and numbering. It seems examples do not, so I'd like to check what is the right way before rendering the final PDF.