A sphinx extension to create sub-figures.
Project description
sphinx-subfigure
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
- Each image is automatically assigned an area identifier (A, B, C, etc.).
- Layouts are formed by composing the areas into a grid, with rows delimited by
|
. - Each area must be used exactly once in the layout, and form a single rectangle.
- "Empty" areas can be designated with
.
- Additional layouts can be defined with
:layout-sm:
,:layout-lg:
,:layout-xl:
, for different screen sizes (HTML only).
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.2.3.tar.gz
(576.2 kB
view hashes)
Built Distribution
Close
Hashes for sphinx_subfigure-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24318a2ecd605351896394f38e5f2b5085f21ad9c99773207223079b3062cb74 |
|
MD5 | e176da38e8a1d24203e598de960b6f93 |
|
BLAKE2b-256 | 16cdd50a3508459469de1a4544fbe28ab7f25cbdea08751215e68cef5b975bc3 |