Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107307
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2016-04-19 01:58 -0700 |
| References | <d2774cf0-7cfb-434f-90eb-e04d8873d9c4@googlegroups.com> <c44396d1-2315-4128-9ac5-4d655935d7d0@googlegroups.com> |
| Message-ID | <9d2fb272-ac5d-4c83-908c-86080ea93cb5@googlegroups.com> (permalink) |
| Subject | Re: ReST: link bookmark |
| From | Sergio Spina <sergio.am.spina@gmail.com> |
Il giorno domenica 17 aprile 2016 12:14:57 UTC+2, Sergio Spina ha scritto:
> Il giorno domenica 17 aprile 2016 12:04:38 UTC+2, Sergio Spina ha scritto:
> > I would know what is the way to implement in ReST a link bookmark like in this example:
> >
> > > <html>
> > > <body>
> > >
> > > <p>This text stand for an example of text containing
> > > a <a name="B3Pa9-5ZRIx-1">bookmarked target</span> 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 is produced by an algorithm and 1) cannot be left away and 2) cannot be seen in the printed document.
> >
> > Thanks.
>
> The correct example is:
>
> > <html>
> > <body>
> >
> > <p>This text stand for an example of text containig
> > a <a name="B3Pa9-5ZRIx-1">target</a> bookmark.</p>
> >
> > <p>So let's go all together to visit the target clicking
> > on <a href="#B3Pa9-5ZRIx-1">this link</a>.</p>
> >
> > </body>
> > </html>
>
> Sorry for the mispelling.
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 ?
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
ReST: link bookmark Sergio Spina <sergio.am.spina@gmail.com> - 2016-04-17 03:04 -0700
Re: ReST: link bookmark Sergio Spina <sergio.am.spina@gmail.com> - 2016-04-17 03:14 -0700
Re: ReST: link bookmark Sergio Spina <sergio.am.spina@gmail.com> - 2016-04-19 01:58 -0700
csiph-web