From: Francesco Pizzolante <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org>
To: mailing-list-org-mode <emacs-orgmode-mXXj517/zsQ@public.gmane.org>
Subject: [PATCH] Add support for `ltablex'
Date: Tue, 03 Sep 2013 16:52:40 +0200 [thread overview]
Message-ID: <87r4d654dn.fsf@somewhere.org> (raw)
Hello,
Please find here a patch to support the tabularx table environment when used
in conjunction with the ltablex LaTeX package.
ltablex combines the advantages of longtable and tabularx packages: it enables
splitting of table across pages, and have fixed-width tables with
auto-adjusted columns.
Like longtable, it does not require a float table environment around.
I added a ltablex environment name which will be exported as a tabularx LaTeX
environment without a table float environment (this is the exact same behavior
as for longtable).
Usage is the same as tabularx (except that you use ltablex as :environment
name in the ATTR_LATEX specification):
- you need to specify a :width attribute, and
- an :align attribute.
In this case, like for longtable, the :float attribute is also ignored.
Best regards,
Francesco
* ox-latex.el (org-latex--org-table): Add support for `ltablex'.
From: Francesco Pizzolante <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org>
Date: Tue, 3 Sep 2013 16:44:24 +0200
Subject: [PATCH] Add support for `ltablex'
---
lisp/ox-latex.el | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index e66c717..6af3acf 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2350,7 +2350,7 @@ This function assumes TABLE has `org' as its `:type' property and
org-latex-default-table-environment))
;; If table is a float, determine environment: table, table*
;; or sidewaystable.
- (float-env (unless (member table-env '("longtable" "longtabu"))
+ (float-env (unless (member table-env '("longtable" "longtabu" "ltablex"))
(let ((float (plist-get attr :float)))
(cond
((and (not float) (plist-member attr :float)) nil)
@@ -2401,6 +2401,21 @@ This function assumes TABLE has `org' as its `:type' property and
(concat caption "\\\\\n"))
"\\end{longtabu}\n"
(and fontsize "}")))
+ ;; Ltablex (Tabularx without float).
+ ((equal "ltablex" table-env)
+ (concat (and fontsize (concat "{" fontsize))
+ (format "\\begin{tabularx}{%s}{%s}\n"
+ width
+ alignment)
+ (and org-latex-table-caption-above
+ (org-string-nw-p caption)
+ (concat caption "\\\\\n"))
+ contents
+ (and (not org-latex-table-caption-above)
+ (org-string-nw-p caption)
+ (concat caption "\\\\\n"))
+ "\\end{tabularx}\n"
+ (and fontsize "}")))
;; Others.
(t (concat (cond
(float-env
--
1.7.9
next reply other threads:[~2013-09-03 14:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 14:52 Francesco Pizzolante [this message]
2013-09-03 15:48 ` [PATCH] Add support for `ltablex' Nicolas Goaziou
[not found] ` <8761uh3nz1.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-04 11:09 ` Francesco Pizzolante
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4d654dn.fsf@somewhere.org \
--to=fpz-djc/ipccudyqhejpep6iedvlejwurmry@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.