6

I am writing my research notes in org-mode and they contain many LaTeX formulas. I use the preview feature (C-c C-x C-l) a lot. As the notes are rather large, I also tend to use an indirect buffer, to jump around to have a quick glance to refer to some other part of the text. While the indirect buffer will show the rendered formulas when I open it (assuming the original buffer was showing them), I cannot make them go doing C-c C-c. Conversely, if I open the indirect buffer while the original buffer is NOT showing the formulas, I cannot generate them in the indirect buffer. I get a message saying

user-error: Can’t preview LaTeX fragment in a non-file buffer

So, is there an easy way to enable org-mode to render and hide the formulas in indirect buffers?

I would not mind if doing this would mess-up (i.e. also hide, also display) the formulas in the main buffer (as long as I can re-render/display once I am back there).

For reference: GNU Emacs 25.1.2; Org-mode version 8.2.10

1

I find indirect buffers to be indispensable when using org-mode. Use clone-indirect-buffer instead of make-indirect-buffer to remedy your issue. You will then be able to render and hide Latex fragments independently within each buffer.

  • Can someone clarify the difference between clone-indirect-buffer and make-indirect-buffer? Documentation is not making it clear for me. – iLemming Mar 25 '17 at 18:29
  • I originally was using clone indirect buffer. I have this problem either way, with make-indirect-buffer or clone-indirect-buffer. @James maybe there is something else in your setup that makes it work for you? What version of emacs / org-mode do you use? – jmlorenzi Mar 25 '17 at 20:18

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.