mermaidjs/mermaid-gitbook

EE System diagram mode: hide "end" and "begin" blocks for flowchart mode?

Opened this issue · 2 comments

Any chance you could add a "graph-ee" mode so that flowchart works to make "Electrical Engineering System Diagrams"?

First what is needs is a way to hide the "Start" and "end blocks and only show the arrow.

Instead of:

graph LR;
Start-->|x|C/D;
C/D-->|y|D/C;
D/C-->|z|End;

Example Linkage line:

BLOCK_ID [BLOCK_LABEL] (BLOCK_ATTRIBUTE) --> |ARROW_LABEL| BLOCK_ID

BLOCK_ID is for connecting the nodes of your netlist together....
BLOCK_LABEL is for labelling the blocks.... optional... if not provided then BLOCK_LABEL = BLOCK_ID 
BLOCK_ATTRIBUTE is for hiding the block and showing the arrow only...

Also, Embedded mathjax is allowed '(' and ')' and between '|' and '|". Example of what it looks like all together:

graph-ee LR;
NodeStart (Hide)                              -->|$X(j\Omega)$| Node1;
Node1 [C/D]                                     --> |$X(e^{j\omega}$|  Node2 ;
Node2 [System $H(e^{j\Omega)$]  --> Node3;
Node3 [D/C]                                    -->|$Y(j\Omega)$| NodeEnd (Hide);

Anyways... just trying to give you some ideals to make your mermaid tool useful to electrical and computer engineers... if you can build this type of system diagram and insert mathjax inside of the "block label" and "arrow label" using the $...$ escape sequence to call mathjax to render latex math equations… then it becomes an extremely usseful tool for electrical and computer engineers to write their notes entirely in markdown .... See here for an example for example of what graph-ee mode needs to look like: http://dspfirst.gatech.edu/database/?d=homework&chap=4

I think part of the problem with your current tree format is that you need to have the opinion to separate the node-id from the node-label so that users can write more complicated node labels that include mathjax in them.....

note: http://dspfirst.gatech.edu/database/?d=homework&chap=4 shows some up/down arrows...which you can ignore.... I would consider 100% useful if it only supported left to right arrows and ignore support for up/down arrows.... there are really tons of EE system diagrams that mermaid would be useful for if made the modification suggested above (or similar)... for example, just about every communications system diagram is a Left-to-right flow with math equations on the arrows and inside of the blocks... encryption system diagrams.... compression system diagrams...etc.... etc….

Here's an other example:
https://www.elprocus.com/pulse-code-modulation-and-demodulation/
notice that they have hidden the start and end blocks on the diagram... and just show the arrow with a label.... maybe another attribute could be to just hide the outline of the "start" and "end" blocks...so the text appears as an "input" or "output" of the system....

Here's another example:
https://www.chegg.com/homework-help/questions-and-answers/5-consider-block-diagram-multirate-dsp-system-given-fig-7-figure-7-block-diagram-multirate-q28806708
(Notice the again... start and end block hidden...arrows only with a label... and the need for allowing mathjax on the arrow label and block label

Another example:
https://www.researchgate.net/figure/Figure-A5-A-block-diagram-of-a-discrete-time-system-showing-signals-in-graphic-form_fig24_33517624

Another Example:
http://ctms.engin.umich.edu/CTMS/index.php?example=CruiseControl&section=ControlPID

Another Example:
http://ctms.engin.umich.edu/CTMS/index.php?aux=Extras_Ess

Another Example:
https://www.chegg.com/homework-help/questions-and-answers/consider-cascade-lti-system-inverse-system-shown-figure-p529-impulse-response-first-system-q4558554

This seems to be an issue with https://github.com/knsv/mermaid and not with this repository (this repo is only for the gitbook documentation)