From 2b3fbcf9a8ea64ef6207237ef48b9c62cded01ff Mon Sep 17 00:00:00 2001 From: Thomas Dye 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