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

Font size does not affect latex previews #29

Open
Eloitor opened this issue Jul 22, 2022 · 7 comments
Open

Font size does not affect latex previews #29

Eloitor opened this issue Jul 22, 2022 · 7 comments

Comments

@Eloitor
Copy link

Eloitor commented Jul 22, 2022

I find the previews too small, but increasing the size of the font does not increase the size of the previews.

@TobiasZawada
Copy link
Owner

Thanks for the report. Previews should be scaled in text-scale-mode.

  1. Please add your Emacs version
  2. Can you reproduce the effect with a minimal init file and attach this file here? Or maybe, it is already reproducible with an empty init file?

@Eloitor
Copy link
Author

Eloitor commented Jul 26, 2022

My emacs version is 28.1 I was in text-scale-mode and the images did not scale with the text.

My minimal init file is the one recomended in melpa

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)

I opened emacs and installed markdown-mode and texfrag-mode.
I then opened this markdown file:

# Test

$x^2$ A

And after zooming in I see this:

image

@TobiasZawada
Copy link
Owner

TobiasZawada commented Jul 26, 2022

Thanks for the infos. As workaround, you can customize texfrag-scale to a factor larger than 1.0.
Please, report whether this works for you.

@Eloitor
Copy link
Author

Eloitor commented Jul 26, 2022

The workaround works for me, thanks.

@TobiasZawada
Copy link
Owner

TobiasZawada commented Jul 26, 2022

When you scaled up the text with text-scale-mode, did you regenerate the previews with C-c C-p C-d? If you do that, does the font size of the formula adapt to that one of the text?

@Eloitor
Copy link
Author

Eloitor commented Jul 27, 2022

Yes, I didn't do C-c C-p C-d after scaling the text. Now I did and the font size of the formula adapted fine. I will add a hook to run texfrag-document after tex-scale-mode. I think this could be added in the README for reference.

@TobiasZawada
Copy link
Owner

Adding texfrag-document after each rescaling of the text might become problematic for large documents. Therefore, it is not implemented. But, maybe, one could regenerate only all currently visible fragments.

I have to think about that feature.
But, I am rather busy right now. So, this will take some time.
I keep the ticket open.

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

2 participants