From: Jambunathan K <kjambunathan@gmail.com>
To: Myles English <mylesenglish@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [odt] equation labels
Date: Sun, 28 Aug 2011 03:32:10 +0530 [thread overview]
Message-ID: <81wrdy4iot.fsf@gmail.com> (raw)
In-Reply-To: <87pqjw6vpr.fsf@bill.home> (Myles English's message of "Tue, 23 Aug 2011 15:36:32 +0100")
[-- Attachment #1: Type: text/plain, Size: 1972 bytes --]
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.
--
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: eqns.org --]
[-- Type: text/x-org, Size: 712 bytes --]
#+TITLE: eqns.org
#+AUTHOR: Jambunathan K
#+EMAIL: kjambunathan@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 #3: eqns.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 9498 bytes --]
next prev parent reply other threads:[~2011-08-27 22:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 14:36 [odt] equation labels Myles English
2011-08-26 19:36 ` Jambunathan K
2011-08-27 22:02 ` Jambunathan K [this message]
2011-08-31 11:09 ` Myles English
2011-08-31 11:37 ` suvayu ali
2011-08-31 11:50 ` Myles English
2011-08-31 13:52 ` Jambunathan K
2011-08-31 14:07 ` Jambunathan K
2011-09-17 19:48 ` Jambunathan K
-- strict thread matches above, loose matches on Subject: below --
2011-10-28 1:23 Myles English
2011-10-30 22:11 ` Jambunathan K
2011-10-31 11:54 ` Myles English
2011-11-01 11:17 ` Myles English
2011-11-01 19:39 ` Jambunathan K
2011-11-01 19:49 ` Jambunathan K
2011-11-02 13:18 ` Myles English
[not found] ` <mylesenglish@gmail.com>
2011-11-02 13:38 ` Nick Dokos
2011-11-02 14:49 ` Myles English
2011-11-02 14:52 ` Nick Dokos
2011-11-02 18:21 ` Jambunathan K
2011-11-02 21:33 ` Myles English
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=81wrdy4iot.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mylesenglish@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).