Anonymous hyperlinks in restructuredtext

Ned Batchelder ned at nedbatchelder.com
Sat May 28 10:41:55 EDT 2016


On Saturday, May 28, 2016 at 8:58:41 AM UTC-4, Sergio Spina wrote:
> Il giorno sabato 28 maggio 2016 14:37:21 UTC+2, Ned Batchelder ha scritto:
> > On Saturday, May 28, 2016 at 8:28:35 AM UTC-4, Sergio Spina wrote:
> > > From the "restructuredtext markup specification":
> > > 
> > > >    Anonymous hyperlink targets consist of an explicit markup
> > > >    start (".. "), two underscores, a colon, whitespace, and a
> > > >    link block; there is no reference name:
> > > >
> > > >        .. __: anonymous-hyperlink-target-link-block
> > > >
> > > >    An alternate syntax for anonymous hyperlinks consists of two
> > > >    underscores, a space, and a link block:
> > > >
> > > >        __ anonymous-hyperlink-target-link-block
> > > 
> > > Ok. I got the file "test.rst"
> > > 
> > > ...
> > > 
> > > Now I put a reference to link1_ and another to link2_
> > 
> > The docs say, "there is no reference name", so you cannot put a reference
> > to them.  You can use an anonymous syntax:
> > 
> >     Jump to `my blog`__.
> > 
> >     __ http://myblog.com
> > 
> > or you can use a named syntax:
> > 
> >     Jump to `my blog`_.
> > 
> >     .. _my blog: http://myblog.com
> > 
> > The ReST syntax can be arcane...
> > 
> > --Ned.
> 
> I need INTERNAL hyperlink targets, not external...

Can explain more about what kind of internal targets you need? Are these
sections with titles already?  Why are you interested in anonymous rather
than named links?

--Ned.



More information about the Python-list mailing list