Install Emacs

On OSX environment, you can install via homebrew:

$ brew install emacs --with-cocoa

Install prelude

$ curl -L | zsh

Add alias

$ cat ~/.zshrc

alias es='emacs --daemon'
alias et='emacsclient -t'
alias ec='emacsclient -c'
alias vim='emacsclient -t'
alias vi='emacsclient -t'


It is difficult for me to use minted

Add this code snippet to ~/.emacs.d/personal/settings.el

You could write raw tex code in an org file.

\State {$c \gets 1$}
\While {$b \geq 0$}
  \State {$c \gets ac$}
  \State {$b \gets b-1$}

Change default font

(add-to-list 'default-frame-alist '(font . "Ricty Diminished Discord-15"))



All bibliographies in ~/Dropbox/papers/library.bib generated by mendeley.

  • Install org-ref from M-x package-list-packages
  • Add the code snippet below to your init.el
  (setq reftex-default-bibliography '("~/Dropbox/papers/library.bib"))
  (setq org-ref-default-bibliography '("~/Dropbox/papers/library.bib"))
  (setq bibtex-completion-bibliography "~/Dropbox/papers/library.bib")
  (require 'org-ref)
  • Add code below tail of your org file
  • Execute M-x org-ref-helm-cite-link and then select a bibliography where you want to add cite in an org file.

Realtime preview for Latex

  1. Install LaTeXPreviewPane
  2. When you edit latex file, you execute the command: M-x latex-preview-pane-mode [RET]


Install hunspell via homebrew.

brew install hunspell

Then, download dictionary file from here. Put *.aff and en_US.dic to /Users/YOUR-USERNAME/Library/Spelling/. Finally, Insert setting lines that is the first code block in this post to *.el file.

NOTE: you can check the hunspell’s default search paths to find dictionary files by executing hunspell -D. ~/Library/Spelling is one path of them.