From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29967 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "dave....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Newsgroups: gmane.text.pandoc Subject: GitHub now supports MermaidJS Date: Thu, 13 Jan 2022 21:51:28 -0800 (PST) Message-ID: <6a978c09-0b8d-4199-862a-0a0b78955a41n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2190_1725269322.1642139488775" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37099"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC5J5BF74MJRBYM6QSHQMGQELHKTCQI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jan 14 06:51:32 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f184.google.com ([209.85.167.184]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n8FUp-0009V4-Ud for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 14 Jan 2022 06:51:31 +0100 Original-Received: by mail-oi1-f184.google.com with SMTP id v72-20020acaac4b000000b002c8dd559f44sf5350347oie.8 for ; Thu, 13 Jan 2022 21:51:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=rO7++WH4owuKtTwzXRqOEpd25XKks3h5iLWB2ftBQV8=; b=oAeWPusBbvreaE5CCzFKrQ7dvL85SbICYbrL30LZ+uZr3f+smnkzDs+Fy3LG7qU56V 08jVf4p02GB1joJIgWFFcJlBc0Wrhoy8WsV+GIledFhh6qxUJzy8shfQV79cGbWfi846 OR7O2zwKXMe5XtUdbYiL4xPJSexH0ZJgHsqHt5VYIl+w/4lOQWQvYxBycxQAlI6OpzjX lHH2xd5/qt308G/lBL/Zdvxpl5YsPEVbKMXlmSYNXMqp9e44cqQjXpezMnOABqE48dQf I3rAQlXQZqZtvQwQ9A9T3mRawugdNWGjfaHk5mrrnhGiGiz988Yv9CUXTRshJ3QzzDHq 8+nA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=rO7++WH4owuKtTwzXRqOEpd25XKks3h5iLWB2ftBQV8=; b=PEijI4EKHISRVrjK9bfYboON7QzqELIHQgHkl2ZXx8uh+8b0cvVxoshWRGDniydfaC NtAAtDEVq975ptruNZxd5BmCrMqSgoEyVW9AEabvVLdv7BIsbSS7U3HxPDIbFCcwNAWV aZgU829EO9wbJekk4QBy/xMFV0R+hQrKnpYbJYLc2MsydRjP74079Gm54+qS5TJvy8Ai lKb9nJdIR/IzZKsvmHJq66/r1X2QISXqyJhA7LN+kBQh2RSRNrc4hW2Q4dDy9C/bEn1+ Rk9I/YmZoFklC8iGvdxDLWw9fX/0YJljBNmeEKgLDY4+cVBqyQiwge6sWCSwWpHo/45p Rlyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=rO7++WH4owuKtTwzXRqOEpd25XKks3h5iLWB2ftBQV8=; b=SJK/E9ShFNvS8/i6JcIM5BzrhuZE2JxZf36mtzxxDw/q4sOZfINgC9sk1UhJNExwMx OFKlE5hDX9lnmZxYtVt63KgaWcUDYHy43HeHw8fsG4+hACh70qjZe3J2pUHvpZrUsVtF 8F1sxHnGm0iGpaTUoVHPMPEydIySrsDTTD9JiPbmwk6svFvjOSJsbXin7MOpaXZxim7n Jo7gTxZp8zNGRIdq8xaB2BsfHMqpMWgAZn+cacgn4suAEqdu3yaH0ju9BBzEliCIx+l9 kZFPYkAZj0Eq/MEEkqHP9Uy1Kn9bUr2rJmxlTlyZ35FI4xC7wmnzH7WOP4I3a8sfwHMT fOqg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532qs9K6/jTJj2h5nEPrDfoLpEQ/FTMWXuSbhdLKpVB2qWCPHMLj sCU2wm0J2nYTmlX8aNlb+DM= X-Google-Smtp-Source: ABdhPJw5wijqnOv/h9Z+BZl6f2epXV0zExm6g6u6oz3xnh0EI5t+ipQwKmxeO8fevOB0qn0Kfn6LaQ== X-Received: by 2002:a9d:69c3:: with SMTP id v3mr5892577oto.81.1642139490698; Thu, 13 Jan 2022 21:51:30 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:2209:: with SMTP id bd9ls24960oib.9.gmail; Thu, 13 Jan 2022 21:51:29 -0800 (PST) X-Received: by 2002:a54:440b:: with SMTP id k11mr8998370oiw.47.1642139489291; Thu, 13 Jan 2022 21:51:29 -0800 (PST) X-Original-Sender: dave.jarvis-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29967 Archived-At: ------=_Part_2190_1725269322.1642139488775 Content-Type: multipart/alternative; boundary="----=_Part_2191_2052540526.1642139488775" ------=_Part_2191_2052540526.1642139488775 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =20 Hi all, Some food for thought on simple code block namespaces. Re: https://github.com/github/markup/issues/533 I=E2=80=99m the main author of KeenWrite (see screenshots=20 ),= =20 a type of desktop Markdown editor that supports diagrams. It=E2=80=99s enco= uraging=20 to see that Mermaid diagrams are being supported in GitHub. There are a few= =20 drawbacks on the syntax and implications of using MermaidJS. First, only browser-based SVG renderers can correctly parse Mermaid=20 diagrams. I=E2=80=99ve tested Apache Batik, svgSalamander, resvg, rsvg-conv= ert,=20 svglib, CairoSVG, ConTeXt, and QtSVG. See issue 2485=20 . This implies that=20 typesetting Mermaid documents is not currently possible. In effect, by=20 including Mermaid diagrams, many documents will be restricted to web-based= =20 output, excluding the possibility of producing PDF documents based on=20 GitHub markdown documents (for the foreseeable future). Second, there are numerous text-to-diagram facilities available beyond=20 Mermaid. The server at https://kroki.io/ supports Mermaid, PlantUML,=20 Graphviz, byte fields, and many more. While including MermaidJS is a great= =20 step forward, supporting Kroki diagrams would allow a much greater variety.= =20 (Most diagrams produced in MermaidJS can also be crafted in Graphviz,=20 albeit with less terse syntax.) Third, see the CommonMark discussion thread=20 =20 referring to a syntax for diagrams. It=E2=80=99s unfortunate that a standar= d=20 =E2=80=9Cnamespace=E2=80=9D concept was not proposed. Fourth, KeenWrite integrates Kroki. To do so, it uses a variation on the=20 syntax: ``` diagram-mermaid ``` ``` diagram-graphviz ``` ``` diagram-plantuml ``` The diagram- prefix tells KeenWrite that the content is a diagram. The=20 prefix is necessary to allow using *any* diagram supported by a Kroki=20 server without having to hard-code the supported diagram type within=20 KeenWrite. Otherwise, there is no simple way to allow a user to mark up a= =20 code block with their own text style that may coincide with an existing=20 diagram type name. Fifth, if ever someone wants to invent a programming language named Mermaid= =20 (see MeLa=20 ),=20 then it precludes the possibility of using the following *de facto* syntax= =20 highlighting: ``` mermaid ``` My feature request is to add support for Kroki and the diagram- prefix=20 syntax. That is: ``` diagram-mermaid ``` And deprecate the following syntax: ``` mermaid ``` And, later, introduce the language- prefix for defining code blocks that=20 highlight syntax. That is, further deprecate: ``` java ``` With the following: ``` language-java ``` That would provide a =E2=80=9Cnamespace=E2=80=9D of sorts to avoid naming c= onflicts in the=20 future. --=20 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 e= mail 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. ------=_Part_2191_2052540526.1642139488775 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi all,

Some food for thought on simple code block nam= espaces.

Re: https://github.com/github/markup/issues/533

I=E2=80=99m the main author of KeenWrite (see scree= nshots), a type of desktop Markdown editor that supports diagrams. It=E2=80=99s=20 encouraging to see that Mermaid diagrams are being supported in GitHub.=20 There are a few drawbacks on the syntax and implications of using=20 MermaidJS.

First, only browser-based SVG renderers can correctly parse Mermaid=20 diagrams. I=E2=80=99ve tested Apache Batik, svgSalamander, resvg, rsvg-con= vert, svglib, CairoSVG, ConTeXt, and QtSVG. See issue 2485. This implies that typesetting Mermaid documents is not currently=20 possible. In effect, by including Mermaid diagrams, many documents will=20 be restricted to web-based output, excluding the possibility of=20 producing PDF documents based on GitHub markdown documents (for the=20 foreseeable future).

Second, there are numerous text-to-diagram facilities available beyond M= ermaid. The server at https://kro= ki.io/ supports Mermaid, PlantUML, Graphviz, byte fields, and many more. While including MermaidJS is a great step forward, supporting Kroki diagrams=20 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 referring to a syntax for d= iagrams. It=E2=80=99s unfortunate that a standard =E2=80=9Cnamespace=E2=80= =9D 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 d= iagram. The prefix is necessary to allow using any diagram supported by a Kroki server without having to hard-code the=20 supported diagram type within KeenWrite. Otherwise, there is no simple=20 way to allow a user to mark up a code block with their own text style=20 that may coincide with an existing diagram type name.

Fifth, if ever someone wants to invent a programming language named Merm= aid (see MeLa), then it precludes the possi= bility 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 cod= e blocks that highlight syntax. That is, further deprecate:

``` java
```

With the following:

``` language-java
```

That would provide a =E2=80=9Cnamespace=E2=80=9D of sorts to avoid namin= g conflicts in the future.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_2191_2052540526.1642139488775-- ------=_Part_2190_1725269322.1642139488775--