On 08/05/2022 13:06, Thomas S. Dye wrote:
It would be better to have a LaTeX attribute, say :commands, that places commands within \begin{figure} ... \end{figure}.
Look at the code of `org-latex--inline-image' and variants of markup it may generate. There are too may places where :commands may be inserted to add an attribute for each place, e.g. before or after \includegraphics. It may be better to allow users to define a function that either generates markup or delegates it to the default function. I am unsure concerning convenient API that should be provided to generate a label, to get caption that may be specified as an attribute or as #+caption:, etc. There is a quite similar problem with source blocks (another thread). 10 arguments functions emerged during attempt split into maintainable pieces a huge function handling all cases.