We all have to complete tutorials to learn new languages. One constant pain is that the tutorials are usually trapped in pdf’s when we need to type code. Emacs makes this problem go away through its doc-view mode which allows you to render pdf’s in Emacs. The problem is that it only works out of the box in Linux.
The Mac OS X solution
For mac, you need to install emacs via homebrew. Open a terminal by going to Finder, see the picture below.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Copy the installation command from homebrew into the terminal. Type brew doctor. The complication is that you may have to modify your path. If so, see this answer from stack overflow.
brew install ghostscript brew install emacs --with-cocoa brew linkapps emacs
For windows, the situation is considerablely more complicated. You must install the incredibly useful cygwin which provides the libraries for ghostscript and xpdf. Watch this video by Paul Royer on installing cygwin and downloading the libraries. You then need to modify the windows path environmental variable using these instructions to include thos libraries which are found in your new home directory. I will add to this later as these instructions are vague.