emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: exporting a math figure in both latex and html: missing caption and label
Date: Wed, 17 Feb 2016 16:30:27 +0100	[thread overview]
Message-ID: <m237sricbw.fsf@charm-ecran.irisa.fr> (raw)

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

Hello,

I'm trying to replicate the following latex code to orgmode so that it
exports correctly in latex and orgmode:

#+begin_src latex
\begin{figure}[h]

\[\scalebox{2}{\color{
blue}$\omega^{(\omega^\omega\,+\, \omega^2 \times 8 \,+\, 
   \omega)
 }+ \omega^\omega + \omega^4+ 6$}\]
\caption{An ordinal in Cantor normal form \label{fig:cnf-example}}

\end{figure}
#+end_src

I'm currently using this:

#+begin_src org
,#+caption: An ordinal in Cantor normal form
,#+name: fig:cnf-example
,#+begin_figure
\[
\omega^{(\omega^\omega\,+\, \omega^2 \times 8 \,+\, \omega)}+ \omega^\omega + \omega^4+ 6
\]
,#+end_figure
#+end_src

(I'm not too worried about the scaling and color, I can deal with them
using a custom environment in latex and a CSS in html).

The html code that is generated forgets both the caption and the label:

#+begin_src html
<div class="figure">
<p>
\[
\omega^{(\omega^\omega\,+\, \omega^2 \times 8 \,+\, \omega)}+ \omega^\omega + \omega^4+ 6
\]
</p>

</div>
#+end_src

I see that captions are correctly generated for images in html export.
Is there something special I need to do for other kinds of figures?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂ (2016-01, Mauna Loa Obs.): 402.52

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

                 reply	other threads:[~2016-02-17 15:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=m237sricbw.fsf@charm-ecran.irisa.fr \
    --to=alan.schmitt@polytechnique.org \
    --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).