all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Longtable continuation strings customizable
@ 2013-10-27  0:42 Thomas S. Dye
  2013-10-27  8:05 ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas S. Dye @ 2013-10-27  0:42 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

Aloha all,

The attached patch should be applied on top of the earlier patch.  It
makes the continuation strings customizable.

All the best,
Tom


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch to ox-latex.el --]
[-- Type: text/x-patch, Size: 2228 bytes --]

From 2b3fbcf9a8ea64ef6207237ef48b9c62cded01ff Mon Sep 17 00:00:00 2001
From: Thomas Dye <tsd@tsdye.com>
Date: Sat, 26 Oct 2013 14:37:30 -1000
Subject: [PATCH] Longtable continuation strings customizable

---
 lisp/ox-latex.el | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 6426d55..6bca7a3 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -525,6 +525,19 @@ When nil, no transformation is made."
 	  (string :tag "Format string")
 	  (const :tag "No formatting")))
 
+(defcustom org-latex-longtable-continued-on "Continued on next page"
+  "String to indicate table continued on next page."
+  :group 'org-export-latex
+  :version "24.4"
+  :package-version '(Org . "8.0")
+  :type 'string)
+
+(defcustom org-latex-longtable-continued-from "Continued from previous page"
+  "String to indicate table continued from previous page."
+  :group 'org-export-latex
+  :version "24.4"
+  :package-version '(Org . "8.0")
+  :type 'string)
 
 ;;;; Text markup
 
@@ -2625,17 +2638,18 @@ a communication channel."
 	((and longtablep (org-export-table-row-ends-header-p table-row info))
 	 (format "%s
 \\endfirsthead
-\\multicolumn{%d}{l}{Continued from previous page} \\\\
+\\multicolumn{%d}{l}{%s} \\\\
 %s
 %s \\\\\n
 %s
 \\endhead
-%s\\multicolumn{%d}{r}{Continued on next page} \\\\
+%s\\multicolumn{%d}{r}{%s} \\\\
 \\endfoot
 \\endlastfoot"
 		 (if booktabsp "\\midrule" "\\hline")
 		 (cdr (org-export-table-dimensions
 		       (org-export-get-parent-table table-row) info))
+		 org-latex-longtable-continued-from
 		 (cond ((and booktabsp (memq 'top borders)) "\\toprule\n")
 		       ((and (memq 'top borders)
 			     (memq 'above borders)) "\\hline\n")
@@ -2645,7 +2659,8 @@ a communication channel."
 		 (if booktabsp "\\midrule" "\\hline")
 		 ;; Number of columns.
 		 (cdr (org-export-table-dimensions
-		       (org-export-get-parent-table table-row) info))))
+		       (org-export-get-parent-table table-row) info))
+		 org-latex-longtable-continued-on))
 	;; When BOOKTABS are activated enforce bottom rule even when
 	;; no hline was specifically marked.
 	((and booktabsp (memq 'bottom borders)) "\\bottomrule")
-- 
1.8.3.3


[-- 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] 12+ messages in thread

end of thread, other threads:[~2013-10-31 21:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-27  0:42 [PATCH] Longtable continuation strings customizable Thomas S. Dye
2013-10-27  8:05 ` Nicolas Goaziou
2013-10-27  8:07   ` Carsten Dominik
2013-10-27 16:52     ` Thomas S. Dye
2013-10-28  9:28       ` Nicolas Goaziou
2013-10-28 14:55         ` Thomas S. Dye
2013-10-28 17:27           ` Nicolas Goaziou
2013-10-28 19:15             ` Thomas S. Dye
2013-10-29 14:40               ` Nicolas Goaziou
2013-10-30 16:36             ` Thomas S. Dye
2013-10-31 10:19               ` Nicolas Goaziou
2013-10-31 21:25                 ` Thomas S. Dye

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.