thank you so much!

On Wed, Dec 5, 2018 at 3:34 PM Jan <[email protected]> wrote:

> Hello all,
>
> Is there way to reference to the section in different file without
> duplicating section title in lablel and malforming the url link
> consider following files as an example.
>
> Currently what I'm doing is:
>
> file_1.rst
>
> File 1
> =======
>
>
> .. _file_1-section-1:
>
> Section 1
> -------------
>
> Section 2
> -------------
>
> More info at `section1`_
>
> .. _section1: #section-1
>
>
> file_2.rst
>
> File 2
> ======
>
>
> Section 1
> ---------
>
> More info at :ref:`file_1-section-1`
>
>
>
> This leads into several different URLs
>
>
> * default url in sidebar built by sphinx *file_1.html#section-1*
> * URL from my reference inside file_1.rst which is same as one built by
> sphinx: *file_1.html#section-1*
> * URL of the reference from the inside file_2.rst:
> *file_1.html#file_1-section-1*
>
> And this feels really inconsistent and it's a tedious process to duplicate
> section headers every time.
>
> I would rather have an option that build throws warnings or broke if the
> reference is broken.
>
>
>
> One of the approaches would be to have power to do something like this:
>
> file_1.rst
>
> File 1
> =======
>
>
> Section 1
> -------------
>
> Section 2
> -------------
>
> More info at :ref:`section-1`
> or
> More info at :ref:`.#section-1`
> or even
> More info at :ref:`file_1#section-1`
>
>
> file_2.rst
>
> File 2
> ======
>
>
> Section 1
> ---------
>
> More info at :ref:`file_1#section-1`
>
>
>
> Is there any way to achieve this?
> And if not why is this not a good idea?
>
>
> Thank you
>
> Jan.
>
> --
> 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 https://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 https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to