emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Aligned glosses in orgmode (for export to odt/doc)
Date: Fri, 24 Jan 2014 23:09:34 +0530	[thread overview]
Message-ID: <87iot9p9d5.fsf@gmail.com> (raw)
In-Reply-To: 877g9rx4po.fsf@gmail.com

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


Jambunathan K <kjambunathan@gmail.com> writes:

> Benjamin Slade <slade@jnanam.net> writes:
>
>> One potential solution would be an orgmode setup which produces
>> borderless tables with an "optimal width" column setting. I don't know
>> how to do this in orgmode though (or if it can be done currently).

In Office XML, the style:table-column-properties has
style:use-optimal-column-width="true".  Based on my little
experimentation, I find that LibreOffice doesn't honor this setting.
This is the reason why columns are emitted unoptimized.

From LibreOffice UI, if you choose "Optimal Column Width", then the
table columns are emitted NOT with above XML attribute but with
hard-coded on-the-fly widths.

May be someone can take the above issue with LibreOffice folks...

> 2. Open OrgOdtContentTemplate.xml and find a style named
> "CustomTableCell".  Edit it so that it has no borders.

Ignore the above suggestion.  It is too tedious.  I have flushed out a
fix as part of the following ELPA tar

    http://repo.or.cz/w/org-mode/org-kjn.git/blob_plain/master:/org-odt-20140124.tar

With this fix, the behaviour of the rules in the ODT table will be much
the same as that in

    (info "(org) Tables in ODT export")

except for the following modification:

The ODT table will have top rule (or bottom rule) only if the Org-mode
table has one.

Similarly, ODT table will have left rule (resp. right rule) only if the
leftmost (resp. rightmost) data column has "<" and ">" markers.

----------------------------------------------------------------

To cut the long story short, here is how you produce a borderless table.
Use the :widths and :rel-width property to have the table look compact
and nice.


--8<---------------cut here---------------start------------->8---


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

This table has no rules.  It occupies 80% of page width.  The columns
will be in the ratio of 4:7:10.

#+ATTR_ODT: :rel-width 80
#+ATTR_ODT: :widths 3,6,9
| a   | b | c |
| d   | e | f |


[-- Attachment #3: Type: text/plain, Size: 68 bytes --]


--8<---------------cut here---------------end--------------->8---


[-- Attachment #4: test.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 10544 bytes --]

  reply	other threads:[~2014-01-24 17:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.111.1359046822.1194.emacs-orgmode@gnu.org>
2014-01-22 17:07 ` Aligned glosses in orgmode (for export to odt/doc) Benjamin Slade
2014-01-22 18:16   ` Jambunathan K
2014-01-24 17:39     ` Jambunathan K [this message]
2014-01-23 14:14   ` Jambunathan K

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=87iot9p9d5.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.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 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).