emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* proposal to make C-c C-c not remove latex overlays
@ 2014-07-14 22:22 John Kitchin
  2014-07-15  0:33 ` Aaron Ecay
  2014-07-16 10:27 ` Andreas Leha
  0 siblings, 2 replies; 16+ messages in thread
From: John Kitchin @ 2014-07-14 22:22 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-08-01 11:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-14 22:22 proposal to make C-c C-c not remove latex overlays John Kitchin
2014-07-15  0:33 ` Aaron Ecay
2014-07-15  2:04   ` Grant Rettke
2014-07-15 21:00     ` John Kitchin
2014-07-16  1:28       ` Grant Rettke
2014-07-16 12:45         ` John Kitchin
2014-07-15 21:13   ` John Kitchin
2014-07-15 22:52     ` Nick Dokos
2014-07-16 13:26       ` John Kitchin
2014-07-28 15:27   ` Sebastien Vauban
2014-07-16 10:27 ` Andreas Leha
2014-07-16 11:31   ` Nick Dokos
2014-07-16 13:29     ` John Kitchin
2014-07-27 17:47     ` Bastien
2014-07-31 21:49       ` Charles Berry
2014-08-01 11:53         ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).