emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* numbering figure in html ?
@ 2014-08-04 10:19 Joseph Vidal-Rosset
  2014-08-04 19:30 ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Joseph Vidal-Rosset @ 2014-08-04 10:19 UTC (permalink / raw)
  To: Liste-emacs-orgmode@gnu.org

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

Hello everybody,

In org-mode exporting

\begin{figure}
\begin{tikzpicture}

\draw[<-, >=latex][thick] (0,0) -- (1.6,0) node[right] {Subcontrary};
...

end{tikzpicture}
\caption{Square of opposition}
\end{figure}

works well with LateX, but fails with html: each Figure has the same
number, i.e. 1.

What is the best solution to get numbered Figure in html?

Regards

Jo.

[-- Attachment #2: Type: text/html, Size: 575 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: numbering figure in html ?
  2014-08-04 10:19 numbering figure in html ? Joseph Vidal-Rosset
@ 2014-08-04 19:30 ` Nick Dokos
  2014-08-05  6:42   ` Joseph Vidal-Rosset
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2014-08-04 19:30 UTC (permalink / raw)
  To: emacs-orgmode

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

> Hello everybody,
>
> In org-mode exporting
>
> \begin{figure}
> \begin{tikzpicture}
>
> \draw[<-, >=latex][thick] (0,0) -- (1.6,0) node[right] {Subcontrary};
> ...
>
> end{tikzpicture}

  \end{tikzpicture}
  
> \caption{Square of opposition}
> \end{figure}
>
> works well with LateX, but fails with html: each Figure has the same number, i.e. 1.
>
> What is the best solution to get numbered Figure in html?
>

[Please provide complete examples whenever possible.]

How do you produce the figure for HTML export?

Perhaps

#+caption: Square of opposition

on the figure?

--
Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: numbering figure in html ?
  2014-08-04 19:30 ` Nick Dokos
@ 2014-08-05  6:42   ` Joseph Vidal-Rosset
  2014-08-05 12:43     ` Nick Dokos
  2014-08-05 12:50     ` Nick Dokos
  0 siblings, 2 replies; 6+ messages in thread
From: Joseph Vidal-Rosset @ 2014-08-05  6:42 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Liste-emacs-orgmode@gnu.org

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

Dear Nick, (cc. the list)

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}
\draw[<-, >=latex][thick] (0,0) -- (1.6,0) node[right] {Subcontrary};
\draw[->,>=latex] [thick] (3.6,0) -- (5,0) node[right] { \((\mathbf{O})\)~
\(\underset{\land \exists x(Sx)}{\exists x(Sx \land \neg Px)}\)};
\draw[->,>=latex] [thick] (1.6,0) -- (0,0) node[left] {\(\underset{\land
\exists x(Sx)}{\exists x(Sx \land  Px)}\)~ \((\mathbf{I})\)};
\draw[<->,>=latex][thick] (5,0) -- (0,5) node[left] {\(\underset{\land
\exists x(Sx)}{\forall x(Sx \to Px)}\)~ \((\mathbf{A})\)} node[midway]
{CONTRADICTORY} ;
\draw[<->,>=latex][thick] (0,0) -- (5,5);
\draw[-,>=latex][thick]  (0,5) -- (0,2.5) node[below] {Subaltern};
\draw[->,>=latex][thick] (0,2) -- (0,0);
\draw[-,>=latex][thick] (5,5) -- (5,2.5) node[below] {Subaltern};
\draw[<-,>=latex][thick] (0,5) -- (1.7,5) node[right] {Contrary};
\draw[->,>=latex][thick] (3.2,5) -- (5,5) node[right]{\((\mathbf{E})\)~
\(\underset{\land \exists x(Sx)}{\forall x(Sx \to  \neg Px)}\)};
\draw[->,>=latex][thick] (5,2) -- (5,0);
\end{tikzpicture}
#+END_FIGURE




2014-08-04 21:30 GMT+02:00 Nick Dokos <ndokos@gmail.com>:

> Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com> writes:
>
> > Hello everybody,
> >
> > In org-mode exporting
> >
> > \begin{figure}
> > \begin{tikzpicture}
> >
> > \draw[<-, >=latex][thick] (0,0) -- (1.6,0) node[right] {Subcontrary};
> > ...
> >
> > end{tikzpicture}
>
>   \end{tikzpicture}
>
> > \caption{Square of opposition}
> > \end{figure}
> >
> > works well with LateX, but fails with html: each Figure has the same
> number, i.e. 1.
> >
> > What is the best solution to get numbered Figure in html?
> >
>
> [Please provide complete examples whenever possible.]
>
> How do you produce the figure for HTML export?
>
> Perhaps
>
> #+caption: Square of opposition
>
> on the figure?
>
> --
> Nick
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 3129 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: numbering figure in html ?
  2014-08-05  6:42   ` Joseph Vidal-Rosset
@ 2014-08-05 12:43     ` Nick Dokos
  2014-08-05 16:54       ` Joseph Vidal-Rosset
  2014-08-05 12:50     ` Nick Dokos
  1 sibling, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2014-08-05 12:43 UTC (permalink / raw)
  To: emacs-orgmode

Joseph Vidal-Rosset <joseph.vidal.rosset@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: numbering figure in html ?
  2014-08-05  6:42   ` Joseph Vidal-Rosset
  2014-08-05 12:43     ` Nick Dokos
@ 2014-08-05 12:50     ` Nick Dokos
  1 sibling, 0 replies; 6+ messages in thread
From: Nick Dokos @ 2014-08-05 12:50 UTC (permalink / raw)
  To: emacs-orgmode

Joseph Vidal-Rosset <joseph.vidal.rosset@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
> ...
> #+END_FIGURE
>

BTW, the HTML also has the figure wrapped in <p>...</p> which I think is
wrong. I wonder if it's an instance of the bug that Daniel Clemente
pointed out in

    http://thread.gmane.org/gmane.emacs.orgmode/89413

although at first glance, it seems distant enough to be unrelated.
-- 
Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: numbering figure in html ?
  2014-08-05 12:43     ` Nick Dokos
@ 2014-08-05 16:54       ` Joseph Vidal-Rosset
  0 siblings, 0 replies; 6+ messages in thread
From: Joseph Vidal-Rosset @ 2014-08-05 16:54 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Liste-emacs-orgmode@gnu.org

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

2014-08-05 14:43 GMT+02:00 Nick Dokos <ndokos@gmail.com>:

> 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...
>


Dear Nick,

I leave the question open to  developers; I am not able to find the
solution by myself, I have to much to learn. Sorry.

It is not a hurry, and it is not a real problem for me. I hope that this
email will help to improve org-mode again.

Best wishes

Jo.

[-- Attachment #2: Type: text/html, Size: 1284 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-05 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 10:19 numbering figure in html ? Joseph Vidal-Rosset
2014-08-04 19:30 ` Nick Dokos
2014-08-05  6:42   ` Joseph Vidal-Rosset
2014-08-05 12:43     ` Nick Dokos
2014-08-05 16:54       ` Joseph Vidal-Rosset
2014-08-05 12:50     ` Nick Dokos

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).