emacs 笔记问题(数学、物理),希望大家不吝赐教 (预览以及插入问题)。

记理科笔记用Orgmode已经足够,记笔记的时候不需要过于在意排版问题,注意好层次以及富文本标记即可。

如果想要参考一下怎样记笔记,可以看一下 Gilles Castel 的系列博客: https://castel.dev,只不过人家使用 Vim 手写 tex,用 Emacs 的话就可以写 Org 然后输出TeX, 轻松了不止一点半点。

如果觉得公式输入效率不高的话可以使用 yasnippet 等模板系统大幅度提高输入效率。我的org-mode光是公式输入就已经有将近400个模板了,平时输入速度基本可以做到和手写齐平。

至于图片的话论坛里有很多大佬分享了自己的解决方法,比如pasteex-mode等等。网上也能找到一些比较好用的elisp代码,比如我现在还在用的一个一键截图插入的函数:


;;    ros - Rahul's Org-Mode Screenshot
;;
;;    ros is invoked with "M-x ros", then it waits for your selection, takes a
;; screenshot and saves it as orgfileopened.org_YYYYMMDD_hhmmss.png.
;;
;;    Finally, it keeps working by inserting a link and turning ON the
;; display-inline-images, showing the taken screenshot directly into
;; your file.
;;
;;    Track updates, contact the author and see a demo on github.com/Lionyx/ros
;; or http://rahuljuliato.com
;;
(add-hook 'org-mode-hook
	  (lambda ()
	    (defun ros ()
	      (interactive)
	      (if buffer-file-name
		  (progn
		    (message "Waiting for region selection with mouse...")
		    (let ((filename
			   (concat "./"
				   (file-name-nondirectory buffer-file-name)
				   "_"
				   (format-time-string "%Y%m%d_%H%M%S")
				   ".png")))
		      (if (executable-find "scrot")
			  (call-process "scrot" nil nil nil "-s" filename)
			(call-process "screencapture" nil nil nil "-s" filename))
		      (insert (concat "[[" filename "]]"))
		      (org-display-inline-images t t)
		      )
		    (message "File created and linked...")
		    )
		(message "You're in a not saved buffer! Save it first!")
		)
	      )
	    )
	  )

预览的话不知道你是想预览什么,如果是想预览公式的话 org 有 org-latex-preview (C-c C-x C-l),对我来讲不需要经常渲染预览整个文档,org-mode的显示搞的漂亮一些,用类似 org-bars, org-num 之类的minor mode,再设置一下各种face, 编辑体验就上去了,不需要经常预览渲染出来的文档,甚至不用渲染,直接在org-mode里面看更方便。

而且也可以设置 LaTeX 导出 PDF 文档或者导出带样式的HTML文件的模板,可以发给别人或者放到云服务器上闲暇时用手机浏览复习。

综上,用 Orgmode 记笔记是可以非常舒服的,多多了解并利用前人的经验并自己根据实际情况修改创新,便可以达到事半功倍的效果。

6 个赞