Image caption support for Python Markdown
Project description
Markdown Image caption.
Inspired by the probably un-maintained package mdx_figcap
Usage:
Make sure you have markdown installed.
Define an image with caption in your markdown.

This will be converted to:
<span class="img_container center" style="display: inline-block;">
<img alt="test" src="http://example.com/image.png" style="display:block; margin-left: auto; margin-right: auto;" title="caption" />
<span class="img_caption" style="display: block; text-align: center;">caption</span>
</span>
Why no figure tag implementation ?
The figure tag is a block level element. The image element is an inline element. This difference breaks the attribute extension.
So {: .center} would not work if a figure was used.
Installation
pip install markdown-image-caption
add the plugin to your markdown
import markdown
parser = markdown.Markdown(extensions=["markdown_image_caption.plugin"])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file markdown_image_caption-0.3.0-py3-none-any.whl.
File metadata
- Download URL: markdown_image_caption-0.3.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04229aa960e2d2924d37123427eb4c27be0e3c46529d70b008f391ac4a72783b
|
|
| MD5 |
df738e89b938e28ac5befe972652c4ea
|
|
| BLAKE2b-256 |
f97dd9e8ca133406b6b332b345353f8cab8bba82e74a01c6e4ef99c7a839a90f
|