[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Longtable continuation strings customizable
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATCH] Longtable continuation strings customizable |
Date: |
Thu, 31 Oct 2013 11:19:17 +0100 |
Hello,
address@hidden (Thomas S. Dye) writes:
> I have this, based on the example above:
>
>
> #+name: tsd-continuation-strings
> #+begin_src emacs-lisp
>
> (defun my-personal-table-continuation-strings (row backend info)
> (when (org-export-derived-backend-p 'latex)
> (replace-regexp-in-string
> "multicolumn{[0-9]+}{l}{\\(.*\\)}" "\\ldots\\ continued from previous
> page"
> row nil nil 1)
> (replace-regexp-in-string
> "multicolumn{[0-9]+}{r}{\\(.*\\)}" "continued on next page \\ldots"
> row nil nil 1)))
> (add-to-list 'org-export-filter-table-row-functions
> 'my-personal-table-continuation-strings)
> #+end_src
>
> I also tried 'org-export-filter-table-functions without success. I
> always get the default continuation strings. I've looked around for an
> error message, but there doesn't appear to be one, at least that I can
> find. The asynchronous export runs through to completion.
The first `replace-regexp-in-string' has to be applied to the return
value of the second one. IOW they have to be nested.
Also, you need to double again backslashes in replacement string, or use
a non-nil LITERAL argument in `replace-regexp-in-string'.
Eventually, I made a typo in my suggestion: the second line should be:
(org-export-derived-backend-p backend 'latex)
In a nutshell:
(defun my-personal-table-continuation-strings (row backend info)
(when (org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string
"multicolumn{[0-9]+}{l}{\\(.*\\)}" "\\ldots\\ continued from previous
page"
(replace-regexp-in-string
"multicolumn{[0-9]+}{r}{\\(.*\\)}" "continued on next page \\ldots"
row nil t 1) nil t 1)))
Regards,
--
Nicolas Goaziou
- [O] [PATCH] Longtable continuation strings customizable, Thomas S. Dye, 2013/10/26
- Re: [O] [PATCH] Longtable continuation strings customizable, Nicolas Goaziou, 2013/10/27
- Re: [O] [PATCH] Longtable continuation strings customizable, Carsten Dominik, 2013/10/27
- Re: [O] [PATCH] Longtable continuation strings customizable, Thomas S. Dye, 2013/10/27
- Re: [O] [PATCH] Longtable continuation strings customizable, Nicolas Goaziou, 2013/10/28
- Re: [O] [PATCH] Longtable continuation strings customizable, Thomas S. Dye, 2013/10/28
- Re: [O] [PATCH] Longtable continuation strings customizable, Nicolas Goaziou, 2013/10/28
- Re: [O] [PATCH] Longtable continuation strings customizable, Thomas S. Dye, 2013/10/28
- Re: [O] [PATCH] Longtable continuation strings customizable, Nicolas Goaziou, 2013/10/29
- Re: [O] [PATCH] Longtable continuation strings customizable, Thomas S. Dye, 2013/10/30
- Re: [O] [PATCH] Longtable continuation strings customizable,
Nicolas Goaziou <=
- Re: [O] [PATCH] Longtable continuation strings customizable, Thomas S. Dye, 2013/10/31