Enable Orgmode Latex Preview to support retina on Mac

Source: Internet
Author: User
Tags lua sqlite plantuml

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.