emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Huszagh <huszaghmatt@gmail.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	Ihor Radchenko <yantar92@gmail.com>
Subject: Re: Patch to allow adjusting latex fragment display scale factor
Date: Thu, 18 Jan 2024 22:49:54 -0800	[thread overview]
Message-ID: <CA+X8ke6fXoDXqbqK5jgsMqesW_BO_Y7pBkYoACPUPCyRd+UnOg@mail.gmail.com> (raw)
In-Reply-To: <87pmscxjgb.fsf@gmail.com>

Hi,

Bringing this back up. Ihor, I've added you to the thread directly
(hope that's ok).

Any thoughts? I have not yet updated it for the most recent changes to
main, but I can do that.

Matt

On Sun, Oct 10, 2021 at 9:40 PM Matt Huszagh <huszaghmatt@gmail.com> wrote:
>
> Matt Huszagh <huszaghmatt@gmail.com> writes:
>
> > I've created a patch to allow adjusting the scale factor used for inline
> > latex image fragments. This involves a customizable variable that can
> > either be set to a scale factor (defaults to 1.0) or a function that
> > evaluates to a scale factor.
> >
> > This feature is in addition to the existing scale factor adjustment
> > capability provided by `org-preview-latex-process-alist' through
> > `:image-size-adjust'. Wherease image-size-adjust performs scaling at the
> > time of image generation, the new change performs it during
> > display. This can lead to significant time saving and suffers no loss of
> > quality for vector graphics.
> >
> > As an example of use, I have several functions for changing frame
> > scaling. I've added
> >
> > (if (eq major-mode 'org-mode)
> >       (progn
> >         (org-clear-latex-preview)
> >         ;; 16 corresponds to the C-u C-u arg prefix.
> >         (org-latex-preview 16)))
> >
> > to these functions so that changing the frame scaling also
> > correspondingly changes the latex preview/fragment scaling to match the
> > new size of the surrounding text. Because of this new feature, this
> > change is effectively instantaneous for reasonably numbers of
> > overlays. Obviously, something similar could be done for
> > `text-scale-adjust' (e.g., through `advice-add').
> >
> > Feedback appreciated.
>
> Apologies, the patch I sent is slightly wrong. The line numbers also
> reflect an earlier patch I made. Here is a corrected version.
>


  reply	other threads:[~2024-01-19  6:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  4:32 Patch to allow adjusting latex fragment display scale factor Matt Huszagh
2021-10-11  4:40 ` Matt Huszagh
2024-01-19  6:49   ` Matt Huszagh [this message]
2024-01-19 13:26     ` Ihor Radchenko
2024-01-22  5:11       ` Timothy
2024-01-22  5:26         ` Matt Huszagh
2024-01-22  9:47           ` Ihor Radchenko

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=CA+X8ke6fXoDXqbqK5jgsMqesW_BO_Y7pBkYoACPUPCyRd+UnOg@mail.gmail.com \
    --to=huszaghmatt@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@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 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).