duplicate target name

313 views
Skip to first unread message

John Hunter

unread,
Jun 13, 2008, 2:46:58 PM6/13/08
to sphin...@googlegroups.com
sphinx generates a warning when we have duplicate target names::

Duplicate explicit target name: "[source py]".
WARNING: /home/titan/johnh/python/svn/matplotlib.trunk/matplotlib/doc/users/pyplot_tutorial.rst::
(WARNING/2) Duplicate explicit target name: "[highres png]".
WARNING: /home/titan/johnh/python/svn/matplotlib.trunk/matplotlib/doc/users/pyplot_tutorial.rst::
(WARNING/2) Duplicate explicit target name: "[pdf]".
WARNING: /home/titan/johnh/python/svn/matplotlib.trunk/matplotlib/doc/users/pyplot_tutorial.rst::
(WARNING/2) Duplicate explicit target name: "[source py]".
WARNING: /home/titan/johnh/python/svn/matplotlib.trunk/matplotlib/doc/users/pyplot_tutorial.rst::
(WARNING/2) Duplicate explicit target name: "[highres png]".
WARNING: /home/titan/johnh/python/svn/matplotlib.trunk/matplotlib/doc/users/pyplot_tutorial.rst::
(WARNING/2) Duplicate explicit target name: "[pdf]".


The use case is below an image we have links to a pdf, high res png
and python file, and for each image we want to have a target to links
for pdf, png and the source code. We can generate unique target
names, but the output is cleaner if we have simply the "source py",
"pdf" and "png" as the names for each one, even though they point to
different images. Is there a reason this can't work?

JDH

Ian Bicking

unread,
Jun 13, 2008, 2:48:41 PM6/13/08
to sphin...@googlegroups.com
This is probably a reST thing. If you do `here <some-link>`_ and then
later `here <some-other-link>`_ reST treats them like named links. If
you do `here <some-link>`__ (two underscores) then they are anonymous
and your warnings should go away.


--
Ian Bicking : ia...@colorstudy.com : http://blog.ianbicking.org

John Hunter

unread,
Jun 13, 2008, 3:00:21 PM6/13/08
to sphin...@googlegroups.com
On Fri, Jun 13, 2008 at 1:48 PM, Ian Bicking <ia...@colorstudy.com> wrote:
>
> This is probably a reST thing. If you do `here <some-link>`_ and then
> later `here <some-other-link>`_ reST treats them like named links. If
> you do `here <some-link>`__ (two underscores) then they are anonymous
> and your warnings should go away.

Excellent, thanks.

JDH

Reply all
Reply to author
Forward
0 new messages