How to Automatically Treat All Images and Tables as Figures?

Hi everyone,

I’m looking to streamline the way images and tables are handled in my document and want to know if there’s a standardized method or a coding trick that allows every image and every table in a document to be automatically treated as a figure. Essentially, I’m trying to achieve the following:

• Every image, table should be wrapped in a figure element without me having to manually do it.

My current workflow requires me to add these elements manually, and it can get quite tedious.
Has anyone tackled this before?

Thanks in advance for your help!

Cheers

You can achieve this with a show rule for image and table. This will wrap every image and table in a figure element, but you won’t be able to use a caption, a label or anything else that requires a figure (unless you add it directly in the show rule).

#show image: figure
#show table: figure

#table([0, 1, 2, 3])

Note that only writing figure inside the show rule is just the short version of it => figure(it).

1 Like

Thank you very much. It worked!
I knew I was overthinking it a bit :)