Skip to main content
Ctrl+K
MyST Sphinx Gallery v0.3.0 documentation - Home
  • User Guide
  • Demo Gallery
  • API Reference
  • Contributing Guide
  • About
  • GitHub
  • PyPI
  • User Guide
  • Demo Gallery
  • API Reference
  • Contributing Guide
  • About
  • GitHub
  • PyPI

Section Navigation

Thumbnail selection strategies

  • Using alt attribute
    • Rst Image Directive
    • Rst Figure Directive
    • Markdown Conventional Image Syntax
    • Markdown Image Directive
    • Markdown Figure Directive
    • Notebook Conventional Image Syntax
    • Notebook Image Directive
    • Notebook Figure Directive
  • first/last Strategy
    • first strategy
    • last strategy
  • Code/Markdown Strategy for Notebooks
    • code | first strategy
    • code | last strategy
    • markdown | first strategy
    • markdown | last strategy
    • markdown | alt strategy
  • Default Gallery Thumbnail
    • Default Thumbnail

Ref Gallery

  • Using ref-gallery in Python Docs
  • ref-gallery in RST files
  • Demo Gallery
  • ref-gallery...

ref-gallery in RST files#

This is an example of how to use the ref-gallery directive in a reStructuredText file.

ref-gallery.rst#
.. ref-gallery::
    :tooltip:

    examples/alt/rst image
    examples/first_last/first
    examples/code_markdown/first code
Rst Image Directive
../alt/rst%20image.html
first strategy
../first_last/first.html
code | first strategy
../code_markdown/first%20code.html

Note

This file does not contain any images, even though there is a ref-gallery directive, which displays the thumbnail images of the examples. Therefore, the default gallery image will be used.

previous

Using ref-gallery in Python Docs

next

API Reference

Edit on GitHub
Show Source

© Copyright 2024, Fan Chengyan (Fancy).

Created using Sphinx 8.0.2.

Built with the PyData Sphinx Theme 0.15.4.