From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug?][ox-beamer] hyperref crashes when options are specified Date: Wed, 28 May 2014 18:47:32 +0200 Message-ID: <87iooponob.fsf@gmx.us> References: <8738fuov59.fsf@gmx.us> <87oayhoqku.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpgzB-0005dJ-2a for emacs-orgmode@gnu.org; Wed, 28 May 2014 12:46:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wpgz3-0008Pu-Lo for emacs-orgmode@gnu.org; Wed, 28 May 2014 12:45:53 -0400 Received: from plane.gmane.org ([80.91.229.3]:53380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpgz3-0008Pm-Em for emacs-orgmode@gnu.org; Wed, 28 May 2014 12:45:45 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wpgz2-0003Gm-DD for emacs-orgmode@gnu.org; Wed, 28 May 2014 18:45:44 +0200 Received: from 192.167.90.140 ([192.167.90.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 May 2014 18:45:44 +0200 Received: from rasmus by 192.167.90.140 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 May 2014 18:45:44 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, Nicolas Goaziou writes: > Hello, > > Rasmus writes: > >> If you give hyperref options when exporting to Beamer it will >> typically crash. >> >> I load hyperref as follows to make it compatible with "exotic" >> headlines in XeLaTeX: >> >> (setq org-latex-default-packages-alist >> '(("" "iftex" nil) >> ("" "fixltx2e" nil) >> ("AUTO" "inputenc" t) >> ("T1" "fontenc" t) >> ("AUTO" "babel" nil) >> ("" "scrpage2" nil) >> ("" "graphicx" t) >> ("" "amsmath" t) >> ("" "amssymb" t) >> ("" "booktabs" t) >> ("" "marvosym" t) >> ("" "microtype" nil) >> ("" "slantsc" nil) >> ("unicode, psdextra,hidelinks" "hyperref" nil))) >> >> Because Beamer loads hyperref automatically this will crash. The >> correct way to load it is through the document class options, e.g. >> >> \documentclass[hyperref={unicode, psdextra,hidelinks}]{beamer} >> >> Should ox-beamer automatically move the options in this case? > > No, it shoudn't. This crash is not really Org's fault. Customizing an Org package alist, Org inserts code that is invalid in a Beamer context. > You could define an appropriate class for `beamer' back-end instead. Org-latex-classes gives me access to [NO-DEFAULT-PACKAGES]. Not removing a single element from it as far as I understand. Or am i mistaken? IMO, a wrapper around the header like org-latex-guess-babel-language would be better, but I don't have strong opinions on this. —Rasmus -- Dung makes an excellent fertilizer