Skip to main content

sphinx-subfigure

PyPI

A sphinx extension to create figures with multiple images:

  • Provides a simple format for complex image layouts.
  • Supports HTML fully, with responsive layouts, for different screen sizes
    • LaTeX is supported, except for images that span multiple rows.
    • degrades gracefully for other formats.
  • Supports figure numbering and referencing.
  • Supports image sub-captions, via alt text.

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 .
  5. Additional layouts can be defined with :layout-sm:, :layout-lg:, :layout-xl:, for different screen sizes (HTML only).

Responsive sub-figure

Release files for sphinx_subfigure 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx_subfigure 0.2.4
File Size Uploaded
sphinx_subfigure-0.2.4.tar.gz 576.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx_subfigure 0.2.4
File Interpreter ABI Platform
sphinx_subfigure-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 585.4 kB

Release files / sphinx_subfigure-0.2.4.tar.gz

Download URL sphinx_subfigure-0.2.4.tar.gz
Size 576.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d106193d0076bf29bb9594dbda23d3c13e9b2490e4344bc8018b6059a195de3b
BLAKE2b-256 checksum
How to use checksums
c7b9fbacae5a5439fc08b5403c9b6f3253ad2fb3af8dd3234e358be3fa3ab272
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Release files / sphinx_subfigure-0.2.4-py3-none-any.whl

Download URL sphinx_subfigure-0.2.4-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
535c890e0c431e9d0ad635f96b91b311560b02300197accc1ec664cb28af44f3
BLAKE2b-256 checksum
How to use checksums
0d4a3dcdf5e9bbc05dce85ee154b1ec3507427a2c2332834bd4e5f0541626c3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page