ソースを参照

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 12 年 前
コミット
bb12272263
1 ファイル変更18 行追加3 行削除
  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")
 	  (string :tag "Format string")
 	  (const :tag "No formatting")))
 	  (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
 ;;;; Text markup
 
 
@@ -2625,17 +2638,18 @@ a communication channel."
 	((and longtablep (org-export-table-row-ends-header-p table-row info))
 	((and longtablep (org-export-table-row-ends-header-p table-row info))
 	 (format "%s
 	 (format "%s
 \\endfirsthead
 \\endfirsthead
-\\multicolumn{%d}{l}{Continued from previous page} \\\\
+\\multicolumn{%d}{l}{%s} \\\\
 %s
 %s
 %s \\\\\n
 %s \\\\\n
 %s
 %s
 \\endhead
 \\endhead
-%s\\multicolumn{%d}{r}{Continued on next page} \\\\
+%s\\multicolumn{%d}{r}{%s} \\\\
 \\endfoot
 \\endfoot
 \\endlastfoot"
 \\endlastfoot"
 		 (if booktabsp "\\midrule" "\\hline")
 		 (if booktabsp "\\midrule" "\\hline")
 		 (cdr (org-export-table-dimensions
 		 (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-from
 		 (cond ((and booktabsp (memq 'top borders)) "\\toprule\n")
 		 (cond ((and booktabsp (memq 'top borders)) "\\toprule\n")
 		       ((and (memq 'top borders)
 		       ((and (memq 'top borders)
 			     (memq 'above borders)) "\\hline\n")
 			     (memq 'above borders)) "\\hline\n")
@@ -2645,7 +2659,8 @@ a communication channel."
 		 (if booktabsp "\\midrule" "\\hline")
 		 (if booktabsp "\\midrule" "\\hline")
 		 ;; Number of columns.
 		 ;; Number of columns.
 		 (cdr (org-export-table-dimensions
 		 (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
 	;; When BOOKTABS are activated enforce bottom rule even when
 	;; no hline was specifically marked.
 	;; no hline was specifically marked.
 	((and booktabsp (memq 'bottom borders)) "\\bottomrule")
 	((and booktabsp (memq 'bottom borders)) "\\bottomrule")