Skip to main content

A sphinx extension to create sub-figures.

Project description

sphinx-subfigure (IN-DEVELOPMENT)

A sphinx extension to create figures with multiple images:

  • Provides a simple format for complex image layouts.
    • Supports responsive HTML layouts, for different screen sizes.
  • Supports figure numbering and referencing.
  • Supports image sub-captions, via alt text.
  • Supports HTML fully (LaTeX to come), and degrades gracefully for other formats.

Usage

Install sphinx-subfigure with pip install sphinx-subfigure, then add sphinx_subfigure to your conf.py file's extensions variable:

extensions = ["sphinx_subfigure"]

numfig = True  # optional

Now add a subfigure directive to your document:

.. subfigure:: AA|BC
   :layout-sm: A|B|C
   :subcaptions: above
   :name: myfigure
   :class-grid: outline

   .. image:: imageA.png
      :alt: Image A

   .. image:: imageB.png
      :alt: Image B

   .. image:: imageC.png
      :alt: Image C

    Figure Caption
  1. Each image is automatically assigned an area identifier (A, B, C, etc.).
  2. Layouts are formed by composing the areas into a grid, with rows delimited by |.
  3. Each area must be used exactly once in the layout, and form a single rectangle.
  4. "Empty" areas can be designated with .

Responsive sub-figure

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_subfigure-0.1.0.tar.gz (572.6 kB view details)

Uploaded Source

Built Distribution

sphinx_subfigure-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_subfigure-0.1.0.tar.gz.

File metadata

  • Download URL: sphinx_subfigure-0.1.0.tar.gz
  • Upload date:
  • Size: 572.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for sphinx_subfigure-0.1.0.tar.gz
Algorithm Hash digest
SHA256 278916ef68a2657f67f139c0cdfecee4a881ed1f47740be97f7f717aa84ed70b
MD5 0b37a7eaa955b552fed44931e9def4e3
BLAKE2b-256 a3cb1abfb008cce8a26d37da17264f4f8d662c924856490c8bdaeb014c62cc16

See more details on using hashes here.

Provenance

File details

Details for the file sphinx_subfigure-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_subfigure-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12d3d3d561e009b9f1aceae43ded84867aeb65fb458340bb351efae05d1f55ce
MD5 534988b9f12f8544cef2da60a342586c
BLAKE2b-256 17808ee7c330a0844f80a3c7c99f2f25b656c6e1dc30062fd82cfb0cc4ef45f9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page