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.
![alttext](http://example.com/image.png "caption")
This will be converted to:
<span class="img_container center" style="display: 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 ![alttext](http://example.com/image.png "caption"){: .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 Distribution
Built Distribution
Close
Hashes for markdown-image-caption-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ec985d9a1f32aa306ab4a77e287f0de47a625eece8bf592fad9ca80100cfda8 |
|
MD5 | 576c4f8e583c07f9432adc9ee0e16e57 |
|
BLAKE2b-256 | bf5a0142e38b9adea149b3b5e4ee6390dd09fdb9d656b8766b8c795c18d11c87 |
Close
Hashes for markdown_image_caption-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f3e0b38ee3801344725817a92630a73917d21f153876e5726cf35d58eb7777d |
|
MD5 | d9d8c7ebf0ecd70a39f8d77d1276649e |
|
BLAKE2b-256 | 959c2bdc137af319f04fec684bcb812cad6283c8b82b8037c502b3a343aabc51 |