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


<p>
<figure><img src="img.jpg" /><figcaption>caption</figcaption></figure>
<figure><img src="img2.jpg" /><figcaption>caption2</figcaption></figure>
</p>
image title and class (with attr_list extension)
{: .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 2
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-2.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| markdown_captions-2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.3 kB
Release files / markdown-captions-2.tar.gz
| Download URL | markdown-captions-2.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f653955d4ca22cbe84c39dc19693317ec2ce7a0af03cf5d44b349be7baf0dc97
|
|
BLAKE2b-256 checksum How to use checksums |
ef2a881766759ce520f7e858c21350bb4383a3896cf47080ddec10310cff1c7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.9
|
Release files / markdown_captions-2-py3-none-any.whl
| Download URL | markdown_captions-2-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0820b7ca1e7ea9041a0462584b4211d8023e6849709395fa34bfcd57c01bb49a
|
|
BLAKE2b-256 checksum How to use checksums |
88e41f007cdc598c9eb32c167112e6f872eaa007211c1350ebaf8907928c4a02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.9
|