The readme says:
> Mermaid, Graphviz and D2 let you declare boxes and connections, then determine positions for you. If you have a particular picture in mind, these aren't the right tool.
D2's layout engine TALA [1] actually allows you to provide a lot of manual control. TALA used to be commercial, but is now open source.
In my own testing, TALA tends to produce much better layouts than Mermaid, including the ELK layout algorithm (which is not Mermaid's default; D2 also supports ELK).
TALA supports controlling direction per container, defining which shapes have to be near each other, and so on. I've not played with this yet, though.
Thanks for mentioning TALA. I feel like TALA does add more control than Mermaid, but in spirit sits closer to Mermaid than Reladraw. It keeps the auto layout, but with extra ways to coax the diagram into a different shape, by saying things like "keep this node pinned over here" or "keep these nodes close to one another".
For the diagrams I usually want to create, that's still not enough control to create what I envision.