1. Install MacTex based on Texlive.
Download MacTex from
here.
or you can also install from
MacPorts.
sudo port install texlive
sudo port install texlive-latex-extra
You can see the list of texlive ports
here. Around 99% of the packages are included in
texlive-latex-extra.
2. Use Emacs as an editor.
You can down emacs for mac from
here.
or install from macports:
sudo port install emacs-app +fullscreen
If you want to use emacs to edit tex file, you have to install
auctex or
aquamacs.
For installing aquamacs, you can see
here.
I am using auctex.
2.1 Download auctex from
here.
2.2 Install
./configure --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp --with-texmf-dir=/usr/local/texlive/texmf-local
instead this by: (if you used macports)
./configure --with-emacs=/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs --with-lispdir=/Applications/MacPorts/Emacs.app/Contents/Resources/site-lisp --with-texmf-dir=/usr/local/texlive/texmf-local
in OS X 10.11, if u installed the texlive via macports, the texmf-local location is changed to
/opt/local/share/texmf-local
make
sudo make install
Before do this, maybe you have to install make
go to Xcode Preferences, install Command Line Tools in Downloads.
2.3 load auctex
edit your ~/.emacs
put following in.
(setenv "PATH" (concat "/usr/texbin:/usr/local/bin:" (getenv "PATH")))
(setq exec-path (append '("/usr/texbin" "/usr/local/bin") exec-path))
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
P.S.
If you want to swap CTRL and CAPS LOCK
Go into System Preferences, Enter the Keyboard & Mouse preference pane, In the Keyboard tab, click Modifier Keys... Swap the actions for Caps Lock and Control.
If you want to use option as META
In the menu bar, click Terminal, Click Preferences... Under the Settings tab, go to the Keyboard tab, Check the box labeled Use option as meta key.
Read more ...