Doing presentations on my Mac

I am in the middle of creating some presentations about Git. A version control system, I have successfully integrated into my department at Phase One. So I could of cause use Microsoft PowerPoint, or Apple Keynote.
Though is there a tool, which I am more used to, and even though it is harder to learn, superior in many ways. The tool is LaTeX, Beamer, Emacs and AuxTex.

So why do I consider this a superior solution.

  • The files are text files, and easy to version control, including being able to merge changes.
  • Depending on target, It will guide the presentation design against a PDF output, meaning you will not create distracting animations etc.
  • Being designed to PDF output also means it easy to prints handout etc.
  • The tools is true cross platform, working on Windows, Mac OS X, Linux and *BSD. So you data are not locked to a vendor.

The bad thing is the learning curve and knowhow needed for using the tool. PowerPoint and Keynote are much easier to get started with.

So knowing the tool from my many years working with Linux, the new part was to install the tools on my Mac. It was though pretty easy to install, as I am already using MacPorts.

  • LaTeX. The easiest way to install LaTeX using MacPorts, is the texlive package. This can be installed in a basis, medium or full variants. I just select the medium variants, as it contains the package I need.
sudo port install texlive +medium
  • Beamer is a tetex package, containing what is needed for creating presentation in LaTeX. Again installed by a MacPort command.
sudo port install tex-beamerposter
  • Emacs is an old family of editors, started in 1975 by Richard Stallman. The version I choose to use on my Mac is called emacs-app in Macport, and contains a Cocoa edition of GNU emacs. Cocoa means the editor uses the Macs native graphical toolkit.
sudo port install emacs-app
  • AucTex is a package originally from Aalborg University, which is a major emacs mode for editing TeX files. It is installed by the following command.
sudo port install auctex +emacs_app

When everything is installed you will need to bind it together in the .emacs file. This is the configuration file for emacs, and there are many examples for how to create one around on the internet. Personally I see it as a continued work in progress; there never can be finished. Later I will maybe give some tips as comments to this post.

2 thoughts on “Doing presentations on my Mac”

  1. I have my .emacs in git, but here is the LaTeX part.

    ;;{{{ (La)TeX 
     
    ;; Be sure that auctex is loaded
    (when (locate-library "auctex")
      (load "auctex"))
     
    ;; Add tex packages path
    (setenv "TEXINPUTS"
        (concat ".:" (getenv "HOME")
            "/data/LaTeX/packages/:"
            (getenv "TEXINPUTS")))
     
    ;; TeX Preview
    (when (and (equal window-system 'x)
            (locate-library "preview-latex"))
      (load "preview-latex"))
     
    ;; Auto fill in tex docs
    (add-hook 'LaTeX-mode-hook 
            (lambda ()
                (setq default-fill-column 90)                       ; Auto line with 90
                (setq-default auto-fill-function 'do-auto-fill)     ; And do it allways need M-x auto-fill-mode off to remove
            )
    )
     
    ;; Make AUCTeX aware of the multi-file document structure
    (add-hook 'LaTeX-mode-hook
              (lambda ()
                (setq-default tex-master nil)
              )
    )
     
    ;; Turn on reftex
    (add-hook 'LaTeX-mode-hook
              (lambda ()
                (turn-on-reftex)
                (setq reftex-load-hook (quote (imenu-add-menubar-index)))
                (setq reftex-mode-hook (quote (imenu-add-menubar-index)))
              )
    )
     
    ;; Other latex options
    (add-hook 'LaTeX-mode-hook
              (lambda ()
                (LaTeX-math-mode)   ; Turn on math mode by default
                (TeX-PDF-mode)      ; PDF mode - AUCTeX will call pdflatex to compile
                (setq TeX-view-program-list 
                      '(("MacDefault" "open %o"))
                      )
                (setq TeX-view-program-selection
                      '((output-pdf "MacDefault"))
                      )
              )
    )
     
    ;;}}}
  2. I had some problems with fly-spell on my mac. The problem was located with mouse-button 2, which is used by fly-spell to present suggestions. On a mac there is no mouse-2, so I remapped the function to mouse-3. Mouse 3 is usable by doing a two-finger click on my track pad.

    Just a quick note regarding debugging issues like this. Using C-h k is a nice help for verifying the interpretation of a mouse buttons or key-press.

    The solution for me, was to add the following code to my .emacs

    (eval-after-load "flyspell"
        '(progn
            (define-key flyspell-mouse-map [down-mouse-3] #'flyspell-correct-word)
            (define-key flyspell-mouse-map [mouse-3] #'undefined)))

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.