Open LuisBL opened 2 years ago
Using the raw
format on a Sphinx project that already has FontAwesome works for me. When this happens, the output diagram is an svg
object directly in the generated HTML.
When I use the svg
format and mmdc
is used, a file is referenced with a <object data="_images/mermaid-e69675f27cbad9b86a0cf3d0587fabe390ac1501.svg" type="image/svg+xml">
It would be nice with an option to keep generating the SVG but to have all of the contents directly injected into the HTML structure in an <svg>
tag, same as what raw
amounts to. That way, CSS rules will work without injecting into the <object>
frame.
I think the fact that this works on mermaid-live-editor is that they inject something into the generated SVG?
https://github.com/mermaid-js/mermaid-live-editor/pull/849/files
Any news on this one ?
The documentation has been update to deal with Font Awesome v6.5.1 but still no working despite <link href=... set my side
Adding this snippet in the
would add support for Font Awesome v6.5.1 html<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" rel="stylesheet" />
Right now I get it working (in both html and latexpdf) with this modification on conf.py
extensions = ['sphinxcontrib.mermaid']
fonta = 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css'
def setup(app):
app.add_css_file(fonta)
Mermaid as basic support for fontawesome Cf. https://mermaid-js.github.io/mermaid/#/flowchart?id=basic-support-for-fontawesome
It's working with cli and on live-editor with e.g.
see it on live-editor
I guess that should be something like below (not working my side):
The CDN way
on
conf.py
set themermaid_fontawesome_uri
variable:that will make sphinxcontrib-mermaid add the below
<link
to the header:Or to have it working offline:
download the version 5 kit