* GitHub now supports MermaidJS
@ 2022-01-14 5:51 dave....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[not found] ` <6a978c09-0b8d-4199-862a-0a0b78955a41n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: dave....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2022-01-14 5:51 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 3455 bytes --]
Hi all,
Some food for thought on simple code block namespaces.
Re: https://github.com/github/markup/issues/533
I’m the main author of KeenWrite (see screenshots
<https://github.com/DaveJarvis/keenwrite/blob/master/docs/screenshots.md>),
a type of desktop Markdown editor that supports diagrams. It’s encouraging
to see that Mermaid diagrams are being supported in GitHub. There are a few
drawbacks on the syntax and implications of using MermaidJS.
First, only browser-based SVG renderers can correctly parse Mermaid
diagrams. I’ve tested Apache Batik, svgSalamander, resvg, rsvg-convert,
svglib, CairoSVG, ConTeXt, and QtSVG. See issue 2485
<https://github.com/mermaid-js/mermaid/issues/2485>. This implies that
typesetting Mermaid documents is not currently possible. In effect, by
including Mermaid diagrams, many documents will be restricted to web-based
output, excluding the possibility of producing PDF documents based on
GitHub markdown documents (for the foreseeable future).
Second, there are numerous text-to-diagram facilities available beyond
Mermaid. The server at https://kroki.io/ supports Mermaid, PlantUML,
Graphviz, byte fields, and many more. While including MermaidJS is a great
step forward, supporting Kroki diagrams would allow a much greater variety.
(Most diagrams produced in MermaidJS can also be crafted in Graphviz,
albeit with less terse syntax.)
Third, see the CommonMark discussion thread
<https://talk.commonmark.org/t/mermaid-generation-of-diagrams-and-flowcharts-from-text-in-a-similar-manner-as-markdown/1882>
referring to a syntax for diagrams. It’s unfortunate that a standard
“namespace” concept was not proposed.
Fourth, KeenWrite integrates Kroki. To do so, it uses a variation on the
syntax:
``` diagram-mermaid
```
``` diagram-graphviz
```
``` diagram-plantuml
```
The diagram- prefix tells KeenWrite that the content is a diagram. The
prefix is necessary to allow using *any* diagram supported by a Kroki
server without having to hard-code the supported diagram type within
KeenWrite. Otherwise, there is no simple way to allow a user to mark up a
code block with their own text style that may coincide with an existing
diagram type name.
Fifth, if ever someone wants to invent a programming language named Mermaid
(see MeLa
<https://pdfs.semanticscholar.org/7d75/49b737fd1d85bdaee016681e8915fea81ad9.pdf>),
then it precludes the possibility of using the following *de facto* syntax
highlighting:
``` mermaid
```
My feature request is to add support for Kroki and the diagram- prefix
syntax. That is:
``` diagram-mermaid
```
And deprecate the following syntax:
``` mermaid
```
And, later, introduce the language- prefix for defining code blocks that
highlight syntax. That is, further deprecate:
``` java
```
With the following:
``` language-java
```
That would provide a “namespace” of sorts to avoid naming conflicts in the
future.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6a978c09-0b8d-4199-862a-0a0b78955a41n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 4226 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-14 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 5:51 GitHub now supports MermaidJS dave....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[not found] ` <6a978c09-0b8d-4199-862a-0a0b78955a41n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-01-14 15:33 ` Albert Krewinkel
[not found] ` <87tue6uxxy.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-01-14 16:59 ` dave....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).