all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Pre-PATCH] Overhaul of the LaTeX preview system
@ 2024-04-11 19:26 Yaroslav Drachov
  2024-04-18 20:04 ` Karthik Chikmagalur
  0 siblings, 1 reply; 83+ messages in thread
From: Yaroslav Drachov @ 2024-04-11 19:26 UTC (permalink / raw)
  To: orgmode; +Cc: emacs-orgmode

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 release of Org-mode, and in your release dvipng method work almost as expected. dvisvgm preview method actually generate svg’s in /var/folders/3m…, but don’t make an overlay after all and equation environments remain being formatted as text.

Best wishes,
Yaroslav

^ permalink raw reply	[flat|nested] 83+ messages in thread
* Re: [Pre-PATCH] Overhaul of the LaTeX preview system
@ 2024-04-18 21:49 Корякин Артём
  0 siblings, 0 replies; 83+ messages in thread
From: Корякин Артём @ 2024-04-18 21:49 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

Max Nikulin <manikulin@gmail.com> 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 default shell for emacs when I
was trying to get org-fc working[2]. I get some progress back then, but
in the end I just installed busybox using scoop[3] and removed
shell-quote-argument from org-fc functions[4].


> On Windows `shell-quote-argument' should use an escaping strategy
> quite different from POSIX systems. Disclaimer: I do not have a
> Windows box, so it is unlikely that I could help with further
> steps. Perhaps other functions should be used to deal with file names.

> Windows box

I need this laptop to run windows, because pirated CAD programms that I
need for studying would run only on Windows.
I also use emacs for studying and I plan to eventually switch to
KiCAD and freecad on the free operating system.

> Perhaps other functions should be used to deal with file names.

I will try to replace two functions that Karthik mentioned
org-latex-preview--tex-compile-async
org-latex-preview--image-extract-async
with their corresponding versions without shell-quote-argument.

But you also gave me another idea:
I could try to set default shell for emacs to sh that comes from
installed busybox package.

If there is an issue with shell-quote-argument behaving on windows like
on POSIX system, than it might be logical to try to launch these
commands using POSIX shell. 

[1]:https://github.com/artsi0m/emacs-organizer/tree/1e1bac13b0f845cb622db08759b9e14fe35fcae7?tab=readme-ov-file#set-powershell-to-default-shell-on-windows


[2]: https://todo.sr.ht/~l3kn/org-fc/43#event-334320
[3]: https://scoop.sh
[4]: https://github.com/artsi0m/emacs-organizer/tree/1e1bac13b0f845cb622db08759b9e14fe35fcae7?tab=readme-ov-file#org-fc-awkfind-on-windows

Sorry for resending this message again.
I forgot to add CC to mailing list.
I don't know how to do this automatically from gnus unfortunately.


^ permalink raw reply	[flat|nested] 83+ messages in thread
* Re: [Pre-PATCH] Overhaul of the LaTeX preview system
@ 2024-04-17 20:11 Корякин Артём
  2024-04-18  3:11 ` Karthik Chikmagalur
  2024-04-18 15:14 ` Max Nikulin
  0 siblings, 2 replies; 83+ messages in thread
From: Корякин Артём @ 2024-04-17 20:11 UTC (permalink / raw)
  To: visuweshm; +Cc: emacs-orgmode, karthikchikmagalur, orgmode


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 'c\:/Users/artsi0m/AppData/Local/Temp/org-tex-DAJVTr.dvi' for reading

As you can get from the traceback it is problem with windows. But I
remember solving simillar problem with org-fc already[1][2]. I just removed
escaping (quoting) from one of the elisp functions.

So, the main problem of the problem is that on Windows
(shell-quote-argument) function will quote c:/ as c\:/ which breaks
ability to find one or another file. It maybe other function with this
quoting, but I suppose that it is it.

Please, point me in the right direction to solve this problem.
Maybe I could somehow rewrite shell-quote-argument using advices ?
Maybe some more global changes is needed for emacs on windows ?

Thanks a lot for the patience and for reading this email.
Sorry for misspelling or grammar mistakes, english is not my mother tongue.

[1]:https://github.com/artsi0m/emacs-organizer/tree/1e1bac13b0f845cb622db08759b9e14fe35fcae7?tab=readme-ov-file#org-fc-awkfind-on-windows
[2]: https://todo.sr.ht/~l3kn/org-fc/43


^ permalink raw reply	[flat|nested] 83+ messages in thread
* Re: [Pre-PATCH] Overhaul of the LaTeX preview system
@ 2023-08-07  8:12 WANG Yicheng
  2023-08-08  8:30 ` Ihor Radchenko
  0 siblings, 1 reply; 83+ messages in thread
From: WANG Yicheng @ 2023-08-07  8:12 UTC (permalink / raw)
  To: orgmode@tec.tecosaur.net; +Cc: emacs-orgmode@gnu.org

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

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 environments enclosed by \begin{…} \end{…} are rendered correctly.

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.

Regards,
ywangmy

[-- Attachment #2: Type: text/html, Size: 1037 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread
* Re: Re: [Pre-PATCH] Overhaul of the LaTeX preview system
@ 2023-06-04 23:29 Rudolf Adamkovič
  2023-06-05  5:27 ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 83+ messages in thread
From: Rudolf Adamkovič @ 2023-06-04 23:29 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez, Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> 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
-- 
"Great minds discuss ideas; average minds discuss events; small minds discuss
people."
--- Anna Eleanor Roosevelt (1884-1962)

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


^ permalink raw reply	[flat|nested] 83+ messages in thread
* [Pre-PATCH] Overhaul of the LaTeX preview system
@ 2023-03-12 12:23 Timothy
  2023-03-13 12:26 ` Ihor Radchenko
                   ` (14 more replies)
  0 siblings, 15 replies; 83+ messages in thread
From: Timothy @ 2023-03-12 12:23 UTC (permalink / raw)
  To: emacs-orgmode

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

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' branch of
<https://git.tecosaur.net/tec/org-mode.git> (it’s the default branch). There are
also some other changes there currently, but I don’t think anything is broken.

You can view the almost-ready path set/diff here:
<https://git.tecosaur.net/tec/org-mode/compare/c8401d2f..6d60738>, see the
ORG-NEWS and org-manual entries to get a bit more of an idea of what’s changed.
The short version is that now:
• Previews are generated in bulk, and hundreds of LaTeX fragments can be processed per second.
• Images are placed continuously as they are generated.
• Preview generation is asynchronous and will not block Emacs.
• Inline previews are aligned and scaled to match the font baseline and size.
• Previews scale along with text when the text scale is changed.
• Previews are coloured to match surrounding text and the active theme.
• SVG previews automatically change colors when the active theme changes.
• Error encountered when compiling LaTeX fragments can be accessed by mousing over preview images.
• Preview overlays can hide and show themselves dynamically based on cursor position.
• Org mode can auto-generate LaTeX previews as you type or edit the text of existing ones.
• Org mode can keep equation numbering consistent by regenerating previews as needed.

If you do come across any issues, please let me know either in a reply here or
the org-mode matrix room. If you could also run
<https://gist.github.com/karthink/0ac48411a81459c0f3fd7557c4e817db> and share the
diagnostic info, that would be quite helpful.

Lastly, Karthink has prepared a video giving an overview of the new
capabilities, you can give it a watch here:
<https://www.youtube.com/watch?v=n-AfvuV-bYo>

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] 83+ messages in thread

end of thread, other threads:[~2024-12-18 21:18 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-11 19:26 [Pre-PATCH] Overhaul of the LaTeX preview system Yaroslav Drachov
2024-04-18 20:04 ` Karthik Chikmagalur
2024-04-18 20:13   ` Yaroslav Drachov
2024-06-23 10:53     ` Ihor Radchenko
2024-06-23 11:00       ` Yaroslav Drachov
2024-06-26 19:05         ` Karthik Chikmagalur
2024-07-02 10:38           ` Yaroslav Drachov
2024-09-03 14:30             ` Ihor Radchenko
2024-09-03 15:50               ` Karthik Chikmagalur
2024-09-03 23:04                 ` Jun Inoue
2024-09-04  0:18                   ` Karthik Chikmagalur
2024-09-04  0:44                     ` Jun Inoue
  -- strict thread matches above, loose matches on Subject: below --
2024-04-18 21:49 Корякин Артём
2024-04-17 20:11 Корякин Артём
2024-04-18  3:11 ` Karthik Chikmagalur
2024-04-18 20:47   ` Корякин Артём
2024-04-18 15:14 ` Max Nikulin
     [not found]   ` <86edb2ft89.fsf@gmail.com>
2024-04-19  2:23     ` Max Nikulin
2024-04-19  6:53       ` Корякин Артём
2023-08-07  8:12 WANG Yicheng
2023-08-08  8:30 ` Ihor Radchenko
2023-06-04 23:29 Rudolf Adamkovič
2023-06-05  5:27 ` Pedro Andres Aranda Gutierrez
2023-03-12 12:23 Timothy
2023-03-13 12:26 ` Ihor Radchenko
2023-03-14 16:04   ` Timothy
2023-03-15  9:34     ` Ihor Radchenko
2023-03-15 17:28       ` Rudolf Adamkovič
2023-03-13 12:30 ` Ihor Radchenko
2023-03-13 12:32   ` Ihor Radchenko
2023-03-14 14:46     ` Timothy
2023-03-13 12:36 ` Ihor Radchenko
2023-03-14 16:10   ` Timothy
2023-03-15  9:38     ` Ihor Radchenko
2023-03-13 12:37 ` Ihor Radchenko
2023-03-14 16:13   ` Timothy
2023-03-25 15:29 ` Tony Zorman
2023-05-02 12:15 ` K. Chousos
2023-05-03 10:07 ` K. Chousos
2023-05-05 17:57   ` Karthik Chikmagalur
2023-05-05 18:48     ` Konstantinos Chousos
2023-05-05 18:53     ` Konstantinos Chousos
2023-05-05 20:05       ` Karthik Chikmagalur
2023-05-05 21:06         ` Konstantinos Chousos
2023-05-05 22:58           ` Karthik Chikmagalur
2023-05-06  9:19             ` Konstantinos Chousos
2023-05-06  9:30               ` Ihor Radchenko
2023-05-06 10:08               ` Konstantinos Chousos
2023-05-08 20:04               ` Karthik Chikmagalur
2023-05-08 20:40                 ` Konstantinos Chousos
2023-05-09 11:34                 ` Ihor Radchenko
2023-05-09 12:03                   ` Timothy
2023-05-09 12:10                     ` Ruijie Yu via General discussions about Org-mode.
2023-05-09 12:12                     ` Ihor Radchenko
2023-05-09 12:10                       ` Timothy
2023-05-09 12:49                   ` Max Nikulin
2023-05-09 12:57                     ` Ihor Radchenko
2023-05-10 10:07 ` Jun Inoue
2023-05-10 10:21   ` Timothy
2023-05-10 13:09     ` Jun Inoue
2023-05-26  9:50 ` Rudolf Adamkovič
2023-05-28 17:31   ` Timothy
2023-06-03  9:00     ` Rudolf Adamkovič
2023-08-21  8:59 ` Visuwesh
2023-08-21 16:40   ` Karthik Chikmagalur
2023-08-21 17:19     ` Visuwesh
2023-08-21 21:40       ` Karthik Chikmagalur
2023-08-22  2:57         ` Visuwesh
2024-12-18 17:14           ` Ярослав)
2024-12-18 17:27             ` Karthik Chikmagalur
2024-12-18 18:08               ` Yaroslav Drachov
2024-12-18 19:58                 ` Yaroslav Drachov
2024-12-18 20:12                   ` Karthik Chikmagalur
2024-12-18 21:16                     ` Yaroslav Drachov
2024-05-30  8:28         ` Visuwesh
2024-10-15 18:44           ` Ihor Radchenko
2024-10-16  5:58             ` Visuwesh
2023-08-29  6:01 ` Roshan Shariff
2024-01-07  7:28 ` Timothy
2024-01-20  5:53 ` Matt Huszagh
2024-01-20  6:02 ` Matt Huszagh
2024-01-20  7:13   ` Matt Huszagh
2024-01-21 17:08     ` Timothy
2024-07-21 12:41 ` Jun Inoue

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.