From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [BUG?] Strange effect of noweb name collision on LaTeX export Date: Fri, 08 Jun 2012 09:13:30 -0600 Message-ID: <87txylltut.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sd0t0-0003ju-By for emacs-orgmode@gnu.org; Fri, 08 Jun 2012 11:14:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sd0su-0000tJ-OT for emacs-orgmode@gnu.org; Fri, 08 Jun 2012 11:14:01 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:35394) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Sd0su-0000t6-Gq for emacs-orgmode@gnu.org; Fri, 08 Jun 2012 11:13:56 -0400 In-Reply-To: (Ethan Ligon's message of "Thu, 7 Jun 2012 17:50:16 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ethan Ligon Cc: "Emacs-orgmode@gnu.org" Ethan Ligon writes: > #+TITLE: Example of name collision bug > #+AUTHOR: > #+EMAIL: > #+DATE: 2012-06-07 Thu > #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t > > * Figure and trivial code reference > Here we have a figure. > This example works as expected; we get a latex figure on export. > > [[./foo.png]] > > * Figure and trivial code reference (with collision) > Here we have a figure and a trivial code block with a noweb reference. > The difference is that the basename of the figure matches the noweb > reference. Instead of a figure on latex export, we get a hyperref! > > [[./bar.png]] > > #+BEGIN_SRC sh :exports none > #<> > #+END_SRC Ah, so as it turns out the syntax for the noweb reference happens to be the same as the syntax used to specify a latex label. In this case the LaTeX exporter first mistakes the <> as a label anchor, and then apparently converts the bar.png link to a real link. The latex exporter probably shouldn't try to make anchors out of the text within code blocks. However, in the mean time you can customize the noweb syntax using the `org-babel-noweb-wrap-start' and `org-babel-noweb-wrap-end' variables so that they aren't mistaken for label anchors. Best, -- Eric Schulte http://cs.unm.edu/~eschulte