enable orgmode latex preview to support retina on mac
Table of Contents
1 enable orgmode latex preview to support retina on mac
By default orgmode latex preview do not support retina, so on mac with retina screen, latex preview will be fuzzy.
However, we can hack org.el to achieve the function. Just follow steps below:
1.1 get the proper version of emacs
To instead use the Yamamoto Mitsuharu version of Emacs 25.1 (with more mac-specific features):
brew tap railwaycat/emacsmacport
brew install emacs-mac
and finally link it to your Applications folder:
brew linkapps emacs-mac
this version emacs will support retina image display.
1.2 change org-format-latex-options
change scale from 1.0 to 2.0, to generate 2x size image.
1.3 delete org.elc
1.4 add function to org.el
(defun galaxy-compose-image-filename-2x(image-file-name)
(concat (file-name-directory image-file-name) (file-name-base image-file-name) "@2x." (file-name-extension image-file-name)))
and eval the function.
1.5 modify 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 filename-2x (galaxy-compose-image-filename-2x movefile))
(rename-file movefile filename-2x)
(call-process-shell-command "convert" nil nil nil nil (concat "\"" filename-2x "\" -scale \"50%\" -quality \"100%\"" ) (concat "\"" movefile "\"" )))
and eval the function.
Now, you can preview latex with 2x size image for mac retina screen.
enable orgmode latex preview to support retina on mac的更多相关文章
- OWIN support for the Web API 2 and MVC 5 integrations in Autofac
Currently, in the both the Web API and MVC frameworks, dependency injection support does not come in ...
- Sublime-text markdown with Vim mode and auto preview
说明 最近看到markdown相关的东西,被其书写方式吸引,其实以前就在找这种类似的工具,但是也没找到,由于习惯了Vim,可Vim不支持markdown预览,这点可能不是很好,于是找到Sublime- ...
- Solution for Latex error: "Cannot determine size of graphic"
I'm trying to include graphics in my Latex-file, which I compiled with latex+dvipdf on OS X. Latex h ...
- VS code 配置为 Python R LaTeX IDE
VS code配置为Python R LaTeX IDE VS code的中文断行.编辑功能强大,配置简单. VSC的扩展在应用商店搜索安装,快捷键ctrl+shift+x调出应用商店. 安装扩展后, ...
- image-set实现Retina屏幕下图片显示详细介绍
支持image-set:如果你的浏览器支持image-sete,而且是普通显屏下,此时浏览器会选择image-set中的@1x背景图像: Retina屏幕下的image-set:如果你的浏览器支持im ...
- SharePoint online Multilingual support - Settings
博客地址:http://blog.csdn.net/FoxDave This post will talk about how to enable sharepoint online site mul ...
- [转]The NTLM Authentication Protocol and Security Support Provider
本文转自:http://davenport.sourceforge.net/ntlm.html#ntlmHttpAuthentication The NTLM Authentication Proto ...
- Retina屏幕下image-set
实现Retina屏幕下图像的显示方法,还特别给我截取了一段代码: .soso .logo .qqlogo { display: block; width: 134px; height: 44px; b ...
- 如何判断retina,如何判断设备的比例
http://www.189works.com/article-95647-1.html 说起iPhone 4带来的革新,retina display绝对是最吸引眼球的一项,以至于我现在看电脑的显示屏 ...
随机推荐
- strust2.2.3版本启动报错struts-plugin.xml:8:162
我用的是struts-2.2.3,开始把全部的jar包都放进去了,可是一直报 信息: Parsing configuration file [struts-plugin.xml] 2011-6-11 ...
- android中如何在系统启动的时候启动自己的service
自定义一个broadcastreciver在去接受系统启动消息,然后在处理的时候启动自己的service即可
- IO系列之File
1 File类 1.1 目录列表器 在这里我主要是参考Think in Java的内容从而做的一些总结以及扩展.Java中的IO流的设计应该说是Java中最经典的,最学院式的设计,包括它的整体架构设计 ...
- 项目一:第六天 WebService写接口 和CXF框架
1 课程计划 1. webService入门(了解) 2. 基于jdk1.7开发webservice服务(了解) 3. Apache CXF框架入门(掌握) 4. 基于CXF框架搭建CRM系统(掌握) ...
- Ubuntu 解决:当执行`sudo apt-get update`命令时 出现的 “apt-get 404 Not Found Package Repository Errors” 问题
Ubuntu 解决:当执行sudo apt-get update或者sudo apt-get install命令是出现的 "apt-get 404 Not Found Package Rep ...
- ADT-23.0.2百度网盘下载地址
最近 Google 被墙 http://download.csdn.net/download/wentai2009/7736389
- Error creating form bean of class com.onlinebookstore.presentation.CatalogBean
Error creating form bean of class com.onlinebookstore.presentation.CatalogBean 可能是action form未编译 这个问 ...
- C# 将数组转换为以逗号分隔的字符串
例子: string[] array = { "A", "B", "C", "D" }; string str = st ...
- One-Hot独热编码
One-Hot独热编码 Dummy Encoding VS One-Hot Encoding二者都可以对Categorical Variable做处理,定性特征转换为定量特征,转换为定量特征其实就是将 ...
- 《OD学hadoop》20160903某旅游网项目实战
一.大数据的落地点 1.数据出售 数据商城:以卖数据为公司的核心业务 2. 数据分析 百度统计 友盟 GA IBM analysis 3.搜索引擎 4. 推荐系统 mahout 百分比 5.精准营销 ...