From af92fa3b6c44f8e8f1425783e270e0528260a4ef Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 29 Oct 2013 15:31:22 +0100 Subject: [PATCH] ox-latex: Change to longtable strings * lisp/ox-latex.el (org-latex--translate): New function. (org-latex-longtable-continued-on) org-latex-longtable-continued-from): Remove variables. (org-latex-table-row): Use new function. * lisp/ox.el (org-export-dictionary): Add entries relative to longtables. Fix some other entries. --- lisp/ox-latex.el | 23 +++++++---------------- lisp/ox.el | 10 +++++++--- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index b0cc4bb91..2af5de68b 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -525,20 +525,6 @@ 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 (defcustom org-latex-text-markup-alist '((bold . "\\textbf{%s}") @@ -1077,6 +1063,11 @@ just outside of it." (funcall search-refs element)) "")) +(defun org-latex--translate (s info) + "Translate string S according to specified language. +INFO is a plist used as a communication channel." + (org-export-translate s :latex info)) + ;;; Template @@ -2649,7 +2640,7 @@ a communication channel." (if booktabsp "\\midrule" "\\hline") (cdr (org-export-table-dimensions (org-export-get-parent-table table-row) info)) - org-latex-longtable-continued-from + (org-latex--translate "Continued from previous page" info) (cond ((and booktabsp (memq 'top borders)) "\\toprule\n") ((and (memq 'top borders) (memq 'above borders)) "\\hline\n") @@ -2660,7 +2651,7 @@ a communication channel." ;; Number of columns. (cdr (org-export-table-dimensions (org-export-get-parent-table table-row) info)) - org-latex-longtable-continued-on)) + (org-latex--translate "Continued on next page" info))) ;; When BOOKTABS are activated enforce bottom rule even when ;; no hline was specifically marked. ((and booktabsp (memq 'bottom borders)) "\\bottomrule") diff --git a/lisp/ox.el b/lisp/ox.el index d8b10e8c6..141abc441 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -5276,6 +5276,10 @@ them." ("uk" :html "Автор" :utf-8 "Автор") ("zh-CN" :html "作者" :utf-8 "作者") ("zh-TW" :html "作者" :utf-8 "作者")) + ("Continued from previous page" + ("fr" :default "Suite de la page précédente")) + ("Continued on next page" + ("fr" :default "Suite page suivante")) ("Date" ("ca" :default "Data") ("cs" :default "Datum") @@ -5384,8 +5388,8 @@ them." ("es" :default "Listado de programa %d") ("et" :default "Loend %d") ("fr" :default "Programme %d :" :html "Programme %d :") - ("no" :default "Dataprogram") - ("nb" :default "Dataprogram") + ("no" :default "Dataprogram %d") + ("nb" :default "Dataprogram %d") ("zh-CN" :html "代码%d " :utf-8 "代码%d ")) ("See section %s" ("da" :default "jævnfør afsnit %s") @@ -5393,7 +5397,7 @@ them." ("es" :default "vea seccion %s") ("et" :html "Vaata peatükki %s" :utf-8 "Vaata peatükki %s") ("fr" :default "cf. section %s") - ("zh-CN" :html "参见第%d节" :utf-8 "参见第%s节")) + ("zh-CN" :html "参见第%s节" :utf-8 "参见第%s节")) ("Table" ("de" :default "Tabelle") ("es" :default "Tabla")