Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-06-10 Thread Michael
Ihor Radchenko writes: Michael writes: Sorry-- got sidetracked by something else. I see what you mean. OK, so the proposal is: change the ".png" branch in `org-babel-execute:latex' to override `org-preview-process-alist' with something that will: - actually produce a PNG formatted

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-06-09 Thread Ihor Radchenko
Michael writes: >>> Sorry-- got sidetracked by something else. I see what you >>> mean. OK, so the proposal is: change the ".png" branch in >>> `org-babel-execute:latex' to override >>> `org-preview-process-alist' >>> with something that will: >>> >>> - actually produce a PNG formatted file

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-06-09 Thread Michael
Ihor Radchenko writes: Michael writes: ... So, it makes sense for `org-babel-execute:latex' to override `org-preview-latex-default-process' temporarily, to something actually generating .png file. Sorry-- got sidetracked by something else. I see what you mean. OK, so the proposal is:

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-06-03 Thread Ihor Radchenko
Ihor Radchenko writes: > Michael writes: > >>> ... >>> So, it makes sense for `org-babel-execute:latex' to override >>> `org-preview-latex-default-process' temporarily, to something >>> actually >>> generating .png file. >> >> Sorry-- got sidetracked by something else. I see what you >> mean.

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-05-05 Thread Ihor Radchenko
Ihor Radchenko writes: > (setq org-preview-latex-default-process 'dvisvgm) > > #+begin_src latex :results file link :file test.png > x^2 > #+end_src > > #+RESULTS: > [[attachment:test.png]] > > ^ This is actually an svg image, renamed to "test.png". > > So, it makes sense for

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-04-29 Thread Ihor Radchenko
Michael writes: >> ... >> So, it makes sense for `org-babel-execute:latex' to override >> `org-preview-latex-default-process' temporarily, to something >> actually >> generating .png file. > > Sorry-- got sidetracked by something else. I see what you > mean. OK, so the proposal is: change the

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-04-05 Thread Karthik Chikmagalur
>> Thanks for the patch! >> May you please describe a use case when it is necessary to run >> latex >> multiple times for previews? > > Sure: it's required whenever you have LaTeX that refers to > other document elements whose positions are only known after > they've been typeset. This often

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-04-04 Thread Michael
Oh-- and pass `processing-type' to `org-create-formula-image' explicitly. -- Michael

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-04-04 Thread Michael
Ihor Radchenko writes: Michael writes: Should we perhaps have different variables for preview & Org source block evaluation? Likely yes. In fact, ob-latex is making use of `org-preview-latex-process-alist' only in a single cond branch in `org-babel-execute:latex' - when we have

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-28 Thread Ihor Radchenko
Michael writes: > Should we perhaps have different variables for preview & Org > source block evaluation? Likely yes. In fact, ob-latex is making use of `org-preview-latex-process-alist' only in a single cond branch in `org-babel-execute:latex' - when we have :file foo.png However, that

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-27 Thread Michael
Max Nikulin writes: On 24/03/2024 15:58, Ihor Radchenko wrote: Max Nikulin writes: On 22/03/2024 05:55, Michael wrote: I have a small patch for `org-preview-latex-process-alist' making the default setting for LaTeX source block evaluation be running latex three times (instead of the

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-26 Thread Max Nikulin
On 24/03/2024 15:58, Ihor Radchenko wrote: Max Nikulin writes: On 22/03/2024 05:55, Michael wrote: I have a small patch for `org-preview-latex-process-alist' making the default setting for LaTeX source block evaluation be running latex three times (instead of the current one). I suspect it

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-24 Thread Ihor Radchenko
Max Nikulin writes: > On 22/03/2024 05:55, Michael wrote: >> I have a small patch for `org-preview-latex-process-alist' making >> the default setting for LaTeX source block evaluation be running >> latex three times (instead of the current one). > > I suspect it may make the LaTeX preview

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-24 Thread Max Nikulin
On 22/03/2024 05:55, Michael wrote: I have a small patch for `org-preview-latex-process-alist' making the default setting for LaTeX source block evaluation be running latex three times (instead of the current one). I suspect it may make the LaTeX preview feature unacceptably slow for

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-23 Thread Ihor Radchenko
Michael writes: >> May you please describe a use case when it is necessary to run >> latex >> multiple times for previews? > ... > Oh-- and it's not just previews (sorry if I gave that > impression)-- it's also required for "evaluating" LaTeX source > blocks. This makes more sense. I hardly

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-22 Thread Michael
I have a small patch for `org-preview-latex-process-alist' making the default setting for LaTeX source block evaluation be running latex three times (instead of the current one). It is sometimes necessary to run latex more than once to produce the final document, a phenomenom described in the

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-22 Thread Ihor Radchenko
Michael writes: > I have a small patch for `org-preview-latex-process-alist' making > the default setting for LaTeX source block evaluation be running > latex three times (instead of the current one). It is sometimes > necessary to run latex more than once to produce the final > document, a