Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On OSX. preview either doesn't exist or is giant. #14

Open
justinabrahms opened this issue Jun 13, 2022 · 2 comments
Open

On OSX. preview either doesn't exist or is giant. #14

justinabrahms opened this issue Jun 13, 2022 · 2 comments

Comments

@justinabrahms
Copy link

Okay, so by default.. they preview is giant. If I change the scale to 0.5, it disappears. Any thoughts?

(use-package org-latex-impatient
  :defer t
  :hook org-mode
  :ensure-system-package ((tex2svg . "npm install -g mathjax-node-cli"))
  :config
  (setq org-latex-impatient-tex2svg-bin "/usr/local/bin/tex2svg"
        org-latex-impatient-scale 0.5))

Photo w/ the scale enabled

The box in the middle is the preview pane
Screen Shot 2022-06-12 at 11 19 37 PM

Photo without scale enabled

Screen Shot 2022-06-12 at 11 21 05 PM

@yangsheng6810
Copy link
Owner

I am not a Mac user, but I recall some had issue with scaling. Here are a few things you might want to check:

  1. Emacs version. Quite some changes were made in Emacs 28, some involving the rendering of SVG.
  2. librsvg version.
  3. Emacs distribution, i.e. emacs-mac, emacs-plus, etc. Some reported limited support for SVG for some distribution, specifically scaling capability.
  4. HiDPI setting in Emacs.

To start with debugging, you might want to change function org-latex-impatient--insert-into-posframe-buffer, and write ss into a temp file, like mentioned here: #12 (comment). This writes the SVG being rendered into "/tmp/org-latex-impatient-*.svg", and you can try opening it in Emacs directly and in your favorite SVG viewer.

@dankessler
Copy link

I think I have found a fix for this; see PR #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants