Skip to main content

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: 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 ![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"])

Metadata

Release files for markdown-image-caption 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for markdown-image-caption 0.3.0
File Interpreter ABI Platform Actions
markdown_image_caption-0.3.0-py3-none-any.whl Python 3 none any Details for markdown_image_caption-0.3.0-py3-none-any.whl

Release files / markdown_image_caption-0.3.0-py3-none-any.whl

Download URL markdown_image_caption-0.3.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04229aa960e2d2924d37123427eb4c27be0e3c46529d70b008f391ac4a72783b
BLAKE2b-256 checksum
How to use checksums
f97dd9e8ca133406b6b332b345353f8cab8bba82e74a01c6e4ef99c7a839a90f
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for markdown-image-caption 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page