emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* keep intermediary tex from latex preview
@ 2023-06-03 19:50 Edgar Lux
  2023-06-04  6:34 ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Edgar Lux @ 2023-06-03 19:50 UTC (permalink / raw)
  To: emacs-orgmode

Hello, this has possibly been asked before, but (OMFG) I haven't been able to find it (sorry). How can I keep the .tex file used to generate a latex preview from an Org buffer (or file)? (the closest that I got was =org-latex-logfiles-extensions=). I can usually see such file in =/tmp= if the preview fails. Thanks.

Org 9.4.6
Emacs 28.2 x86_64-pc-linux-gnu

-- 
Sent with https://mailfence.com  
Secure and private email


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

* Re: keep intermediary tex from latex preview
  2023-06-03 19:50 keep intermediary tex from latex preview Edgar Lux
@ 2023-06-04  6:34 ` Ihor Radchenko
  2023-06-04 15:39   ` Edgar Lux
  0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2023-06-04  6:34 UTC (permalink / raw)
  To: Edgar Lux; +Cc: emacs-orgmode

Edgar Lux <edgarlux@mailfence.com> writes:

> Hello, this has possibly been asked before, but (OMFG) I haven't been able to find it (sorry). How can I keep the .tex file used to generate a latex preview from an Org buffer (or file)? (the closest that I got was =org-latex-logfiles-extensions=). I can usually see such file in =/tmp= if the preview fails. Thanks.

In short no.
And we are also in the process of refactoring the preview system:
https://list.orgmode.org/orgmode/87lek2up0w.fsf@tec.tecosaur.net/

You may, however, try to narrow the buffer to the latex fragment of
interest and then export body to latex via C-c C-e dispatch.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: keep intermediary tex from latex preview
  2023-06-04  6:34 ` Ihor Radchenko
@ 2023-06-04 15:39   ` Edgar Lux
  2023-06-04 15:52     ` Timothy
  0 siblings, 1 reply; 9+ messages in thread
From: Edgar Lux @ 2023-06-04 15:39 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On Jun 4, 2023 at 8:34 AM, Ihor Radchenko <yantar92@posteo.net> wrote:
> In short no.
> And we are also in the process of refactoring the preview system:
> https://list.orgmode.org/orgmode/87lek2up0w.fsf@tec.tecosaur.net/

Looks promising!
Is the functionality which I mentioned there as well? (get the .tex for the preview even in absence of error)

> You may, however, try to narrow the buffer to the latex fragment of
> interest and then export body to latex via C-c C-e dispatch.

Thanks!

-- 
Sent with https://mailfence.com  
Secure and private email


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

* Re: keep intermediary tex from latex preview
  2023-06-04 15:39   ` Edgar Lux
@ 2023-06-04 15:52     ` Timothy
  2023-06-05  9:34       ` Edgar Lux
  0 siblings, 1 reply; 9+ messages in thread
From: Timothy @ 2023-06-04 15:52 UTC (permalink / raw)
  To: Edgar Lux; +Cc: Ihor Radchenko, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

Hi Edgar,

> Looks promising!
> Is the functionality which I mentioned there as well? (get the .tex for the preview even in absence of error)

Currently, no. Could you elaborate on why you’re interested in this
functionality?

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/tec>.

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

* Re: keep intermediary tex from latex preview
  2023-06-04 15:52     ` Timothy
@ 2023-06-05  9:34       ` Edgar Lux
  2023-06-05 11:42         ` Edgar Lux
  0 siblings, 1 reply; 9+ messages in thread
From: Edgar Lux @ 2023-06-05  9:34 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]

When using xetex and dvisvgm, an equation like this:

    \(µp\)

will render as p (see attached file), most likely because my configuration is wrong. I don't know how I fixed it for another buffer, but then I restart and--without knowing what happened--the "no-µ" behaviour is back.  Also (I am not saying that I have a test case), some times the PDF is produced correctly, but the preview isn't. Also, in the past, I have noticed that the (failed) .tex for a (wrong) preview is slightly different. When the equation is definitely wrong, I get to see the .tex in =/tmp/=, but the Emacs + LaTeX configuration is so versatile that I get an output even if I type =\({µp\)= (which is a good feature in most cases). Right now, 

1. setting (setq org-latex-pdf-process '("cp %f /tmp/debug.tex"))
2. reloading Org (org-reload) and
3. creating a new Org buffer 
4. preview or export to PDF 

does not produce =/tmp/debug.tex=. I hope that I was able to describe my situation. Right now, I will look into =org-latex-packages-alist= again. I want to say that I appreciate Emacs and Org very much. Thank you.

On Jun 4, 2023 at 5:52 PM, Timothy <orgmode@tec.tecosaur.net> wrote:Hi Edgar,

> Looks promising!
> Is the functionality which I mentioned there as well? (get the .tex for the
preview even in absence of error)

Currently, no. Could you elaborate on why you’re interested in this
functionality?

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/tec>.

-- 
Sent with https://mailfence.com  
Secure and private email

[-- Attachment #2: File Attachment: org-ltximg_1bf73562d1feae6b3ecc1b0965fd98e17619c3bf.svg --]
[-- Type: image/svg+xml, Size: 1979 bytes --]

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

* Re: keep intermediary tex from latex preview
  2023-06-05  9:34       ` Edgar Lux
@ 2023-06-05 11:42         ` Edgar Lux
  2023-06-05 14:54           ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Edgar Lux @ 2023-06-05 11:42 UTC (permalink / raw)
  To: emacs-orgmode

By the way, using Ihor's suggestion, I was able to debug the issue. There is nothing wrong with my configuration. The issue is that the font cannot deal with that symbol, and LaTeX just skips it. Still, it would be convenient not to have to create a separate .tex to debug the preview. Thanks!

On Jun 5, 2023 at 11:34 AM, Edgar Lux <edgarlux@mailfence.com> wrote:When using xetex and dvisvgm, an equation like this:

    \(µp\)

will render as p (see attached file), most likely because my configuration is
wrong. I don't know how I fixed it for another buffer, but then I restart
and--without knowing what happened--the "no-µ" behaviour is back.  Also (I am
not saying that I have a test case), some times the PDF is produced correctly,
but the preview isn't. Also, in the past, I have noticed that the (failed) .tex
for a (wrong) preview is slightly different. When the equation is definitely
wrong, I get to see the .tex in =/tmp/=, but the Emacs + LaTeX configuration is
so versatile that I get an output even if I type =\({µp\)= (which is a good
feature in most cases). Right now, 

1. setting (setq org-latex-pdf-process '("cp %f /tmp/debug.tex"))
2. reloading Org (org-reload) and
3. creating a new Org buffer 
4. preview or export to PDF 

does not produce =/tmp/debug.tex=. I hope that I was able to describe my
situation. Right now, I will look into =org-latex-packages-alist= again. I want
to say that I appreciate Emacs and Org very much. Thank you.

On Jun 4, 2023 at 5:52 PM, Timothy <orgmode@tec.tecosaur.net> wrote:Hi Edgar,

> Looks promising!
> Is the functionality which I mentioned there as well? (get the .tex for the
preview even in absence of error)

Currently, no. Could you elaborate on why you’re interested in this
functionality?

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/tec>.

-- 
Sent with https://mailfence.com  
Secure and private email

-- 
Sent with https://mailfence.com  
Secure and private email


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

* Re: keep intermediary tex from latex preview
  2023-06-05 11:42         ` Edgar Lux
@ 2023-06-05 14:54           ` Ihor Radchenko
  2023-06-05 15:07             ` Timothy
  2023-08-13  5:13             ` Karthik Chikmagalur
  0 siblings, 2 replies; 9+ messages in thread
From: Ihor Radchenko @ 2023-06-05 14:54 UTC (permalink / raw)
  To: Edgar Lux, Timothy; +Cc: emacs-orgmode

Edgar Lux <edgarlux@mailfence.com> writes:

> By the way, using Ihor's suggestion, I was able to debug the issue. There is nothing wrong with my configuration. The issue is that the font cannot deal with that symbol, and LaTeX just skips it. Still, it would be convenient not to have to create a separate .tex to debug the preview. Thanks!

AFAIR, the new preview system will record possible issues with previews
and mark them appropriately in a tooltip.

Timothy, will it also be the case for LaTeX warnings?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: keep intermediary tex from latex preview
  2023-06-05 14:54           ` Ihor Radchenko
@ 2023-06-05 15:07             ` Timothy
  2023-08-13  5:13             ` Karthik Chikmagalur
  1 sibling, 0 replies; 9+ messages in thread
From: Timothy @ 2023-06-05 15:07 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Edgar Lux, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Hi Ihor,

> AFAIR, the new preview system will record possible issues with previews
> and mark them appropriately in a tooltip.
>
> Timothy, will it also be the case for LaTeX warnings?

I think currently we scan the stdout for error messages but not warnings.

Of course, this is an area that could be expanded in the future (and I hope will
be, it would be nice to have the errors in something like flymake rather than
tooltips IMO, it’s just too much extra work for now).

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/tec>.

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

* Re: keep intermediary tex from latex preview
  2023-06-05 14:54           ` Ihor Radchenko
  2023-06-05 15:07             ` Timothy
@ 2023-08-13  5:13             ` Karthik Chikmagalur
  1 sibling, 0 replies; 9+ messages in thread
From: Karthik Chikmagalur @ 2023-08-13  5:13 UTC (permalink / raw)
  To: Ihor Radchenko, Edgar Lux, Timothy; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

>> By the way, using Ihor's suggestion, I was able to debug the issue.
>> There is nothing wrong with my configuration. The issue is that the
>> font cannot deal with that symbol, and LaTeX just skips it. Still, it
>> would be convenient not to have to create a separate .tex to debug
>> the preview. Thanks!
>
> AFAIR, the new preview system will record possible issues with previews
> and mark them appropriately in a tooltip.

In this specific case, it was recognized as an error.  Here is an image
of the result and the tooltip message with the new LaTeX preview system.

I typed \(μp + 1\) because getting a screenshot of the tooltip with just
the rendered `p' was tricky.

Karthik

[-- Attachment #2: 2023-08-12-220944_656x288_scrot.png --]
[-- Type: image/png, Size: 29041 bytes --]

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

end of thread, other threads:[~2023-08-13  5:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-03 19:50 keep intermediary tex from latex preview Edgar Lux
2023-06-04  6:34 ` Ihor Radchenko
2023-06-04 15:39   ` Edgar Lux
2023-06-04 15:52     ` Timothy
2023-06-05  9:34       ` Edgar Lux
2023-06-05 11:42         ` Edgar Lux
2023-06-05 14:54           ` Ihor Radchenko
2023-06-05 15:07             ` Timothy
2023-08-13  5:13             ` Karthik Chikmagalur

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