From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 11q6MTRtW2SEGQEASxT56A (envelope-from ) for ; Wed, 10 May 2023 12:08:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id pZfTMDRtW2SP4QAA9RJhRA (envelope-from ) for ; Wed, 10 May 2023 12:08:52 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 70A37ADA6 for ; Wed, 10 May 2023 12:08:52 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwgjs-0002lY-6N; Wed, 10 May 2023 06:08:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwgjp-0002l3-RK for emacs-orgmode@gnu.org; Wed, 10 May 2023 06:08:01 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwgjl-0003jv-Qk for emacs-orgmode@gnu.org; Wed, 10 May 2023 06:08:01 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4eff50911bfso7749915e87.2 for ; Wed, 10 May 2023 03:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683713275; x=1686305275; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9jfszGCmzyGUHMJ+jXrjltR/IJW8jC2pcq0DygtTadw=; b=YlCaHakZriSTQ4a3eSWI5YwVkd65bY/2drEoxPi4j28+n+cMVLF0w9ySdf9HTfiiwq 5wT2WLT0F9rUjMlw+14SoOKEbbUUiQUTsZ2gHYlPb6hXEccNKEYZkqzbHZhlIvoJtM+1 4JEiWR+/nyKfgN61geJy/BE0ZkH629mFyqo7sSWm6isOpy46X064t9oCFzsJbQGMwk9W eVy3MPu1lubh0ttSBQF9YMxfYsHwRW8YXPLLlvClsl/gFXl2K5Xc9X9DJ/l4JGF415R3 DXv5r3ADvQzIF9QtjcypqJ/8Z06sIyiqKYD2Drl4peb8cLo8RAyd/wDBG3Oqqwgmq6f3 N+KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683713275; x=1686305275; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9jfszGCmzyGUHMJ+jXrjltR/IJW8jC2pcq0DygtTadw=; b=g8rtFaGVpXr8EjCzO+a7gl3FYoUzsbD8yMkR1ZD+StvYYXueNYQsxAHM2uizxjMaHC M7KqgGP3Im7q1XKaIG3kIcNKQH7lyce6i/f5/VkY/jaIUZ3NlgnLCPwSNLOCMyvS5H+Y MpKCcuy+dFHjnVjp5BzVUgNl6FvvrmyaRos00i/XQUy9W+Gq9vJtSYt1vR9tdFsW42jj 0CkRyzkZMo58IgZ6gV4wPqTyPBgi0gPdOyCCC1wsXZLAxraks4vygDOiddOmqsmbiBez niQkCCtusx1qvnATN/K1LpUZ6sE4HfjogfEtdcHmgbgGWq1bW1cew199jJoALQZiDqJS ZuNA== X-Gm-Message-State: AC+VfDwcj5gtylTBYnqFkVILkTW0yPJ6c1K9QBKYtBf1acg1wWcB+gbp L7bnJkqTykUszRdjsZTn1HsJ/6KKB0cUIcXlxasjGL6FlHw= X-Google-Smtp-Source: ACHHUZ5/IekwktA0vVlltQY87jfxSlXTe78apbhpIwV4RE6i+3TbYDT5Fge5g4sauJ1B4Qf6UGDNN5Z4s+Cb/uunGKw= X-Received: by 2002:ac2:558c:0:b0:4f2:56ed:f22f with SMTP id v12-20020ac2558c000000b004f256edf22fmr1752883lfg.22.1683713275184; Wed, 10 May 2023 03:07:55 -0700 (PDT) MIME-Version: 1.0 References: <87lek2up0w.fsf@tec.tecosaur.net> In-Reply-To: <87lek2up0w.fsf@tec.tecosaur.net> From: Jun Inoue Date: Wed, 10 May 2023 19:07:28 +0900 Message-ID: Subject: Re: [Pre-PATCH] Overhaul of the LaTeX preview system To: Timothy Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000abcbb705fb540b51" Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=jun.lambda@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683713332; a=rsa-sha256; cv=none; b=C38xCm4nBxVN8tm8+oGV7ZjZJWo20BiT7vxcgX8UNZcC4xRP9cbbe5TgQJo3CAH36HCqii OAhqXRrug20hhoWrAyDqKVaXdA9w10OGm5G6kZvUL/sQ/a/WDsvIIhHjVhDFrIB40tn0ad s83Hlzuz0Pm4/GbKGe0IG0z/qBD7mJeiTMqCU8uuemM4FYW81hGGJ/4yoM7mQyaRzeT2BM LMth0G/2Xci46IIZ38gluNnH7UHOmaM7P6fjQmI8ZlcxkwMcrnA3ZvyCTtHPrO3HTJr2lz I7MYXyuVbPZ4+Vtf+rOZQB99Ipqhtc4h3Oc5C9DrkyilcxkidzrgRnb48uqqJg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=YlCaHakZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683713332; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9jfszGCmzyGUHMJ+jXrjltR/IJW8jC2pcq0DygtTadw=; b=uH1CcMosNbufMecJ/ND2/ZTWzZrHw8UaPdxWWOj73ZYp5cFaX+lv6IL0SCeiTlDLm9Acj9 NRL6iT5z/Qa3lEl3OD77wx8eHNhDHOHJQXynbSM3MUlhLdFFPuqIkaiTyAVXmdxRD13Q0E r6NfgYQ9yXtHJ1oMZWSDcPPmsOJjISg24O80aUaVXJVn58W3/uQzMN98gpz9SCAsCSmiBN N7CeNRVrc3WYjmr2Le+q59qewCqyPBeKftQDpap0nA/vUdkH5pjuisTs+vAPcd8wJvO/Pn BWIuiOWAK1l24RUVjz3l/Qz8tzxeBkmW1CBcSLOk7pAnLjr2pigprVkdRqxQYg== X-Migadu-Spam-Score: -11.17 X-Spam-Score: -11.17 X-Migadu-Queue-Id: 70A37ADA6 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=YlCaHakZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-TUID: rTEhH/LGdA+E --000000000000abcbb705fb540b51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, and it works really well, except for one thing. I'm using XeLaTeX, and whenever I typeset a LaTeX fragment containing a letter that sticks below the baseline (g, j, y, etc), the fragment is typeset too small, almost like subscripts. It reproduces when this is the only setting I have: (use-package org :ensure nil :custom (org-latex-compiler "xelatex") ;; drop this line and the issue goes awa= y ) Minimal 1-line org file to trigger the bug: abc $d$ $y$ -- the y is typeset too small compared to abc. The d is just the right size. 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. On Sun, Mar 12, 2023 at 9:35=E2=80=AFPM Timothy = wrote: > Hi All, > > After months of work, Karthink and I have prepared a rather large patch-s= et > completely overhauling the LaTeX preview system. I hope to have a patch s= et > 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 > (it=E2=80=99s the default bra= nch). > There are > also some other changes there currently, but I don=E2=80=99t think anythi= ng is > broken. > > You can view the almost-ready path set/diff here: > , see th= e > ORG-NEWS and org-manual entries to get a bit more of an idea of what=E2= =80=99s > changed. > The short version is that now: > =E2=80=A2 Previews are generated in bulk, and hundreds of LaTeX fragments= can be > processed per second. > =E2=80=A2 Images are placed continuously as they are generated. > =E2=80=A2 Preview generation is asynchronous and will not block Emacs. > =E2=80=A2 Inline previews are aligned and scaled to match the font baseli= ne and > size. > =E2=80=A2 Previews scale along with text when the text scale is changed. > =E2=80=A2 Previews are coloured to match surrounding text and the active = theme. > =E2=80=A2 SVG previews automatically change colors when the active theme = changes. > =E2=80=A2 Error encountered when compiling LaTeX fragments can be accesse= d by > mousing over preview images. > =E2=80=A2 Preview overlays can hide and show themselves dynamically based= on > cursor position. > =E2=80=A2 Org mode can auto-generate LaTeX previews as you type or edit t= he text > of existing ones. > =E2=80=A2 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 > 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: > > > All the best, > Timothy > > -- > Timothy (=E2=80=98tecosaur=E2=80=99/=E2=80=98TEC=E2=80=99), Org mode cont= ributor. > Learn more about Org mode at . > Support Org development at , > or support my work at . > --=20 Jun Inoue --000000000000abcbb705fb540b51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Timothy, I love what you and K= arthink have done here!=C2=A0 Typesetting is so much faster now!=C2=A0 And = the little nuggets like error reporting and intelligent sizing & colori= ng is so going to boost my org QoL.=C2=A0 Thank you so much for your work!<= br>

I've been trying this on and off for a few= days now, and it works really well, except for one thing.=C2=A0 I'm us= ing XeLaTeX, and whenever I typeset a LaTeX fragment containing a letter th= at sticks below the baseline (g, j, y, etc), the fragment is typeset too sm= all, almost like subscripts.=C2=A0 It reproduces when this is the only sett= ing I have:

(use-package org
=C2=A0 =C2=A0 = :ensure nil
=C2=A0 =C2=A0 :custom
=C2=A0 =C2=A0 (org-latex-compiler &= quot;xelatex") ;; drop this line and the issue goes away
)

Minimal 1-line org file to trigger the bug:
=
abc $d$ $y$ -- the y is typeset too small compared to abc.=C2=A0= The d is just the right size.

You mention in = a separate email that XeLaTeX is known to cause hassles, but is this one of= them?=C2=A0 I could migrate to PDFLaTeX, but I'd lose the convenience = of editing with unicode-math.

On Sun, Mar 12, 2023 at 9:35=E2=80= =AFPM Timothy <orgmode@tec.tecosaur.net> 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 test= ing
this.

To test this feature, please check out the `dev' branch of
<https://git.tecosaur.net/tec/org-mode.git> (it= =E2=80=99s the default branch). There are
also some other changes there currently, but I don=E2=80=99t 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=E2=80= =99s changed.
The short version is that now:
=E2=80=A2 Previews are generated in bulk, and hundreds of LaTeX fragments c= an be processed per second.
=E2=80=A2 Images are placed continuously as they are generated.
=E2=80=A2 Preview generation is asynchronous and will not block Emacs.
=E2=80=A2 Inline previews are aligned and scaled to match the font baseline= and size.
=E2=80=A2 Previews scale along with text when the text scale is changed. =E2=80=A2 Previews are coloured to match surrounding text and the active th= eme.
=E2=80=A2 SVG previews automatically change colors when the active theme ch= anges.
=E2=80=A2 Error encountered when compiling LaTeX fragments can be accessed = by mousing over preview images.
=E2=80=A2 Preview overlays can hide and show themselves dynamically based o= n cursor position.
=E2=80=A2 Org mode can auto-generate LaTeX previews as you type or edit the= text of existing ones.
=E2=80=A2 Org mode can keep equation numbering consistent by regenerating p= reviews 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/karthin= k/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=3Dn-AfvuV-bYo&g= t;

All the best,
Timothy

--
Timothy (=E2=80=98tecosaur=E2=80=99/=E2=80=98TEC=E2=80=99), Org mode contri= butor.
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>.


--
Jun Inoue
--000000000000abcbb705fb540b51--