emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] proposal to make C-c C-c not remove latex overlays


From: John Kitchin
Subject: [O] proposal to make C-c C-c not remove latex overlays
Date: Mon, 14 Jul 2014 18:22:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)

I am using org-mode files with equations and code blocks in lectures,
and it is problematic that C-c C-c removes the equation overlays when
running a code block. First, you have to press C-c C-c twice to run the
block, since the first one gets rid of the equations, but then you have
run C-c C-x C-l to get the equations back! and the cycle repeats
throughout a lecture.

I would prefer that the equations stay untouched, and that the code
blocks run without modifying them. 

I think the best behavior would be for C-c C-x C-l to toggle the
equations, and to remove the C-c C-c behavior for latex overlays
completely. But it would be ok if this was done by a C-c C-c hook
function, so that a user could remove the latex overlay without touching
the org-code.

Maybe a new function like this:

#+BEGIN_SRC emacs-lisp
(defun org-toggle-latex-overlays (arg)
  "Toggle LaTeX fragments."
  (interactive "P")
  (if org-latex-fragment-image-overlays
      (org-remove-latex-fragment-image-overlays)
    (org-preview-latex-fragment arg)))
#+END_SRC

 could be added. Any thoughts?



-- 
-----------------------------------
John Kitchin
Professor




reply via email to

[Prev in Thread] Current Thread [Next in Thread]