From: Mikhail Titov <mlt@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: How to reuse page keywords for LaTeX with pdfkeywords and hyperref package?
Date: Sat, 27 Aug 2011 12:15:24 -0500 [thread overview]
Message-ID: <4E59262C.8000108@gmx.us> (raw)
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 <mlt@gmx.us>
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
next reply other threads:[~2011-08-27 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-27 17:15 Mikhail Titov [this message]
2011-10-22 9:08 ` How to reuse page keywords for LaTeX with pdfkeywords and hyperref package? Bastien
2011-11-12 0:52 ` Mikhail Titov
2011-10-22 9:09 ` Bastien
-- strict thread matches above, loose matches on Subject: below --
2011-03-21 23:54 Mikhail Titov
2011-03-22 9:53 ` Bastien
2011-03-22 16:53 ` Mikhail Titov
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=4E59262C.8000108@gmx.us \
--to=mlt@gmx.us \
--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).