emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] alignment of description list in Org and export old and new


From: Jambunathan K
Subject: Re: [O] alignment of description list in Org and export old and new
Date: Mon, 04 Jun 2012 09:06:32 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (windows-nt)

> Hi all
>
> Is there a way to have automatic alignments in the Org buffer with M-q
> (fill-paragraph) and C-c C-c like:
>
>   - cmd ::                    short term + short descr
>   - cmd -o <dst> <src> ::     short term + short descr
>   - cmd --log-level=err -o <dst> <src> ::
>                               long term + short descr
>   - cmd --create-file ::      short term + long descr bla bla bla bla
>                               bla bla bla bla bla bla bla bla bla bla
>                               bla bla bla bla bla bla bla bla bla
>   - cmd --log-level=wrn -o <dst> <src> ::
>                               long term + long descr bla bla bla bla
>                               bla bla bla bla bla bla bla bla bla bla
>                               bla bla bla bla bla bla bla bla bla
>   - cmd --log-level=dbg -o <dst> <src> ::
>                               - term descr 1
>                               - term descr 2
>
> instead of the default (shown below)?
>
> With a configuration for the character column of the left alignment of
> descr that is ideally per list?
>
> Can description lists during export to ASCII, HTML, LaTeX, PDF and ODT
> have descr also:
> - on the same line as the term when the term is short?
> - aligned horizontally?

Tables allow for finer control and alignment.  Unfortunately, Org
doesn't support multi-line tables.  To alleviate this, (Old) ODT
exporter has a feature called as List-Tables [1].  This feature is not
available with any other backends [2].

I am attaching the Org file that uses list-tables and the corresponding
output.  

To achieve the two effects - "same line" and "aligned" that you desire,
all you need to do is

1. turn off the grid lines for the table
2. Adjust the colwidths so that "term" column is smaller and
   "description" column is wider
3. Have the "term" column rendered in bold.

Formatting controls - 1, 2 and 3 - are not possible with list-tables
right now and has to be done by hand.  There is no reason why these
formatting aids be not made available to list tables.

Btw, good news is List tables will be part of the new infrastructure.  I
am not sure when or how Nicolas would like to tackle it though.

> Michael
>
>


Footnotes: 
[1] See http://lists.gnu.org/archive/html/emacs-orgmode/2011-09/msg00017.html

[2] Since the feature is ODT-only it is not documented.
-- 
* Conventional Description-List

  - cmd ::                    short term + short descr
  - cmd -o <dst> <src> ::     short term + short descr
  - cmd --log-level=err -o <dst> <src> ::
                              long term + short descr
  - cmd --create-file ::      short term + long descr bla bla bla bla
                              bla bla bla bla bla bla bla bla bla bla
                              bla bla bla bla bla bla bla bla bla
  - cmd --log-level=wrn -o <dst> <src> ::
                              long term + long descr bla bla bla bla
                              bla bla bla bla bla bla bla bla bla bla
                              bla bla bla bla bla bla bla bla bla
  - cmd --log-level=dbg -o <dst> <src> ::
                              - term descr 1
                              - term descr 2



* Above Description-List as a List-Table

#+BEGIN_list-table
- cmd
  - short term + short descr
- cmd -o <dst> <src>
  - short term + short descr
- cmd --log-level=err -o <dst> <src>
  - long term + short descr
- cmd --create-file
  - short term 

    long descr bla bla bla bla bla bla bla bla bla bla bla bla bla bla
    bla bla bla bla bla bla bla bla bla
- cmd --log-level=wrn -o <dst> <src>
  - long term 

    long descr bla bla bla bla bla bla bla bla bla bla bla bla bla bla
    bla bla bla bla bla bla bla bla bla
- cmd --log-level=dbg -o <dst> <src>
  - 
    - term descr 1
    - term descr 2
#+END_list-table

Attachment: desclist.odt
Description: application/vnd.oasis.opendocument.text


reply via email to

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