emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Manfred Lotz <manfred.lotz@arcor.de>
To: emacs-orgmode@gnu.org
Subject: Re: Different set of packages for LaTeX export
Date: Fri, 2 Oct 2015 05:30:46 +0200	[thread overview]
Message-ID: <20151002053046.7859f6e9@arcor.com> (raw)
In-Reply-To: 87fv1uv1h5.fsf@gmx.us

On Thu, 01 Oct 2015 21:21:42 +0200
Rasmus <rasmus@gmx.us> wrote:

> Hi Manfred,
> 
> Manfred Lotz <manfred.lotz@arcor.de> 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

  reply	other threads:[~2015-10-02  3:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 18:44 Different set of packages for LaTeX export Manfred Lotz
2015-10-01 19:21 ` Rasmus
2015-10-02  3:30   ` Manfred Lotz [this message]
2015-10-02  4:50     ` Fabrice Popineau
2015-10-02  8:41       ` Manfred Lotz
2015-10-06 10:17 ` Julien Cubizolles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151002053046.7859f6e9@arcor.com \
    --to=manfred.lotz@arcor.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).