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绝对是最吸引眼球的一项,以至于我现在看电脑的显示屏 ...
随机推荐
- ABCD四个人说真话的概率都是1/3。假如A声称B否认C说D是说谎了,那么D说过的那句话真话的概率是多少
ABCD四个人说真话的概率都是1/3.假如A声称B否认C说D是说谎了,那么D说过的那句话 真话的概率是多少 记"A声称B否认C说D说谎"为X,那么由贝叶斯公式,所求的 P(D真)P ...
- OpenCV创建轨迹条,图片像素的访问
.OpenCV创建进度条以及图像对比度,亮度调整 1.创建轨迹条createTrackbar() 函数原型C++: intcreateTrackbar(conststring& trackba ...
- CentOS 7 配置 ISCSI 服务器
一.服务器配置 1.安装配置软件: yum install targetcli -y 2.进入配置界面: targetcli ,并进行如下配置: 1) /backstores/block create ...
- Asp.net 微信企业号网页开发流程
一.在pageload方法中获取code var code = GetCode(); private string GetCode() { return HttpContext.Current.Req ...
- hadoop-2.3.0-cdh5.1.0完全分布式集群配置HA配置
一.安装前准备: 操作系统:CentOS 6.5 64位操作系统 环境:jdk1.7.0_45以上,本次采用jdk-7u55-linux-x64.tar.gz master01 10.10.2.57 ...
- JSP错误页面
exception是JSP九大内置对象之一,其实例代表其他页面的异常和错误.只有当页面是错误处理页面时,即isErroePage为 true时,该对象才可以使用.对于C项,errorPage的实质就是 ...
- hdu1072
#include <iostream> #include <cstdio> #include <cstring> #include <queue> us ...
- jquery抽奖插件+概率计算
写了一个抽奖的jquery插件和计算概率的方法, 结合起来就是一个简单的概率抽奖, 不过实际项目中基本不会把抽奖概率的计算放在前端处理~. demo lottery.jquery.js $.fn.ex ...
- jq中打开新页面 并获取携带值
打开新页面:window.location.href = "./index.html?id=1"获取携带值: function GetRequest() { var url = l ...
- Gson应用:利用map和list来拼装Json消息
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; i ...