From: tsd@tsdye.com (Thomas S. Dye)
To: Org-mode <emacs-orgmode@gnu.org>
Subject: [PATCH] Longtable continuation strings customizable
Date: Sat, 26 Oct 2013 14:42:05 -1000 [thread overview]
Message-ID: <m1txg3czoi.fsf@tsdye.com> (raw)
[-- 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
next reply other threads:[~2013-10-27 0:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-27 0:42 Thomas S. Dye [this message]
2013-10-27 8:05 ` [PATCH] Longtable continuation strings customizable 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
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=m1txg3czoi.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).