Re: Link bookmark

Sergio <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
Sergio <sergio.am.spina <at> gmail.com> writes:

> 
> I would know what is the way to implement in ReST an internal link bookmark
> like in the <a> tag in this example:
> 
> > <html>
> > <body>
> >
> > <p>This text stand for an example of text containing a
> > <a name="B3Pa9-5ZRIx-1">bookmarked target</a> bookmark.</p>
> >
> > <p>So let's go all together to visit the bookmarked target
> > clicking on <a href="#B3Pa9-5ZRIx-1">this link</a>.</p>
> >
> > </body>
> > </html>
> 
> The string that is the name of the anchor ("B3Pa9-5ZRIx-1") is produced by
> an algorithm and 1) cannot be left away and 2) cannot be seen in the printed
> document, just as it was an html bookmark link.
> 
> Thanks. 

I've tried some experiments looking for a hint:

    # file: test.htm

    <html>
    <body>
    
    <p>This text stand for an example of text containing
    a <a name="B3Pa9-5ZRIx-1">bookmarked target</a> bookmark.</p>
    
    <p>So let's go all together to visit the bookmarked target
    clicking on <a href="#B3Pa9-5ZRIx-1">this link</a>.</p>
    
    </body>
    </html>

First try:

    # test.htm converted at http://www.siafoo.net/html.xml
    
    This text stand for an example of text containig a `target <>`_ bookmark.

    So let's go all together to visit the target clicking on `this
    link <#B3Pa9-5ZRIx-1>`_ .

that is not what I'm looking for;

    # pandoc -f html test.htm -s -o test.rst
    
    This text stand for an example of text containig a target bookmark.
    
    So let's go all together to visit the target clicking on `this
    link <#B3Pa9-5ZRIx-1>`__.

that is not what I'm looking for;

    # html2rst.py taken from
http://docutils.sourceforge.net/sandbox/cliechti/html2rst/html2rst.py
    # python html2rst.py test.htm > test.rst
    
    This text stand for an example of text containig a target bookmark.
    
    So let's go all together to visit the target clicking on `this
    link`_.
    
    .. _this link: #B3Pa9-5ZRIx-1

Not a good try.

Is there a better way ?



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.