emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [odt/xhtml] Export lists as tables (list-tables)


From: Nicolas Goaziou
Subject: Re: [O] [odt/xhtml] Export lists as tables (list-tables)
Date: Fri, 02 Sep 2011 19:23:36 +0200

Hello,

Jambunathan K <address@hidden> writes:

> List-tables is a humble first step in this direction. (Proportional
> sizing of columns and support for grid lines is coming soon)
>
> From the blurb:
> ,----
> | ;; Notes on LIST-TABLES
> | ;; ====================
> | ;; When `org-lparse-list-table-enable' is non-nil, the following list
> | ;;
> | ;; #+begin_list-table
> | ;; - Row 1
> | ;;   - 1.1
> | ;;   - 1.2
> | ;;   - 1.3
> | ;; - Row 2
> | ;;   - 2.1
> | ;;   - 2.2
> | ;;   - 2.3
> | ;; #+end_list-table
> | ;;
> | ;; will be exported as though it were a table as shown below.
> | ;;
> | ;; | Row 1 | 1.1 | 1.2 | 1.3 |
> | ;; | Row 2 | 2.1 | 2.2 | 2.3 |
> | ;;
> | ;; Note that org-tables are NOT multi-line and each line is mapped to
> | ;; a unique row in the exported document.  So if an exported table
> | ;; needs to contain a single paragraph (with copious text) it needs to
> | ;; be typed up in a single line. Editing such long lines using the
> | ;; table editor will be a cumbersome task.  Furthermore inclusion of
> | ;; multi-paragraph text in a table cell is well-nigh impossible.
> | ;;
> | ;; LIST-TABLEs are meant to circumvent the above problems with
> | ;; org-tables.
> | ;;
> | ;; Note that in the example above the list items could be paragraphs
> | ;; themselves and the list can be arbitrarily deep.
> | ;;
> | ;; Inspired by following thread:
> | ;; https://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01101.html
> `----

This will certainly be useful to many Orgers. Though, I will make
a remark on the technical side.

You shouldn't use blocks for this. Blocks are on the heavy side of
syntax and are to be avoided when possible. Here, Org is perfectly able
to determine list end by itself[1] without an explicit boundary.
Furthermore, blocks, with the obvious exception of backend specific
ones, are expected to do "something" in any major exporter. Thus, to put
things differently, the structure you use should mention, by one way or
another, that this is ODT specific.

Hence, I would suggest to use a line like:

                         #+attr_odt: list-table

just above the list instead of the current choice of syntax.

Now, as this file is meant to reach Org core, I really wish we can come
up with a more general solution that will benefit to every other
official export backend. Indeed, while developing one specific exporter
is very useful, I personally think that, on the other hand, we must aim
at providing users a consistent experience with any of them[2].

That being said, nice work.


Regards,

[1] with the following code, when point is at an item:
#+begin_src emacs-lisp
(org-list-get-bottom-point (org-list-struct))
#+end_src

[2] I will probably submit code soon that should help greatly in that
mission.

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]