Help:Using Mermaid together with Semantic MediaWiki

While it is not technically a results format, can be used to generate graphic output from an inline query. requires Mermaid as well via.

This might be an alternative for people who cannot install required by results formats  and  because they do not have sudo/admin rights on their server that are required to install graphviz and mscgen required by that extension.

Setting up Mermaid
See Mermaid Installation

Using Mermaid
See Mermaid Usage

Using Mermaid with Semantic MediaWiki
To use Mermaid with Semantic MediaWiki, use an inline query that uses a template to generate mermaid syntax inside a mermaid tag.

Some important considerations:
 * use the with import-annotation=yes (or  for Semantic MediaWiki < 3.0.0)
 * mermaid ids (the first parts on lines in mermaid syntax) can't have spaces, so if you are using page names, they would have to be page names without spaces; one work around is to declare a guaranteed unique property such as
 * several queries with different templates within the mermaid tag may be needed to get all the mermaid syntax generated
 * Mermaid will not show the graph in preview mode, you need to save it (like some other results formats)
 * do not use  or similar in your template - this works when the template is viewed and the output copied into a mermaid tag, but breaks when the query is in the mermaid tag
 * it may be necessary to start the template call with a blank line

Example
When I set up the example there was no Mermaid on this wiki, so please see
 * https://wiki.umintmed.ca/index.php?title=User:Ttenbergen/Mermaid_example