Andrea,
can't you design your content in a way that it has a section header at
that entry point? I mean if you want to write::
==========
About foos
==========
A foo is a blabla...
And also bla bla...
.. reftarget: foobla
And by the way also bla bla...
I'd suggest that you write
==========
About foos
==========
A foo is a blabla...
And also bla bla...
.. _reftarget:
Foo blabla
==========
And by the way also bla bla...
I mean if I imagine myself reading a html page, then I'd find it
irritating to click a link and getting beamed to some arbitrary place
which does not even have section title.
Luc
On 08/06/15 16:39, Andrea Cassioli wrote:
> Hi,
> thank you for the reply.
>
> Actually I may have not been clear. My point is I would like to define a
> label in some arbitrary position along with the text to be displayed.
> Then the link should only use the label.
>
> What you suggest would require me to specify the linkname, and this is
> exactly what I want avoid!
>
> Ideally, it will look like
>
> ```
> .. _linkname: label
>
> ```
> and somewhere else
>
> ```
> :ref:`linkname`
> ```
>
>
> the would be expanded showing `label` in the text. Exactly the way it
> works foe sections, but for arbitrary labels.
>
> But it seems it is not that easy without writing some directives myself.
> Maybe I should put a request-of-implementation out there.
>
> On Friday, June 5, 2015 at 11:16:10 AM UTC+2, Andrea Cassioli wrote:
>
> Hi,
> this may seems a stupid question, but....here it is!
>
> I would like to set some links around my docs in arbitrary position,
> i.e. not linked to sections. I would like to refer to them just by
> reference name and let the displayed text be defined along the
> label. For instance
>
> .. _`label <linkname>`
>
>
> and somewhere else, possibly a different file, say
>
>
> Blah blah, :ref:`linkname`
>
>
> I would then expect to get
>
> Blah blah, label
>
>
>
> The reason is that some names and label docs may change in the
> future and I would like the docs to be robust.
>
> Any ideas?
>
> --
> You received this message because you are subscribed to the Google
> Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.