Closed aubertc closed 3 weeks ago
Actually since mermaid supports class diagrams, and since both quartz and pandoc (with a filter) supports mermaid, we may want to switch to this formalism instead of doing "table in text format".
Ok, thinking out loud: processing this file
with pandoc -t html -F mermaid-filter -o something.html test.md
gives a html
file
<p><img src="TEST.png" title="fig:" alt="TEST" /></p>
and the TEST.png image attached.
removing loc=.
from the .md
file and processing it with
export MERMAID_FILTER_CAPTION=$(sed -e '1d;$d;/classDiagram/d' test.md) && pandoc -t html -F mermaid-filter -o something.html test.md
gives a cleaner html file (with the image embedded as a svg as a uri-data):
<p><img
src="[data:image/png;base64,iVBORw0KGg…mCC)"
title="fig:" alt="class ClassName {
-attribute : type
+SetAttribute(attributeParameter: type) void
+GetAttribute() type
+Method(paramName: type) type
}"
but there are two issues with that:
Ok, what we could do is generate the .md first, using
export MERMAID_FILTER_CAPTION=$(sed -e '1d;$d;/classDiagram/d' test.md) && pandoc -F mermaid-filter -o test2.md -fmarkdown-implicit_figures test.md
and then use that file. Using -fmarkdown-implicit_figures
when using that file remove the (useless?) caption, but still messes up the figure's title.
Ok, it has been implemented:
and documented:
The changes implemented with https://github.com/princomp/princomp.github.io/commit/c7de98ba77c83691d6f6ae24df094b79751e5bf1 should be added to the documentation and explained.