From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikhail Titov Subject: Re: How to reuse page keywords for LaTeX with pdfkeywords and hyperref package? Date: Sat, 27 Aug 2011 12:15:24 -0500 Message-ID: <4E59262C.8000108@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxMTj-0007P2-OQ for emacs-orgmode@gnu.org; Sat, 27 Aug 2011 13:15:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QxMTi-0004pm-J9 for emacs-orgmode@gnu.org; Sat, 27 Aug 2011 13:15:31 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:52707 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QxMTi-0004pi-F4 for emacs-orgmode@gnu.org; Sat, 27 Aug 2011 13:15:30 -0400 References: 000f01cbe8b1$b6744640$235cd2c0$@gmx.us 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: emacs-orgmode@gnu.org In case someone else also wants page keywords to appear in latex export. Here is the link to original thread http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01429.html . There is a patch at the bottom that does that. It assumes that hyperred package is used and doesn't check that! I'm not sure if I'm doing it right as I don't know lisp and emacs much. Mikhail >From ee027f75db3df6b16ccb2e8f96916fe7274655f3 Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Sat, 27 Aug 2011 11:59:06 -0500 Subject: [PATCH] Set keywords and subject fields in pdf --- lisp/org-latex.el | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 17626b5..4c35528 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1391,6 +1391,10 @@ OPT-PLIST is the options plist for current buffer." (let ((toc (plist-get opt-plist :table-of-contents)) (author (org-export-apply-macros-in-string (plist-get opt-plist :author))) + (description (org-export-apply-macros-in-string + (plist-get opt-plist :description))) + (keywords (org-export-apply-macros-in-string + (plist-get opt-plist :keywords))) (email (replace-regexp-in-string "_" "\\\\_" (org-export-apply-macros-in-string @@ -1428,6 +1432,15 @@ OPT-PLIST is the options plist for current buffer." (format-time-string (or (plist-get opt-plist :date) org-export-latex-date-format))) + ;; add pdf things + "\\hypersetup{\n" + ;; " pdfinfo={\n" + (format " pdfkeywords={%s},\n" + (org-export-latex-fontify-headline keywords)) + (format " pdfsubject={%s}\n" + (org-export-latex-fontify-headline description)) + ;;" }\n" + "}\n" ;; beginning of the document "\n\\begin{document}\n\n" ;; insert the title command -- 1.7.4.1