emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: alignment of description list in Org and export old and new
Date: Mon, 04 Jun 2012 09:06:32 +0530	[thread overview]
Message-ID: <817gvneojj.fsf@gmail.com> (raw)
In-Reply-To: <CALn3zogKq8wzjzg41wk-euwxrFbziqp+fPkQkruD06ciiekteg@mail.gmail.com> (Michael Brand's message of "Sat, 2 Jun 2012 11:18:56 +0200")

[-- Attachment #1: Type: text/plain, Size: 2369 bytes --]


> 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.
-- 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: desclist.org --]
[-- Type: text/x-org, Size: 1449 bytes --]


* 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 #3: desclist.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 10351 bytes --]

  reply	other threads:[~2012-06-04  3:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-02  9:18 alignment of description list in Org and export old and new Michael Brand
2012-06-04  3:36 ` Jambunathan K [this message]
2012-06-05 19:48   ` Michael Brand
2012-06-09 12:26     ` Nicolas Goaziou
2012-06-10 16:39 ` Michael Brand
2012-06-12 12:37   ` Nicolas Goaziou
2012-07-31 15:33 ` Michael Brand
2012-08-01 14:09   ` Michael Brand
2012-08-01 14:17     ` Bastien

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=817gvneojj.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=michael.ch.brand@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).