From: tsd@tsdye.com (Thomas S. Dye)
To: Org-mode <emacs-orgmode@gnu.org>
Subject: [PATCH] New variable for the new latex exporter
Date: Tue, 11 Sep 2012 16:19:22 -1000 [thread overview]
Message-ID: <m1har4t239.fsf@poto.myhome.westell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 593 bytes --]
Aloha Nicolas,
The attached patch adds a new defcustom for the toc and listof commands
that are inserted after \maketitle with the new latex exporter.
In the old exporter, the undesirable \vspace*{1cm} could be replaced
with a user-defined function. The new exporter hard codes this. The
patch puts this in a variable that uses the current string as a default.
With the patch, the user can now do something like this:
(setq org-e-latex-toc-and-lists-string "\\tableofcontents\n\\listoffigures\n\n")
which I find an improvement.
Thanks for your work on the exporters.
All the best,
Tom
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch for org-e-latex.el --]
[-- Type: text/x-patch, Size: 1154 bytes --]
From 26eb71d6bd2d05d1a2603b32e49d18da2e58dc99 Mon Sep 17 00:00:00 2001
From: Thomas Dye <tsd@tsdye.com>
Date: Tue, 11 Sep 2012 15:59:35 -1000
Subject: [PATCH] * contrib/lisp/org-e-latex.el: Added a defcustom for the
string inserted after \maketitle
---
contrib/lisp/org-e-latex.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 17bdad9..0a60b56 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -329,6 +329,11 @@ argument."
:group 'org-export-e-latex
:type 'string)
+(defcustom org-e-latex-toc-and-lists-string
+ "\\tableofcontents\n\\vspace*{1cm}\n\n"
+ "LaTeX commands to set the table of contents, list of figures, etc."
+ :group 'org-export-e-latex
+ :type 'string)
;;;; Headline
@@ -1080,7 +1085,7 @@ holding export options."
(when depth
(concat (when (wholenump depth)
(format "\\setcounter{tocdepth}{%d}\n" depth))
- "\\tableofcontents\n\\vspace*{1cm}\n\n")))
+ (format "%s" org-e-latex-toc-and-lists-string))))
;; Document's body.
contents
;; Creator.
--
1.7.11.5
[-- 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:[~2012-09-12 2:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 2:19 Thomas S. Dye [this message]
2012-09-12 14:32 ` [PATCH] New variable for the new latex exporter 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=m1har4t239.fsf@poto.myhome.westell.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).