From: Sergio <ser...@gm...> - 2016-04-19 09:00:09
|
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 ? |