all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
To: Visuwesh <visuweshm@gmail.com>, Timothy <orgmode@tec.tecosaur.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Pre-PATCH] Overhaul of the LaTeX preview system
Date: Mon, 21 Aug 2023 09:40:47 -0700	[thread overview]
Message-ID: <87a5ukcprk.fsf@gmail.com> (raw)
In-Reply-To: <87msykwz2s.fsf@gmail.com>

> 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 mylatexformat is installed

1. Are you using xelatex/lualatex?  
2. If yes, precompilation should have turned itself off with a warning.
3. If no, do you mind sharing this file (or a stripped down version
you're okay sharing that still has these issues) along with the LaTeX
preamble?  That would be `org-latex-preview-preamble' and
`org-latex-packages-alist'.  I would like to reproduce this bug.

Previewing 2000 snippets is exactly where the new async/speedy system is
expected to shine compared to the old one.

>     2. Apparently, org-latex-default-packages-alist no longer contain
>        asmsymb and asmmath?  This change pulled the rug under me since
>        it took me quite a while to figure out why some of my formulas
>        were coloured red...

`org-latex-default-packages-alist' was modified to omit amsmath and
amssymb (among others) in preparation for a conditional export system
where required packages will be determined automatically from the buffer
text -- i.e. to avoid exactly the kind of headache you encountered.
Unfortunately this export system is not part of the patch set yet.

>     3. The image sizes of the same latex environment (e.g., \[ \]) is
>        different for different formulas.  I can send a screenshot of
>        this if required.

This is a recent regression.  Could you generate png previews by:

1. (setq org-latex-preview-default-process 'dvipng)
2. regenerating previews

and checking if this still happens?  If these look fine, this is a
dvisvgm issue and we will fix it soon.

>> 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.
>
> If needed, I can do this after reproducing (1).
>
> BTW, would it possible to arrange other latex environments (\ch{} in my
> case) to be previewed as well?  Currently, I do \(\ch{}\) but omitting
> \( \) would be nice.

Previewing unadorned LaTeX macros is officially unsupported but
partially supported in practice.  If you move the cursor over the \ch{}
and call `org-latex-preview' it should be previewed.  From that point it
should behave like a regular LaTeX fragment.  Editing it should cause
the preview to be auto-updated (If you are using
org-latex-preview-auto-mode).

Karthik


  reply	other threads:[~2023-08-21 16:42 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12 12:23 [Pre-PATCH] Overhaul of the LaTeX preview system 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 [this message]
2023-08-21 17:19     ` Visuwesh
2023-08-21 21:40       ` Karthik Chikmagalur
2023-08-22  2:57         ` Visuwesh
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
2023-08-29  6:01 ` [PATCH 1/1] Fix background color when line-wrapping latex previews Roshan Shariff
2023-08-29 17:14   ` [PATCH v2] Fix background color of " Roshan Shariff
2024-01-07  7:25     ` Timothy
2024-01-07  9:50       ` Roshan Shariff
2024-01-08 10:24         ` Timothy
2024-01-09 20:12           ` Roshan Shariff
2024-01-07  7:28 ` [Pre-PATCH] Overhaul of the LaTeX preview system 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-04-22 11:08 ` Feedback on the new "feature" system in org-export (was: [Pre-PATCH] Overhaul of the LaTeX preview system) Ihor Radchenko
2024-07-21 12:41 ` [Pre-PATCH] Overhaul of the LaTeX preview system Jun Inoue
  -- strict thread matches above, loose matches on Subject: below --
2023-06-04 23:29 Rudolf Adamkovič
2023-06-05  5:27 ` Pedro Andres Aranda Gutierrez
2023-08-07  8:12 WANG Yicheng
2023-08-08  8:30 ` Ihor Radchenko
2024-04-11 19:26 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
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       ` Корякин Артём
2024-04-18 21:49 Корякин Артём

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5ukcprk.fsf@gmail.com \
    --to=karthikchikmagalur@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@tec.tecosaur.net \
    --cc=visuweshm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.