I'd like to add a caption to a LaTeX-formatted equation, using org-mode's build-in #+caption: directive. The manual says this is possible, but does not specify exactly how to format it. The most intuitive methods do not work; I tried all of the following:

#+caption: Kepler's third law
[\ T^2 = \frac{4\pi^2}{G(M_1+M_2)} \]
#+caption: Kepler's third law
#+latex: \[ T^2 = \frac{4\pi^2}{G(M_1+M_2)} \]
#+caption: Kepler's third law
T^2 = \frac{4\pi^2}{G(M_1+M_2)}

All three of these formattings result in the equation being rendered, but not the caption. I know it is possible to insert captions directly using LaTeX, but I would like to use the org native method, which the manual says I can do. How can I do it?

  • Why do you want such a behaviour? It looks quite strange to me. However, assuming you want to succeed with that solution, I'd change equation to equation* to avoid showing the equation number. – exilsteira Nov 19 '20 at 8:25
  • @exilsteira The document I'm writing warrants captioned, enumerated equations, and I prefer doing things natively in org when possible rather than hand-writing latex code. – slondr Nov 21 '20 at 4:26

I managed to guess-and-check my way to finding an answer to this!

The trick is to wrap the equation in a figure:

#+caption: Kepler's third law
T^2 = \frac{4\pi^2}{G(M_1+M_2)} R^3

This applied the caption correctly.

For posterity's sake, if you want to pass position options to the figure using this method, you need to use :options [] instead of :placement []. I have no idea why, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.