Rasmus <ras...@gmx.us> writes: > Can we have conditional dependence on texmathp?
I guess it doesn't hurt. You need to declare it as an external function in order to silence byte-compiler, tho. > If so, maybe something like the attached, though the latex-environment > part is ugly. Another option is to simply extract environment from :value and decide if it is a math environment or not. This is what `texmathp' does (i.e., `texmathp-tex-commands-default') although the list is configurable (through `texmathp-tex-commands'). Nesting is not a problem here since you're only interested if the top-most environment. WDYT? > Results areq pretty ugly. E.g. for headline, table, figure, latex-math > env, latex-env: > > \ref{sec:orgheadline1}, \ref{tab:orgtable1}, \ref{fig:orgparagraph1}, > \ref{eq:orglatexenvironment1}, \ref{orglatexenvironment2} OK. > + (paragraph > + (when (org-element-property :caption datum) > + "fig:"))) Nitpick: (and (org-element-property ...) "fig:") Regards,