emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-export-latex-hyperref-options-format


From: Nicolas Goaziou
Subject: Re: [O] org-export-latex-hyperref-options-format
Date: Thu, 20 Feb 2014 11:22:58 +0100

Hello,

Joe Hirn <address@hidden> writes:

> Hi just sat down to code this up. I assume the keywords are so we can use
> data within the plist argument (info) passed to `org-latex-template'. But
> I'm not exactly sure what you mean by %k for keywords.
>
> Are you suggesting we could do something like:
>
> "\\hypersetup{\n  pdfkeywords={%kkeywords},\n
>  pdfsubject={%kdescription},\n  pdfcreator={%kcreator}}\n"
>
> If that's the idea, is there a more powerful construct than regex matching
> for achieving this? Otherwise, can you give me an example of what you had
> in mind for the keyword placeholders.

I'm suggesting to use `format-spec', e.g., something like:

  (and org-latex-hyperref-template
       (format-spec org-latex-hyperref-template
                    (format-spec-make
                     ?k (or (plist-get info :keywords) "")
                     ?d (or (plist-get info :description) "")
                     ?c (if (not (plist-get info :with-creator)) ""
                          (plist-get info :creator)))))

Thus, when `org-latex-hyperref-template' is nil, no "\hyperref" command
is inserted, otherwise, it is a format string where %k is replaced with
KEYWORDS, %d with DESCRIPTION and %c with CREATOR.

Default value for the variable would be:

  "\\hypersetup{\n  pdfkeywords={%k},\n  pdfsubject={%d},\n  pdfcreator={%c}}\n"

A (require 'format-spec) will be needed in the beginning of
"ox-latex.el".


Regards,

-- 
Nicolas Goaziou



reply via email to

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