I'm writing a large document in org that I export to PDF through latex. The latex class that I'm using (set in org-latex-classes) defines a \source command that can be used inside table and figure environments to indicate the source of that material. Something like the code below in latex
\begin{figure}[htbp] \centering \includegraphics[width=\textwidth]{figure.pdf} \caption{\label{thelabel}The caption.}} \source{Modified from~\cite{bibkey}.} \end{figure} In org-mode we can include the figure as (without the \source command)
#+NAME: thelabel #+ATTR_LATEX: :width \textwidth #+CAPTION: \caption{The caption.} [[figure.pdf]] My question is: How can I tell org-mode to add \source{whatever} inside the exported figure environment? Is there something I can pass to #+ATTR_LATEX: ??? to add what I need inside the environment?
Note: Unfortunately the \source command cannot be put inside the caption.
Edit: After more research I found this question on stackoverflow which is the same question as this one. Essentially, it comes down to either NickD's answer, or creating a filter, but with the filter solution there does not allow specifying what comes inside the \source command and this using :caption seems like the only way to go.