emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* can I disable LaTeX fragment previews individually?
@ 2014-05-07 22:43 Stephen J. Barr
  2014-05-07 23:41 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen J. Barr @ 2014-05-07 22:43 UTC (permalink / raw)
  To: org-mode

Hello,

I often use org-preview-latex-fragment and sometimes I would like to
turn the previews on and off on a case-by-case basis. Then I do C-c C-c,
it turns off all the previews. Is there a way to toggle the preview just
for the fragment at the point?


Thanks!,
Stephen
-- 
Sent with my mu4e

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

* Re: can I disable LaTeX fragment previews individually?
  2014-05-07 22:43 can I disable LaTeX fragment previews individually? Stephen J. Barr
@ 2014-05-07 23:41 ` Nick Dokos
  2014-05-08  2:02   ` Stephen J. Barr
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2014-05-07 23:41 UTC (permalink / raw)
  To: emacs-orgmode

Stephen J. Barr <stevejb@uw.edu> writes:

> Hello,
>
> I often use org-preview-latex-fragment and sometimes I would like to
> turn the previews on and off on a case-by-case basis. Then I do C-c C-c,
> it turns off all the previews. Is there a way to toggle the preview just
> for the fragment at the point?
>
>

No built-in way afaict: C-c C-c calls the following function

,----
| (defun org-remove-latex-fragment-image-overlays ()
|   "Remove all overlays with LaTeX fragment images in current buffer."
|   (mapc 'delete-overlay org-latex-fragment-image-overlays)
|   (setq org-latex-fragment-image-overlays nil))
`----

which maps delete-overlay over *all* the elements of the
org-latex-fragment-image-overlays list.

Figuring our which overlay in that list is the one you want to delete
may or may not be easy, but if you knew then you can call
delete-overlay on it. But you'll have to write some lisp.

Nick

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

* Re: can I disable LaTeX fragment previews individually?
  2014-05-07 23:41 ` Nick Dokos
@ 2014-05-08  2:02   ` Stephen J. Barr
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen J. Barr @ 2014-05-08  2:02 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

Thank you for letting me know. This may be a fun project!

Nick Dokos <ndokos@gmail.com> writes:

> Stephen J. Barr <stevejb@uw.edu> writes:
>
>> Hello,
>>
>> I often use org-preview-latex-fragment and sometimes I would like to
>> turn the previews on and off on a case-by-case basis. Then I do C-c C-c,
>> it turns off all the previews. Is there a way to toggle the preview just
>> for the fragment at the point?
>>
>>
>
> No built-in way afaict: C-c C-c calls the following function
>
> ,----
> | (defun org-remove-latex-fragment-image-overlays ()
> |   "Remove all overlays with LaTeX fragment images in current buffer."
> |   (mapc 'delete-overlay org-latex-fragment-image-overlays)
> |   (setq org-latex-fragment-image-overlays nil))
> `----
>
> which maps delete-overlay over *all* the elements of the
> org-latex-fragment-image-overlays list.
>
> Figuring our which overlay in that list is the one you want to delete
> may or may not be easy, but if you knew then you can call
> delete-overlay on it. But you'll have to write some lisp.
>
> Nick

-- 
Sent with my mu4e

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

end of thread, other threads:[~2014-05-08  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07 22:43 can I disable LaTeX fragment previews individually? Stephen J. Barr
2014-05-07 23:41 ` Nick Dokos
2014-05-08  2:02   ` Stephen J. Barr

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).