Re: [O] Aligned glosses in orgmode (for export to odt/doc)

2014-01-24 Thread Jambunathan K

Jambunathan K kjambunat...@gmail.com writes:

 Benjamin Slade sl...@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---

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 |


--8---cut here---end---8---



test.odt
Description: application/vnd.oasis.opendocument.text


Re: [O] Aligned glosses in orgmode (for export to odt/doc)

2014-01-23 Thread Jambunathan K
Benjamin Slade sl...@jnanam.net writes:

 Can anyone suggest how this (or some other solution to producing
 interlinear glosses) might be implemented in an orgmode-odt/doc/docx
 setup? 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).

Feel free to use my ELPA package. I have documented the procedure here

http://permalink.gmane.org/gmane.emacs.orgmode/81347

Going forward, I will release my packages - ox-odt and org-jabref - via
ELPA tarball.  So, ELPA installation will be the recommended method for
accessing my private package.



You can ignore my earlier message at:

http://permalink.gmane.org/gmane.emacs.orgmode/81301




[O] Aligned glosses in orgmode (for export to odt/doc)

2014-01-22 Thread Benjamin Slade
I'm contemplating writing a linguistics article in orgmode because I
know I will need to provide a doc(x) file (normally I would otherwise
use LaTeX).

One of things I will need to be able to is produce numbered examples
with aligned interlinear glosses (like these:
http://www.eva.mpg.de/lingua/resources/glossing-rules.php ). It's been a
while since I've done this in a doc(x)-ish format, but the obvious ways
would be (1) to do something with tab alignment or (2) use
borderless/invisible tables.

Can anyone suggest how this (or some other solution to producing
interlinear glosses) might be implemented in an orgmode-odt/doc/docx
setup? 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).

~
Dr Benjamin Slade
 Dept. of Linguistics, Uni. of Utah

pgp fingerprint: 21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19
~
{sent by mu4e on Emacs running under GNU/Linux}
(Choose Linux, Choose Freedom)




Re: [O] Aligned glosses in orgmode (for export to odt/doc)

2014-01-22 Thread Jambunathan K

Benjamin Slade sl...@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).

This feature is available only in my private repo.  



If you are using Git see instructions at:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-12/msg00522.html

   (Search for Download)

Once you download and copy the ox-odt.el file, make sure you do

M-x byte-compile-file

to create .elc file.



If you are using ELPA see instructions at:

http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00518.html

(Search for Untar)



1. Identity where your styles files come from.  Look at the *Messages*
   buffer for clue.

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

Replace this

style:style style:name=CustomTableCell style:family=table-cell
  style:table-cell-properties style:vertical-align=top 
fo:background-color=#ff fo:padding=0.097cm fo:border-left=0.002cm 
solid #00 fo:border-right=0.002cm solid #00 fo:border-top=0.002cm 
solid #00 fo:border-bottom=0.002cm solid #00

with this:

style:style style:name=CustomTableCell style:family=table-cell
  style:table-cell-properties style:vertical-align=top
  fo:background-color=#ff fo:padding=0.097cm


3. Create a tables as below.  (GriddedTable is part of C-h v
   `org-odt-table-styles').  WARNING: Don't try to understand the
   documentation.  I don't it understand it myself.

--8---cut here---start-8---

Rows will be in the ratio of 2:3:4

#+ATTR_ODT: :style GriddedTable
| 1 | 2 | 3 |
| _a_ | _b_ | _c_ |
| _d_ | _e_ | _f_ |


Rows will be in the ratio of 4:7:10.  Table will occupy 80% of page width.

#+ATTR_ODT: :rel-width 80
#+ATTR_ODT: :widths 3,6,9
#+ATTR_ODT: :style GriddedTable
| 1 | 2 | 3 |
| _a_ | _b_ | _c_ |
| _d_ | _e_ | _f_ |


--8---cut here---end---8---

4. Export it.  You will get the attached ODT file.



test.odt
Description: application/vnd.oasis.opendocument.text