Le mercredi 29 décembre 2010 à 16:26 +0100, Georg Brandl a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Am 29.12.2010 15:36, schrieb Victor Stinner:
> > Hi,
> > 
> > I started with an unique document written in reST format. I used
> > `reference name`_ which was replaced with "reference name" which is a
> > link to a section with has a different name. After switching to
> > Sphinx, I replaced the references by :ref:`reference name`, but it is
> > replaced by "section name" (link to the section) instead of "reference
> > name". Example:
> > 
> > ----------- 8< ----------
> > .. index:: UCS-2, UCS-4, UTF-16, UTF-16-LE, UTF-16-BE, UTF-32, UTF-32-
> > LE, UTF-32-BE
> > .. _UCS-2:
> > .. _UCS-4:
> > .. _UTF-16:
> > .. _UTF-16-LE:
> > .. _UTF-16-BE:
> > .. _UTF-32:
> > .. _UTF-32-LE:
> > .. _UTF-32-BE:
> > 
> > UCS-2, UCS-4, UTF-16 and UTF-32
> > '''''''''''''''''''''''''''''''
> > 
> > UCS-2 and UCS-4 encodings encode each code point to exactly one word
> > of, ...
> > ----------- 8< ----------
> > 
> > (eg. :ref:`UTF-16`) becomes (eg. UCS-2, UCS-4, UTF-16 and UTF-32)
> > 
> > I can use (eg. :ref:`UTF-16 <UTF-16>`), but how can I add a link to
> > the UTF-16 section without repeating the reference name?
> 
> Easy: don't have different labels anymore, so that it becomes
> :ref:`UTF-16 <utf>` and so on. :)

Ok, but :ref:`UTF-16 <utf>` is longer than just `UTF-16`_. The source
code is more difficult to read and to write.

I would like something like :ref:`link` but using link as the label
instead of the section title pointed by the link.

Victor

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to