emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] New variable for the new latex exporter
@ 2012-09-12  2:19 Thomas S. Dye
  2012-09-12 14:32 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas S. Dye @ 2012-09-12  2:19 UTC (permalink / raw)
  To: Org-mode

[-- 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] New variable for the new latex exporter
  2012-09-12  2:19 [PATCH] New variable for the new latex exporter Thomas S. Dye
@ 2012-09-12 14:32 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2012-09-12 14:32 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

Hello,

tsd@tsdye.com (Thomas S. Dye) writes:

> 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.

Good idea. I applied a slightly different version for this patch.

Thanks.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-12 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12  2:19 [PATCH] New variable for the new latex exporter Thomas S. Dye
2012-09-12 14:32 ` Nicolas Goaziou

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).