Feedback on the new "feature" system in org-export (was: [Pre-PATCH] Overhaul of the LaTeX preview system)

2024-04-22 Thread Ihor Radchenko
Timothy writes: > After months of work, Karthink and I have prepared a rather large patch-set > completely overhauling the LaTeX preview system. I hope to have a patch set > shortly, but in the mean time it would be good to get some more people testing > this. > > To test this feature, please

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-19 Thread Корякин Артём
Max Nikulin writes: > On 19/04/2024 00:58, Корякин Артём wrote: >>> shell-file-name >> ; "pwsh.exe" >>> system-type >> ; windows-nt >>> (w32-shell-dos-semantics) >> ; nil > > I have no idea what style of escaping is expected by pwsh.exe. If it > is the same as for cmd.exe then I

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Max Nikulin
On 19/04/2024 00:58, Корякин Артём wrote: shell-file-name ; "pwsh.exe" system-type ; windows-nt (w32-shell-dos-semantics) ; nil I have no idea what style of escaping is expected by pwsh.exe. If it is the same as for cmd.exe then I would try to add it to

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Корякин Артём
Max Nikulin writes: > Please, evaluate the following expressions e.g. in the scratch buffer: > > shell-file-name ; "pwsh.exe" > system-type ; windows-nt > (w32-shell-dos-semantics) ; nil > (w32-shell-name) ; "pwsh.exe" For clarification: I specifically configured[1] MS pwsh as

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Корякин Артём
Karthik Chikmagalur writes: > As a temporary measure, could you try replacing calls to > shell-quote-argument with identity in the following two functions? > > org-latex-preview--tex-compile-async > org-latex-preview--image-extract-async I did[1] exactly this. It works, but only if I eval it

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Yaroslav Drachov
My system-configuration-features are "ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS ZLIB". RSVG is in the list. org-latex-preview-check-health diagnostic info:

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Karthik Chikmagalur
> I hope I understand correctly how to use this mail-thread. Thank you > very much for such a great enhancement of Org-mode LaTeX preview > capabilities. I am on macOS Big Sur and have some troubles with > dvisvgm preview in your particular fork. Everything works just fine in > stable release of

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Max Nikulin
On 18/04/2024 03:11, Корякин Артём wrote: Maybe I could somehow rewrite shell-quote-argument using advices ? Maybe some more global changes is needed for emacs on windows ? Please, evaluate the following expressions e.g. in the scratch buffer: shell-file-name system-type

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Корякин Артём
I've got problem when I use this version of org-latex preview: RUNNING: dvisvgm --page=1- --optimize --clipjoin --relative --no-fonts --bbox=preview -o c\:/Users/artsi0m/AppData/Local/Temp/org-tex-DAJVTr-%9p.svg c\:/Users/artsi0m/AppData/Local/Temp/org-tex-DAJVTr.dvi ERROR: can't open file

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-17 Thread Karthik Chikmagalur
> I've got problem when I use this version of org-latex preview: > > RUNNING: dvisvgm --page=1- --optimize --clipjoin --relative --no-fonts > --bbox=preview -o c\:/Users/artsi0m/AppData/Local/Temp/org-tex-DAJVTr-%9p.svg > c\:/Users/artsi0m/AppData/Local/Temp/org-tex-DAJVTr.dvi > > ERROR: can't

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-15 Thread Yaroslav Drachov
Hello everyone, I hope I understand correctly how to use this mail-thread. Thank you very much for such a great enhancement of Org-mode LaTeX preview capabilities. I am on macOS Big Sur and have some troubles with dvisvgm preview in your particular fork. Everything works just fine in stable

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-01-21 Thread Timothy
Hi Matt, Thanks for taking this branch for a spin and reporting back. I’m a bit mystified by the difference you see between `$$' and `\(\)' delimiters (I can’t detect any difference my end). Regarding the specific comments in your last email though: Matt Huszagh writes: > When using \(\)

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-01-19 Thread Matt Huszagh
Matt Huszagh writes: > Another minor issue I've encountered. Using different delimiters results > in images of slightly different sizes. > > For example, in a file containing: > > ``` > Using first delimiters: \(F=ma\). > > Using other delimiters: $F=ma$. > ``` > > The snippet with dollar sign

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-01-19 Thread Matt Huszagh
Timothy, Another minor issue I've encountered. Using different delimiters results in images of slightly different sizes. For example, in a file containing: ``` Using first delimiters: \(F=ma\). Using other delimiters: $F=ma$. ``` The snippet with dollar sign delimiters is slightly larger than

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-01-19 Thread Matt Huszagh
Hi Timothy, Thanks for your work on this. I've run into an issue related to the change you made in 209e5f5f4047a34db27c3b5dff4077bb1da9ceed that makes org-latex-compile asynchronous. This breaks the org-babel-latex-pdf-svg-process functionality I introduced in commit

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-01-06 Thread Timothy
Hello again everyone, I’ve recently found a window of blissfully free time, and plan on using it to polish up this effort. Now is a great time to take the branch for a spin and report issues/requests . All the best, Timothy -- Timothy (‘tecosaur’/‘TEC’), Org mode contributor. Learn more

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-29 Thread Roshan Shariff
Hi Timothy and Karthik, Thanks for your wonderful work on this feature! I've been using it for several weeks and it's been working extremely well in my experience. I noticed a small visual glitch when inline latex previews wrap to the next line, that is apparent when

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-21 Thread Visuwesh
[திங்கள் ஆகஸ்ட் 21, 2023] Karthik Chikmagalur wrote: >> I have lualatex installed as part of another texlive package but I am >> not sure if org uses it however. > > If you haven't changed `org-latex-compiler' (globally or in the Org > buffer using a keyword), it's using pdflatex. I am indeed

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-21 Thread Karthik Chikmagalur
> I have lualatex installed as part of another texlive package but I am > not sure if org uses it however. If you haven't changed `org-latex-compiler' (globally or in the Org buffer using a keyword), it's using pdflatex. >> 3. If no, do you mind sharing this file (or a stripped down version >>

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-21 Thread Visuwesh
[திங்கள் ஆகஸ்ட் 21, 2023] Karthik Chikmagalur wrote: >> It worked well all around except for three things: >> >> 1. I had to set org-latex-preview-precompile to nil to produce the >>preview for ~2000 snippets. I got errors in process filters such >>as arg-out-of-range, and

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-21 Thread Karthik Chikmagalur
> It worked well all around except for three things: > > 1. I had to set org-latex-preview-precompile to nil to produce the >preview for ~2000 snippets. I got errors in process filters such >as arg-out-of-range, and Emacs completely blocked itself. I can >confirm that

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-21 Thread Visuwesh
[ஞாயிறு மார்ச் 12, 2023] Timothy wrote: > Hi All, > > After months of work, Karthink and I have prepared a rather large patch-set > completely overhauling the LaTeX preview system. I hope to have a patch set > shortly, but in the mean time it would be good to get some more people testing > this.

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-08 Thread Ihor Radchenko
WANG Yicheng writes: > Also, the org-latex-preview also rendered (deliberately put) inline \[…\] as > inline images. > > I guess it could be caused by org-latex-math-environments-re. Could you add > support to recognize \[…\] also as equations? Thank you. For context, \[...\] fragments are

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-08-07 Thread WANG Yicheng
Hi! I just tried that out. As I mentioned here:https://lists.gnu.org/archive/html/emacs-orgmode/2023-08/msg00092.html, I found that, when using the dvisvgm option for exporting TeX snippets to HTML, the displayed math enclosed by \[…\] is not rendered as equation block, while math

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-06-04 Thread Pedro Andres Aranda Gutierrez
Ok, so that’s excluded ;-) PA Enviado desde mi iPhone > El 5 jun 2023, a las 1:29, Rudolf Adamkovič escribió: > > Pedro Andres Aranda Gutierrez writes: > >> this might not be completely the case, but I recently reported a bug >> against native compilation in Emacs. What about trying

Re: Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-06-04 Thread Rudolf Adamkovič
Pedro Andres Aranda Gutierrez writes: > this might not be completely the case, but I recently reported a bug > against native compilation in Emacs. What about trying without netive > compilation? I have just tried without native compilation. No luck! I get the exact same error. Rudy --

Re: Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-06-03 Thread Pedro Andres Aranda Gutierrez
HI, this might not be completely the case, but I recently reported a bug against native compilation in Emacs. What about trying without netive compilation? Hope it helps! /PA -- Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-28 Thread Timothy
Hi Rudolf, Thanks for testing the branch :) > ISSUE 1: CLIPPING > > On my HiDPI screen, the new previews are clipped slightly at the edges. > I had this issue before and fixed it in [1][2]. Has the same bug crept > back? > > [1] >

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-26 Thread Rudolf Adamkovič
Timothy writes: > If you do come across any issues, please let me know either in a reply > here or the org-mode matrix room. First of all, thank you for working on this! Here are some issues, after using your patch-set for 1 day: ISSUE 1: CLIPPING On my HiDPI screen, the new previews are

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-10 Thread Jun Inoue
On Wed, May 10, 2023 at 7:23 PM Timothy wrote: > > Hi Jun, > > > You mention in a separate email that XeLaTeX is known to cause > > hassles, but is this one of them? I could migrate to PDFLaTeX, but I'd > > lose the convenience of editing with unicode-math. > > This is indeed one of the niggles

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-10 Thread Timothy
Hi Jun, > You mention in a separate email that XeLaTeX is known to cause > hassles, but is this one of them? I could migrate to PDFLaTeX, but I'd > lose the convenience of editing with unicode-math. This is indeed one of the niggles we're currently aware of. Simply put, XeLaTeX seems to report

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-10 Thread Jun Inoue
Hello Timothy, I love what you and Karthink have done here! Typesetting is so much faster now! And the little nuggets like error reporting and intelligent sizing & coloring is so going to boost my org QoL. Thank you so much for your work! I've been trying this on and off for a few days now,

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-09 Thread Ihor Radchenko
Max Nikulin writes: > On 09/05/2023 18:34, Ihor Radchenko wrote: >> I can easily see Lualatex-specific preamble simply failing to work on >> Latex. Or things being rendered wrongly. > > iftex.sty has \ifpdftex and \iftutex (XeTeX, LuaTeX, LuaHBTeX) commands, > so it is possible to create

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-09 Thread Max Nikulin
On 09/05/2023 18:34, Ihor Radchenko wrote: I can easily see Lualatex-specific preamble simply failing to work on Latex. Or things being rendered wrongly. iftex.sty has \ifpdftex and \iftutex (XeTeX, LuaTeX, LuaHBTeX) commands, so it is possible to create universal preamble with some

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-09 Thread General discussions about Org-mode.
Timothy writes: > Hi Ihor, > >>> As a result of this issue (plus other issues with xelatex), I’m >>> considering adding an option to specify different LaTeX compilers for >>> previews and exports, with the default option continuing to be >>> the value of `org-latex-compiler’. >> >> I am not

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-09 Thread Timothy
Hi Ihor, >> To be clear, the default will be “use the same preview compiler as document >> compiler”, but the hassles we’re currently experiencing with XeLaTeX/LuaLaTeX >> make us think it could be worth adding an override option. > > I understand. I propose to fall back to the default even if

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-09 Thread Ihor Radchenko
Timothy writes: >> One option could be trying pdflatex first and falling back to the >> default compiler on failure. But only as non-default option. > > To be clear, the default will be “use the same preview compiler as document > compiler”, but the hassles we’re currently experiencing with

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-09 Thread Timothy
Hi Ihor, >> As a result of this issue (plus other issues with xelatex), I’m >> considering adding an option to specify different LaTeX compilers for >> previews and exports, with the default option continuing to be >> the value of `org-latex-compiler’. > > I am not sure if it is a good idea. > I

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-09 Thread Ihor Radchenko
Karthik Chikmagalur writes: > As a result of this issue (plus other issues with xelatex), I'm > considering adding an option to specify different LaTeX compilers for > previews and exports, with the default option continuing to be > the value of `org-latex-compiler'. I am not sure if it is a

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-08 Thread Konstantinos Chousos
> This checks out. I tested previews with lualatex for a bit, and it's > about 8-10x slower than pdflatex. One big chunk of this gap is the > absence of precompilation, the rest appears to be inherent to lualatex. > I'm not familiar with lualatex, so if someone knows how it can be sped > up I'd

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-08 Thread Karthik Chikmagalur
> Yeah, it kinda works ok now. It is kinda slow, but it probably takes > the same time as the normal previews. May the fact that I use > `lualatex' be the culprit? This checks out. I tested previews with lualatex for a bit, and it's about 8-10x slower than pdflatex. One big chunk of this gap is

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-06 Thread Konstantinos Chousos
Update about a little bug I found: When it comes to fragments that contains things such as limits, under/over braces etc., the live preview's borders get kind of messed up. Don't know how to describe it exactly, see the attached image. -Konstantinos

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-06 Thread Ihor Radchenko
Konstantinos Chousos writes: >> Tecosaur will have a better idea of what's happening here. Note that >> the export options for html are `tex:dvipng' or `tex:dvisvgm', not >> `dvipg' and `dvisvg'. > > Oops, you're right. `dvisvgm' works. It would be useful if unexpected values there triggered a

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-06 Thread Konstantinos Chousos
> They shouldn't be any slower than when you manually call > `org-latex-preview' on a fragment. To be sure, you could try > > (setq org-latex-preview-debounce 0.3 > org-latex-preview-throttle 0.3) > > and then turn on (or turn off + on) `org-latex-preview-auto-mode'. Yeah, it kinda works

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-05 Thread Karthik Chikmagalur
> The preview now works as stated, although I find it kinda slow to > regenerate, even if I set `org-latex-preview-throttle' to 0.2. They shouldn't be any slower than when you manually call `org-latex-preview' on a fragment. To be sure, you could try (setq org-latex-preview-debounce 0.3

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-05 Thread Konstantinos Chousos
> Is tooltip-mode turned on? That was it! Thank you so much! Now both error messages and live previews work! > We'd like to focus on improving the user experience of the core features > first. If these issues are cleaned up before 9.7, I will work on > polishing the live previews feature.

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-05 Thread Karthik Chikmagalur
> 1. Use TEC's org-mode =dev= branch, up to the =---NOPUSH PERSONAL >DIVIDER---= commit. > 2. Set some config options, which can be in the above link. > 3. Test the new features. > 4. When a latex fragment contained an error, its color would turn red, >but no popup would appear on hover,

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-05 Thread Konstantinos Chousos
(Don't mind the mail change, still the same guy. Just started dabbling in email in Emacs and gmail works better for that). > From your diagnostic report, it looks like you're using lualatex + > precompilation. This can cause some issues, but not the ones you > report above so this is

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-05 Thread Konstantinos Chousos

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-05 Thread Karthik Chikmagalur
>From your diagnostic report, it looks like you're using lualatex + precompilation. This can cause some issues, but not the ones you report above so this is interesting. > 1. When a snippet contains a mistake, it correctly turns red, but no > error message is shown when I hover my mouse over

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-03 Thread K. Chousos
Hello Timothy. First of all, thank you for your contribution. I use your fork for some days now and I can verify that it is working correctly. I have only faced the following problems: 1. When a snippet contains a mistake, it correctly turns red, but no error message is shown when I hover

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-05-03 Thread K. Chousos
Hello Timothy. First of all, thank you for your contribution. I use your fork for some days now and I can verify that it is working correctly. I have only faced the following problems: 1. When a snippet contains a mistake, it correctly turns red, but no error message is shown when I hover

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-28 Thread Tony Zorman
Hi, > After months of work, Karthink and I have prepared a rather large > patch-set completely overhauling the LaTeX preview system. I hope to > have a patch set shortly, but in the mean time it would be good to get > some more people testing this. thank you for this! I've been testing it (from

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-15 Thread Rudolf Adamkovič
Ihor Radchenko writes: > What about > > (define-fringe-bitmap > 'sand-clock > [#b > #b1001 > #b0110 > #b0110 > #b01101110 > #b0000 > #b00011000 > #b00100100 > #b0110 > #b01011010 > #b >

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-15 Thread Ihor Radchenko
Timothy writes: >>> • Org mode can keep equation numbering consistent by regenerating previews >>> as needed. >> >> This is disabled by default, right? >> But I am still seeing the numbering (see the attached) the Org text >> below. > > Correct. Numbering settings have been re-done to hopefully

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-15 Thread Ihor Radchenko
Timothy writes: >> 3. It took 20+ seconds (!!!) to generate previews in a single section in >>my large notes.org. Profile attached - org-latex-preview parses the >>whole 20Mb buffer to generate the preamble. Why? > > Because of the use of buffer info in generating the preamble, which

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-14 Thread Timothy
Hi Ihor, >> • Preview overlays can hide and show themselves dynamically based on cursor >> position. > > How? I do not see anything and I cannot find any relevant customization > in org-latex-preview.el I think the docs might need to be edited to make `org-latex-preview-auto-mode' more

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-14 Thread Timothy
Hi Ihor, >> • Org mode can keep equation numbering consistent by regenerating previews >> as needed. > > This is disabled by default, right? > But I am still seeing the numbering (see the attached) the Org text > below. Correct. Numbering settings have been re-done to hopefully make what’s

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-14 Thread Timothy
Hi Ihor, > 1. Plenty of valid warnings and one of third-party packages broken when >using the branch [*] Thanks for highlighting these, I’m gradually going through them. > 2. I had to (require ’org-latex-preview). `org-latex-preview’ is not >autoloaded for some reason. I haven’t had

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-14 Thread Timothy
Hi Ihor, Thanks for mentioning this, I’ve now added a priority of -80 . All the best, Timothy -- Timothy (‘tecosaur’/‘TEC’), Org mode contributor. Learn more about Org mode at . Support Org development at , or support my work at

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-13 Thread Ihor Radchenko
Ihor Radchenko writes: > The previews still interfere with hl-line overlay - their background is > not replaced with hl-line background. Maybe we can also put low > 'priority in the preview overlays? To make them closer to ordinary text > in buffer. See the attached where I compared default

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-13 Thread Ihor Radchenko
Timothy writes: > • Preview overlays can hide and show themselves dynamically based on cursor > position. How? I do not see anything and I cannot find any relevant customization in org-latex-preview.el -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-13 Thread Ihor Radchenko
Timothy writes: > • Previews are coloured to match surrounding text and the active theme. > • SVG previews automatically change colors when the active theme changes. The previews still interfere with hl-line overlay - their background is not replaced with hl-line background. Maybe we can also

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-13 Thread Ihor Radchenko
Timothy writes: > • Org mode can keep equation numbering consistent by regenerating previews as > needed. This is disabled by default, right? But I am still seeing the numbering (see the attached) the Org text below. Also, One of the preview is truncated. Org source: --- For isotropic

[Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-12 Thread Timothy
Hi All, After months of work, Karthink and I have prepared a rather large patch-set completely overhauling the LaTeX preview system. I hope to have a patch set shortly, but in the mean time it would be good to get some more people testing this. To test this feature, please check out the `dev'