emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [BUG?] Strange effect of noweb name collision on LaTeX export


From: Eric Schulte
Subject: Re: [O] [BUG?] Strange effect of noweb name collision on LaTeX export
Date: Fri, 08 Jun 2012 09:13:30 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (gnu/linux)

Ethan Ligon <address@hidden> 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
> #<<bar>>
> #+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 <<bar>> 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



reply via email to

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