8

I would like to include figures with long comments in an org-mode file. The problem is that the #+CAPTION directive only recognizes the text on its same line. If you write many sentences in a very long line it becomes cumbersome to work with. Take a look at this example:

#+CAPTION: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
#+NAME: fig01
[[file:./figs/fig01.png]]

Is there any work around to have multi-lines captions?

  • 1
    Use visual wrapping. Visual line mode I think. Or wrap the whole thing in a latex environment and use \caption{}. – John Kitchin Mar 13 '16 at 10:02
  • Thank you, John, visual line mode worked. If you post your answer (instead of this comment), I'll accept it. – El Diego Efe Mar 14 '16 at 15:50
8

You can use visual-line-mode to show wrapping without breaking the actual line.

13

You can use as many captions as you like, one after the other:

#+CAPTION: Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
#+CAPTION: sed do eiusmod tempor incididunt ut labore et dolore magna
#+CAPTION: aliqua. Ut enim ad minim veniam, quis nostrud exercitation 
#+NAME: fig01
[[file:./figs/fig01.png]]
  • 1
    This should be he accepted answer, since it provides a technical solution instead of a workaround. I is too bad that M-q fails, though. – Kaligule Mar 21 '17 at 18:42
0

M-x toggle-truncate-lines will let you see long lines more conveniently in your buffer.

  • This is similar to using visual-line-mode, but the solution of mihai using multiple caption lines is usually preferable. – Andrew Swann Sep 9 '17 at 14:36

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.