From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: #+LABEL: in HTML export Date: Mon, 29 Mar 2010 14:20:54 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwDy0-0000tx-Ub for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 08:21:17 -0400 Received: from [140.186.70.92] (port=51214 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwDxy-0000tA-Nl for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 08:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwDxj-0008Oe-C5 for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 08:21:14 -0400 Received: from mail-ew0-f218.google.com ([209.85.219.218]:41445) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwDxg-0008Nl-5T for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 08:20:59 -0400 Received: by mail-ew0-f218.google.com with SMTP id 10so171565ewy.32 for ; Mon, 29 Mar 2010 05:20:55 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: emacs-orgmode list 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: 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: > > > > 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. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten
This is a table