Re: Using org-latex-preview in other major modes

2024-10-10 Thread Ihor Radchenko
Karthik Chikmagalur writes: >> Abstracting away previews is certainly welcome. >> RMS explicitly asked Org mode team to work towards this goal: >> https://list.orgmode.org/e1kikxv-0007iy...@fencepost.gnu.org/ > > I recently spent some time on this feature (LaTeX previews in all > major-modes) and

Re: Using org-latex-preview in other major modes

2024-10-07 Thread Karthik Chikmagalur
>> I'm interested in adjusting org-latex-preview to work in other major >> modes (most notably LaTeX-mode itself, so one can get rid of preview.el). >> On the advice of Karthik (Cc'd) I'll move the discussion from private >> mails to this list, so more people who might be interested can join in. >>

Re: Using org-latex-preview in other major modes

2024-04-22 Thread Tony Zorman
On Sun, Apr 21 2024 20:41, Karthik Chikmagalur wrote: >> Anyways, before I put this off for much longer, there is some more code >> attached. Live previews (and general environments) work now, and besides >> the above mentioned points there were no new surprises waiting—at least >> for getting the

Re: Using org-latex-preview in other major modes

2024-04-21 Thread Karthik Chikmagalur
> Anyways, before I put this off for much longer, there is some more code > attached. Live previews (and general environments) work now, and besides > the above mentioned points there were no new surprises waiting—at least > for getting the basic functionality to work. Thank you for the update! T

Re: Using org-latex-preview in other major modes

2024-04-21 Thread Tony Zorman
On Tue, Apr 09 2024 22:06, Tony Zorman wrote: > As a very brief summary, one currently needs to—in addition to supplying > a preamble and a way to recognise maths and environments—patch the > following functions: > > · org-latex-preview--place-from-elements > · org-latex-preview-auto--regenerat

Re: Using org-latex-preview in other major modes

2024-04-09 Thread Tony Zorman
On Sun, Apr 07 2024 23:36, Karthik Chikmagalur wrote: > You can ignore `org-latex-preview-live--src-buffer-setup', this is for > previewing when using `org-edit-special' (C-c '), which does not apply > to any other major mode. So `org-latex-preview-live--ensure-overlay' is > the only function you

Re: Using org-latex-preview in other major modes

2024-04-09 Thread Ihor Radchenko
Karthik Chikmagalur writes: >> We may go even further, and extend the previews to be not just for >> LaTeX. Might as well preview html/image links/pdf links/etc. > > I agree in principle but I think this is difficult to do with > org-latex-preview because the async process chain and overlay handl

Re: Using org-latex-preview in other major modes

2024-04-07 Thread Karthik Chikmagalur
> Thanks for taking a look! It indeed seems that caching will be the most > work to properly implement. However, I'm quite happy to not care about > numbers for now and make sure the other stuff works correctly first > before tackling this. Sure, this is a disproportionate amount of work for a min

Re: Using org-latex-preview in other major modes

2024-04-07 Thread Tony Zorman
On Sun, Apr 07 2024 10:48, Karthik Chikmagalur wrote: > [… 14 lines elided …] > > There are two issues with numbering: > - providing an Org-agnostic API point to attach a numbering table to, and > - calculating the new numbering table in LaTeX (or other major-modes). > > For The first issue, we nee

Re: Using org-latex-preview in other major modes

2024-04-07 Thread Karthik Chikmagalur
> Abstracting away previews is certainly welcome. > RMS explicitly asked Org mode team to work towards this goal: > https://list.orgmode.org/e1kikxv-0007iy...@fencepost.gnu.org/ I agree with RMS about this, and this was on our minds when we wrote org-latex-preview. The basic previewing process is

Re: Using org-latex-preview in other major modes

2024-04-07 Thread Karthik Chikmagalur
Hi Tony, Just tried it out, it's very promising! Thanks for taking the initiative on this. > I've prodded the code a little bit and, mostly just following [1], > managed to implement basic previews in a relatively straightforward > fashion. Attached is a proof-of-concept—aptly named > latex-late

Re: Using org-latex-preview in other major modes

2024-04-07 Thread Ihor Radchenko
Tony Zorman writes: > I'm interested in adjusting org-latex-preview to work in other major > modes (most notably LaTeX-mode itself, so one can get rid of preview.el). > On the advice of Karthik (Cc'd) I'll move the discussion from private > mails to this list, so more people who might be interest

Using org-latex-preview in other major modes

2024-04-07 Thread Tony Zorman
Hi, I'm interested in adjusting org-latex-preview to work in other major modes (most notably LaTeX-mode itself, so one can get rid of preview.el). On the advice of Karthik (Cc'd) I'll move the discussion from private mails to this list, so more people who might be interested can join in. I've pro