emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Different set of packages for LaTeX export


From: Rasmus
Subject: Re: [O] Different set of packages for LaTeX export
Date: Thu, 01 Oct 2015 21:21:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hi Manfred,

Manfred Lotz <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]