From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Different set of packages for LaTeX export Date: Thu, 01 Oct 2015 21:21:42 +0200 Message-ID: <87fv1uv1h5.fsf@gmx.us> References: <20151001204426.6393bd1d@arcor.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhjQT-0004xW-IQ for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 15:21:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhjQP-0000IK-EZ for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 15:21:57 -0400 Received: from plane.gmane.org ([80.91.229.3]:35530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhjQP-0000IB-8F for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 15:21:53 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZhjQN-0005Mq-7l for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 21:21:51 +0200 Received: from 46.166.186.233 ([46.166.186.233]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Oct 2015 21:21:51 +0200 Received: from rasmus by 46.166.186.233 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Oct 2015 21:21:51 +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 Manfred, Manfred Lotz writes: > When creating slides, i.e using beamer I get an option clash > during compiling the tex file because beamer did already load hyperref. > > How can I solve it? > > Could I have a different package list if the class is beamer? No you can only discriminate based on the compiler version (and actually only in ox-latex, not ox-beamer). You can use a filter to remove hyperref. AFAIK, there's only issues if you use funny options for hyperref, e.g. I use ("unicode, psdextra,hidelinks" "hyperref" nil). Last I checked there was an open bug report for this, so it might have been fixed in upstream beamer. I use this filter to remove hyperref in beamer exports: (defun rasmus/org-beamer-filter-remove-hyperref (text backend info) "Remove hyperref from beamer tex files. My default values are incompatible with beamer." ;; TODO: make better solution; check if still necessary (when (org-export-derived-backend-p backend 'beamer) (replace-regexp-in-string "\\\\usepackage\\[\\(.*?\\)\\]{hyperref}\n" "" text))) (add-to-list 'org-export-filter-final-output-functions 'rasmus/org-beamer-filter-remove-hyperref) Hope it helps, Rasmus -- Slowly unravels in a ball of yarn and the devil collects it