From: tsd@tsdye.com (Thomas S. Dye)
To: Org-mode <emacs-orgmode@gnu.org>
Subject: [PATCH] New LaTeX exporter, switch for hypersetup
Date: Wed, 09 Jan 2013 09:33:09 -1000 [thread overview]
Message-ID: <m1sj6aw3re.fsf@tsdye.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
Aloha all,
The attached patch introduces a new option, texht, that inhibits
insertion of \hypersetup when it is set to nil.
I don't think I fully understand how :options-alist works. With the
attached patch I was expecting to be able to use #+LATEX_HYPER: nil, but
this didn't work for me.
The motivation for the patch is that I'm attempting to export to a
journal specification that stipulates which packages must be used and
prohibits any additions---hyperref isn't on the list.
All the best,
Tom
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch to org-e-latex.el --]
[-- Type: text/x-patch, Size: 2423 bytes --]
From 448c9fe103d6b0f9a4ce42cbafc6d67093b7494e Mon Sep 17 00:00:00 2001
From: Thomas Dye <tsd@tsdye.com>
Date: Wed, 9 Jan 2013 09:19:14 -1000
Subject: [PATCH] New LaTeX exporter: Add an option to toggle \hypersetup
* contrib/lisp/org-e-latex.el: Added an option :texht that toggles
insertion of \hypersetup{} in the tex file.
It is possible to configure LaTeX export to omit the hyperref package
where the \hypersetup command is defined.
---
contrib/lisp/org-e-latex.el | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 79ae355..c4e7b99 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -29,8 +29,8 @@
;; functions are available: `org-e-latex-publish-to-latex' and
;; `org-e-latex-publish-to-pdf'.
;;
-;; The library introduces three new buffer keywords: "LATEX_CLASS",
-;; "LATEX_CLASS_OPTIONS" and "LATEX_HEADER". Their value can be
+;; The library introduces four new buffer keywords: "LATEX_CLASS",
+;; "LATEX_CLASS_OPTIONS", "LATEX_HEADER", and "LATEX_HYPER". Their value can be
;; either a string or a symbol.
;;
;; Table export can be controlled with a number of attributes (through
@@ -164,7 +164,9 @@
:options-alist ((:date "DATE" nil org-e-latex-date-format t)
(:latex-class "LATEX_CLASS" nil org-e-latex-default-class t)
(:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
- (:latex-header-extra "LATEX_HEADER" nil nil newline)))
+ (:latex-header-extra "LATEX_HEADER" nil nil newline)
+ (:with-hyper "LATEX_HYPER" "texht" t t)
+ ))
\f
@@ -1117,11 +1119,12 @@ holding export options."
;; Title
(format "\\title{%s}\n" title)
;; Hyperref options.
- (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n"
- (or (plist-get info :keywords) "")
- (or (plist-get info :description) "")
- (if (not (plist-get info :with-creator)) ""
- (plist-get info :creator)))
+ (when (plist-get info :with-hyper)
+ (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n"
+ (or (plist-get info :keywords) "")
+ (or (plist-get info :description) "")
+ (if (not (plist-get info :with-creator)) ""
+ (plist-get info :creator))))
;; Document start.
"\\begin{document}\n\n"
;; Title command.
--
1.8.0.2
[-- Attachment #3: Type: text/plain, Size: 146 bytes --]
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
next reply other threads:[~2013-01-09 19:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 19:33 Thomas S. Dye [this message]
2013-01-10 21:22 ` [PATCH] New LaTeX exporter, switch for hypersetup Nicolas Goaziou
2013-01-11 0:20 ` Thomas S. Dye
2013-01-12 11:07 ` Nicolas Goaziou
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=m1sj6aw3re.fsf@tsdye.com \
--to=tsd@tsdye.com \
--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).