Table of Contents
- 1. Enable Orgmode Latex Preview to support retina on Mac
- 1.1. Get the proper version of Emacs
- 1.2. Change Org-format-latex-options
- 1.3. Delete ORG.ELC
- 1.4. Add function to Org.el
- 1.5. Modify function Org-format-latex
1Enable Orgmode Latex Preview to support retina on Mac
By default Orgmode Latex preview don't support retina, so on Mac with Retina screen, latex preview would be fuzzy.
However, we can hack org.el to achieve the function. Just Follow steps below:
1.1Get the proper version of Emacs
To instead use the Yamamoto Mitsuharu version of Emacs 25.1 (with more mac-specific features):
Brew Tap Railwaycat/emacsmacportbrew Install Emacs-mac
and finally link it to your Applications folder:
Brew Linkapps Emacs-mac
This version of Emacs is support retina image display.
1.2Change Org-format-latex-options
1.0 to 2.0, and to generate 2x size image.
1.3Delete ORG.ELC1.4Add function to Org.el
(defungalaxy-compose-image-filename-2x"@2x." (File-name-extension image-file-name)))
and eval the function.
1.5Modify function Org-format-latex
Change fragment:
(unless (file-exists-p movefile) (org-create-formula-image value movefile options Forbuffer processing-type)
To
(unless (file-exists-p movefile) (org-create-formula-image value movefile options forbuffer processing-type) ( setq "Convert" "\"" "\"-scale \ "50%\"-quality \ "100%\" " "\"" "\"" )))
and eval the function.
Now, you can preview the latex with a 2x size image for Mac Retina screen.
Author:galaxy
created:2017-04-18 Tue 00:11
Validate
Enable Orgmode Latex Preview to support retina on Mac