Since I am not allowed, to open a new and clean thread, I will just line up with everybody and post my findings inhere, because otherwise they would just get wiped out by some moderator:
To bring a bit of clearance into this discussion, I conducted a little experiment, testing all mermaid graph types, that have some sort of arrow head:
I tested every type in the internal preview and exported to PDF, since this is the way I submit my work to the Professors at University. This table only shows the result, when the Preview failed to show the arrows, but it shows some strange behavior in conjunction with other parts of obsidian (See Strange preview behavior)
Surprisingly, the graph
type actually works correctly, but since this is the one, which is kind of deprecated from mermaid side, it is only a partial remedy! Every new feature like subgraphs are introduced into flowchart
instead!
Result
Markdown |
Preview |
PDF |
```mermaid
flowchart LR
A--> B
```
|
|
|
```mermaid
graph LR
A--> B
```
|
|
|
```mermaid
classDiagram
direction LR
A --|> B
```
|
|
|
```mermaid
sequenceDiagram
A->>+B: Test
```
|
|
|
```mermaid
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```
|
|
|
```mermaid
erDiagram
CUSTOMER }|..|{ ADDRESS : has
```
|
|
|
```mermaid
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
```
|
|
|
Quickly reproduce
`flowchart`
```mermaid
flowchart LR
A--> B
```
`graph`
```mermaid
graph LR
A--> B
```
`classDiagram`
```mermaid
classDiagram
direction LR
A --|> B
```
`sequenceDiagram`
```mermaid
sequenceDiagram
A->>+B: Test
```
`stateDiagram`
```mermaid
stateDiagram-v2
direction LR
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```
`erDiagram`
```mermaid
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
```
`requirementDiagram`
```mermaid
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
```
Environment
SYSTEM INFO:
Obsidian version: v0.14.15
Installer version: v0.14.15
Operating system: Windows 10 Pro 10.0.19044
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Safe mode: on
RECOMMENDATIONS:
none
Strange preview behavior
In short: The Editor view works correctly. Whenever a mermaid graph with specific type is shown in the preview and a graph with that same type is shown correctly in the editor (meaning with arrow heads and it is not being edited), the preview also renders arrow heads!
For better understanding, a few examples (To express that the types of the graphs are the only important thing here, I used different documents for boths view panes):
Legacy editor
When switching to the legacy editor, the preview actually renders the arrow heads correctly, but when you try to export it to PDF, it still does not work! And for me, this is the actual game breaker, because I cannot share my work!