Browse Source

ox-latex: Longtable continuation strings customizable

* lisp/ox-latex.el (org-latex-longtable-continued-on,
  org-latex-longtable-continued-from): New variables.
(org-latex-table-row): Use new variables.
Thomas Dye 11 years ago
parent
commit
bb12272263
1 changed files with 18 additions and 3 deletions
  1. 18 3
      lisp/ox-latex.el

+ 18 - 3
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")