tobiasah / mkdocs-caption

MkDocs plugin to add captions and easy element numbering
MIT License
3 stars 2 forks source link

request: caption in markdown format #14

Closed ronligt closed 3 months ago

ronligt commented 4 months ago

I'm a very happy user of this plugin!

Would it also be possible to use markdown format in the caption?

Now when I try:

Figure: Test **bold** text

![](image.png)

It will show the image with this caption below it: "Figure 1: Test" and nothing more. Where I was hoping to see: "Figure 1: Test bold text"

tobiasah commented 4 months ago

that is a cool idea... Need to see how It can be done within the mkdocs processor.

in the meantime I guess you can just use HTML syntax in the caption

tobiasah commented 4 months ago

😇 I tried a bit around and came up with the proposal in #16 . Would you mind trying it out before I merge it? Maybe you can give me some feedback if the change works as you had in mind.

ronligt commented 4 months ago

That's fantastic news! I would love to try out this new version. How can I do that?

I'm able to pull the branch from #16, but I'm not sure how to use the package src/mkdocs_caption in my mkdocs.yml

tobiasah commented 4 months ago

no need to manually clone, you can simply use pip to install the package directly form a branch.

pip install git+https://github.com/tobiasah/mkdocs-caption.git@markdown_syntax_in_caption