Now it exports OK to html and beamer

With ideas from http://article.gmane.org/gmane.emacs.orgmode/89419