From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Hirn Subject: Re: org-export-latex-hyperref-options-format Date: Thu, 20 Feb 2014 06:34:32 -0600 Message-ID: <8672745997102408713@unknownmsgid> References: <87a9dpo0as.fsf@gmail.com> <8738jhnx1m.fsf@gmail.com> <878ut72qyo.fsf@gmail.com> <87zjlm13st.fsf@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGSpn-0000Z9-PK for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 07:34:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGSpm-0004eT-LY for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 07:34:35 -0500 Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:37869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGSpm-0004eM-Hi for emacs-orgmode@gnu.org; Thu, 20 Feb 2014 07:34:34 -0500 Received: by mail-ob0-f176.google.com with SMTP id gq1so1966454obb.35 for ; Thu, 20 Feb 2014 04:34:34 -0800 (PST) In-Reply-To: <87zjlm13st.fsf@gmail.com> 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: Nicolas Goaziou Cc: "emacs-orgmode@gnu.org" Ok. I was hesitant to require anything additional but I should be able to knock this out. Thx again. Sent from my iPhone > On Feb 20, 2014, at 4:22 AM, Nicolas Goaziou wrote: > > Hello, > > Joe Hirn 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