emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] #+LABEL: in HTML export


From: Carsten Dominik
Subject: Re: [Orgmode] #+LABEL: in HTML export
Date: Mon, 29 Mar 2010 14:20:54 +0200

Hi Thomas,

Are you talking about figures or about tables?

For figures, the label is attached to the figure as the id of
the div surrounding figure plus caption.  However, this only
works if you also specify a caption.  But I think that only
figures with caption should be targets for links.

For tables, I have just made a change so that the label
is inserted as an anchor just as you propose:

<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
   <a name="tab:yyy" id="tab:yyy"></a>
   <caption>This is a table</caption>

Finally, I am now converting \ref{xxx} macros into links
for the HTML backend.  One problem is that, so the same
\ref macro will lead to the figure in both backends.

Hope this helps.

- Carsten




On Mar 28, 2010, at 10:29 PM, Thomas S. Dye wrote:

Aloha all,

I am working to create a single org-mode file that exports (almost) identically to HTML and LaTeX. I haven't found a way to do this for cross-references to figures.

Here you talk about figures

I'm wondering if it would be difficult to change the behavior of the LaTeX exporter to recognize and appropriately export the argument to #+LABEL:?

This line above an org-mode table:

#+LABEL: tab:xrf

is correctly and usefully exported to LaTeX as:

\label{tab:xrf}

A link in the org-mode file like this:

 [[tab:xrf][(table 2)]]

behaves as expected in the pdf file compiled from the LaTeX export. In situations where it is not difficult to live without LaTeX's cross-referencing facility, this is great. (I know that it is possible to put \ref{tab:xrf} in the org-mode file and that this works beautifully in the LaTeX export, but it does nothing in the HTML export.)

The #+LABEL: tab:xrf doesn't appear in HTML export from the same org- mode file. If it could appear there, perhaps like this:

<a name="tab:xrf" id="tab:xrf"></a>

then one org-mode file would correctly export these cross-references to both LaTeX and HTML.

All the best,
Tom

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten







reply via email to

[Prev in Thread] Current Thread [Next in Thread]