Joseph Vidal-Rosset <joseph.vidal.ros...@gmail.com> writes:

> The following code works correctly to export into LaTeX, but the
> caption function fails in html. But caption works in html when it is
> above a table written in org-mode.
>
> #+OPTIONS: LaTeX:verbatim
> #+LaTeX_CLASS: org-article
> #+LaTeX_CLASS_OPTIONS: [koma,a4paper,11pt]
> #+LaTeX_CLASS_OPTIONS: [times]
> #+LANGUAGE: en
> #+OPTIONS: ':t
> #+OPTIONS: tex:t
> #+LATEX_HEADER: \usepackage{tikz}
> #+LaTeX_CLASS_OPTIONS: [captions=tableheading]
> #+OPTIONS: tex:imagemagick
>
> #+CAPTION: Classical square of opposition
> #+BEGIN_FIGURE
> \begin{tikzpicture}
> ...
> \end{tikzpicture}
> #+END_FIGURE
>

Yes, tables and source blocks handle captions in the HTML exporter, but
special blocks (which #+(BEGIN|END)_FIGURE is) don't. Captions for special
blocks *are* handled correctly in the latex exporter. This shouldn't be
too hard to fix: just copy the caption code from org-html-table to
org-html-special-block, but I won't have time to try it today. And then
there is the question of other exporters...

-- 
Nick


Reply via email to