emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Joe Hirn <joseph.hirn@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-export-latex-hyperref-options-format
Date: Thu, 20 Feb 2014 11:22:58 +0100	[thread overview]
Message-ID: <87zjlm13st.fsf@gmail.com> (raw)
In-Reply-To: <CALY_e1rogor3qbcB_giGJTWHWw0T6QOZg2+euMTL_-TVfaYAXQ@mail.gmail.com> (Joe Hirn's message of "Wed, 19 Feb 2014 16:43:20 -0600")

Hello,

Joe Hirn <joseph.hirn@gmail.com> 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	other threads:[~2014-02-20 10:22 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 20:41 org-export-latex-hyperref-options-format Joe Hirn
2014-02-17 22:13 ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-17 22:59   ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-17 23:23     ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-17 23:42       ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-19 13:05         ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-19 16:21           ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-19 22:43           ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-20 10:22             ` Nicolas Goaziou [this message]
2014-02-20 12:34               ` org-export-latex-hyperref-options-format Joseph Hirn
2014-02-20 17:58                 ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-20 20:51                   ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-20 21:52                     ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-20 22:53                       ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-21 17:28                         ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-21 18:35                           ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-22  9:39                             ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-22 16:42                               ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-22 17:02                                 ` org-export-latex-hyperref-options-format Bastien
2014-02-24 21:51                                   ` org-export-latex-hyperref-options-format Joe Hirn
2014-03-21  8:00                                     ` org-export-latex-hyperref-options-format Bastien
2014-03-21 13:03                                       ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-03-21 13:06                                         ` org-export-latex-hyperref-options-format Bastien
2014-03-21 16:51                                           ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-03-21 17:11                                             ` org-export-latex-hyperref-options-format Joe Hirn
2014-03-21 17:23                                             ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-03-21 18:38                                               ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-03-21 21:19                                                 ` org-export-latex-hyperref-options-format Nick Dokos
2014-03-21 21:47                                                   ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-03-21 22:19                                                     ` org-export-latex-hyperref-options-format Charles Millar
2014-03-21 22:39                                                     ` org-export-latex-hyperref-options-format Nick Dokos
2014-03-22 18:26                                                       ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-03-23 21:39                                                         ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-02-17 23:25     ` org-export-latex-hyperref-options-format Rasmus

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=87zjlm13st.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=joseph.hirn@gmail.com \
    /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).