From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manfred Lotz Subject: Re: Different set of packages for LaTeX export Date: Fri, 2 Oct 2015 05:30:46 +0200 Message-ID: <20151002053046.7859f6e9@arcor.com> References: <20151001204426.6393bd1d@arcor.com> <87fv1uv1h5.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhr42-0006wr-WC for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 23:31:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zhr3y-00030K-Vc for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 23:31:18 -0400 Received: from plane.gmane.org ([80.91.229.3]:58012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhr3y-00030A-On for emacs-orgmode@gnu.org; Thu, 01 Oct 2015 23:31:14 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zhr3x-0000JH-7D for emacs-orgmode@gnu.org; Fri, 02 Oct 2015 05:31:13 +0200 Received: from p4fff2459.dip0.t-ipconnect.de ([79.255.36.89]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Oct 2015 05:31:13 +0200 Received: from manfred.lotz by p4fff2459.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Oct 2015 05:31:13 +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 On Thu, 01 Oct 2015 21:21:42 +0200 Rasmus wrote: > 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). > Hm, I think it would be great if a package list could be mapped to a certain LaTeX class. > 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). > I have this ("colorlinks=true, urlcolor=FireBrick, plainpages=false, pdfpagelabels, bookmarksnumbered" "hyperref" nil) which IMHO doesn't look to exotic. > 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) > > Yep, this works fine. Thanks a lot for your help. -- Best, Manfred