I am using Hugo for Scientific writing.
Hence it is important for me to be able to number and then cross reference to figures in the post.
Using counters I’m able to automatically add numbers to my Figure elements.
Now I’m after being able to cross reference them in the post.
So I have few questions:
Could I have some way to add an ID to the figure elements? It seems the built in shortcode, for some reason, doesn’t expose such option. Here I assume I will be able to easily link to tags in the MarkDown text.
In case there is no simple way to add an ID to the figure element, Is there another way you’d recommend?
If you want to number them automatically from Hugo instead of doing it in CSS, that’s possible too! From the shortcode, you can store values in .Page.Scratch, and then increment a stored value every time the shortcode gets used.
I’ve used both of these techniques before, but I’m also writing this from the top of my head, so they might need to be checked / adjusted