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.

-- 
#+TITLE:     eqns.org
#+AUTHOR:    Jambunathan K
#+EMAIL:     kjambunat...@gmail.com
#+DATE:      2011-08-26 Fri
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:not-in-toc

#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME: 
#+XSLT:

* Equations

  There is a equation down below.

#+CAPTION: Kinetic Energy
#+LABEL: Equation:1
#+ATTR_ODT: (:scale 2)

  \begin{equation*}
  e = \frac{1}{2}mv^2
  \end{equation*}

#+CAPTION: Kinetic Energy
#+LABEL: Equation:2
#+ATTR_ODT: (:scale 0.5)

  \begin{equation*}
  e = \frac{1}{2}mv^2
  \end{equation*}

Attachment: eqns.odt
Description: eqns.odt

Reply via email to