emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [odt] equation labels


From: Jambunathan K
Subject: Re: [O] [odt] equation labels
Date: Sun, 28 Aug 2011 03:32:10 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

Myles

> Does anyone know how to cause a label such as "Figure 1." in the odt
> (for the resulting png), and set the caption for an equation such as:
>
> #+CAPTION: some caption
> #+LABEL: eqn:psychrometric
> \begin{equation*}
> \label{eq:psychrometric}
>  \capillaryPressure = ln(RH)\cdot \dens_w\frac{RT}{M_w}
> \end{equation*}
>
> ?
>
> The orgmode manual says that captions and labels are for images and
> tables so unless there is a special trick I would probably try to wrap
> the latex in something first, for dvipng to return the png to org, to
> apply the CAPTION to, before exporting to odt.
>
> Extra points for making it "Equation 1." instead of "Figure 1.".

I have added support for honoring captions, label and attributes for
images that are dervied from latex fragments. Checkout the git repo and
let me know if there are any rough edges that need to be ironed out.

Note that the odt exporter treats Labels and their references in a
special way.

For example, if the label is defined as follows,

#+LABEL: Equation:1

Equation is considered as a "Category" [1] and "1" is considered as
sequence number. So this "category:seq-no" is the recommended form of
labels for odt export. Note that the seq-no found in Org file need not
be sequential. The odt exporter will faithfully reproduce the seqnos as
seen Org file to the odt file. You can auto-generate the "right" seqnos
by using Tools->Update->Update All.

If you are averse to launching the gui for updating of indices you can
do a odt->odt (yes, odt->odt) conversion for sanitizing of indices [2].

It is also worth noting that the attached file uses the as yet
undocumented 

#+ATTR_ODT: (:scale 2) 

to scale the image to twice the original size.

Jambunathan K.

> Thanks,
>
> Myles
>
>

Footnotes: 

[1]  Other "Categories" could be Illustration, Table, Text etc.
[2]  I have never used unoconv myself. But the source code does update
indices of the input document before further conversion.

-- 

Attachment: eqns.org
Description: Text Data

Attachment: eqns.odt
Description: eqns.odt


reply via email to

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