markdown-captions
Converts images with alt text to <figure> with <figcaption>.
Works with attr_list extension.
Usage
pip install markdown-captions
md = markdown.Markdown(extensions=['markdown_captions'])
Examples
simple example


<p>
<figure><img src="img.jpg" /><figcaption>caption</figcaption></figure>
<figure><img src="img2.jpg" /><figcaption>caption2</figcaption></figure>
</p>
image class and title
{: .class1 }
<figure class="class1"><img src="img.jpg" title="title" /><figcaption>caption</figcaption></figure>
inline captioned images
<style>
.inline {
display: inline-block;
}
</style>
{: .inline }
{: .inline }
<p>
<figure class="inline"><img src="img.jpg" /><figcaption>caption</figcaption></figure>
<figure class="inline"><img src="img2.jpg" /><figcaption>caption2</figcaption></figure>
</p>
images with no alt text are not captioned

<img src="img.jpg" />
Metadata
Release files for markdown-captions 1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| markdown-captions-1.tar.gz | 2.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| markdown_captions-1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.8 kB
Release files / markdown-captions-1.tar.gz
| Download URL | markdown-captions-1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b19bebfcc0911a07f09b82ec5fb1f088d84b27eb09e1b5795642c80e224eb27
|
|
BLAKE2b-256 checksum How to use checksums |
872a342d5dfd3db7c93e66b588fda33ca2c42a56e03e0df1e3c7c14f264f1d4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8
|
Release files / markdown_captions-1-py3-none-any.whl
| Download URL | markdown_captions-1-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbbb4bef5be950aac99c3cf84d689d4b5b76f843bd670972ae4b0fe8b7cb60d6
|
|
BLAKE2b-256 checksum How to use checksums |
0d06049a6cb64713debc1a4cef75e49407f96476e976a515dbe4afcd346e91ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8
|