One of the problems I encountered was that sometimes, mkdocs-caption cannot handle captioning a figure (or anything else) in edge cases. For example, I used a PDF object as a figure, but since Markdown syntax doesn't accept PDF objects in image syntax, I had to write my own HTML, putting PDF inside figure element with caption element inside.
Instead of supporting all the possible combinations, users should be able to write their own HTML (with figure and caption elements) from time to time. When they do so, there should be a way to notify mkdocs-caption that "I created a figure caption manually; please increment the counter by one."
Currently, if you write your own HTML, the counter doesn't know it, and there is no way to increment it manually.
My proposal:
I think the simplest way to approach this would be allow users to add blank images to their markdown:
![blank]()
This shouldn't render any caption or figure in HTML, but it should increment the counter by one.
One of the problems I encountered was that sometimes,
mkdocs-caption
cannot handle captioning a figure (or anything else) in edge cases. For example, I used a PDF object as a figure, but since Markdown syntax doesn't accept PDF objects in image syntax, I had to write my own HTML, putting PDF insidefigure
element withcaption
element inside.Instead of supporting all the possible combinations, users should be able to write their own HTML (with
figure
andcaption
elements) from time to time. When they do so, there should be a way to notifymkdocs-caption
that "I created a figure caption manually; please increment the counter by one."Currently, if you write your own HTML, the counter doesn't know it, and there is no way to increment it manually.
My proposal:
I think the simplest way to approach this would be allow users to add blank images to their markdown:
This shouldn't render any caption or figure in HTML, but it should increment the counter by one.