emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] preview latex fragment from source code buffer


From: Bastien
Subject: Re: [O] preview latex fragment from source code buffer
Date: Mon, 04 Mar 2013 19:57:42 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Hi Sebastian,

Sebastian Hofer <address@hidden> writes:

> I missed the functionality to preview a latex fragment directly from
> the latex source buffer. Fortunately this functionality is trivial to
> add. I've been using it for a while now and find it very convenient,
> so I suggest adding it to org.
>
> #+BEGIN_SRC 
> (define-key org-src-mode-map "\C-c\C-x\C-l" 'org-edit-preview-latex-fragment)
>
> (defun org-edit-preview-latex-fragment ()
>   "Write latex fragment from source to parent buffer and preview it."
>   (interactive)
>   (org-src-in-org-buffer (org-preview-latex-fragment)))
> #+END_SRC

I added an entry in Org hacks:
http://orgmode.org/worg/org-hacks.html#sec-1-11-1

I don't think it should be in core, as it is a small conveniency
that can be surprising -- the user could expect the preview to
happen in the src buffer, while it happens in the Org buffer...
also, adding more keybinding like this may raise the issue of
conflicting keybinding with the current src buffer mode.

Thanks for sharing this!

-- 
 Bastien



reply via email to

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