Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sphinx-gallery cross ref instructions to documenting guide #18959

Closed
story645 opened this issue Nov 16, 2020 · 3 comments
Closed

Add sphinx-gallery cross ref instructions to documenting guide #18959

story645 opened this issue Nov 16, 2020 · 3 comments
Milestone

Comments

@story645
Copy link
Member

Problem

The section in the documenting docs on cross referencing includes instructions for sphinx, but not for sphinx gallery.

Suggested Improvement

Add a sentence like "examples and tutorials are .py files rendered into rst using the sphinx-gallery plugin. The pattern for cross referencing these documents is :ref:sphx_glr_<folder>_<pyfile>`, for example:

:ref:`sphx_glr_tutorials_provisional_mosaic.py`

More info at https://sphinx-gallery.github.io/stable/auto_examples/plot_0_sin.html?highlight=cross%20reference#cross-referencing

@anntzer
Copy link
Contributor

anntzer commented Nov 16, 2020

Actually using

:doc:`/gallery/foo/bar`

is better, as that's not s-g specific but works basically always.

@story645
Copy link
Member Author

🤷 seemed to be creating problems on this weeks GSOD call?
attn: @tacaswell

@timhoffm
Copy link
Member

I think :doc: would be fine. IIRC Jerome tried to reference the heading of the example/tutorial using :ref:.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants