Menu

[bug] Escaping of backslash in Graphviz labels

2017-08-16
2017-08-16
  • Martijn Schiedon

    Hi,

    I encountered a problem where a statement like below is not rendered correctly:

    path [label="\\path\\file.txt"]

    This becomes a box with the text athile.txt.

    Another demo is the dot fragment in the following article:
    https://stackoverflow.com/questions/34294445/how-can-i-use-in-a-label-in-graphviz-using-dot

    Could you verify if the escaping/de-escaping routines are implemented correctly for node/edge/cluster names and labels, and that special characters such as \n are also respected in (quoted) strings?

    Thanks!

     
    • Zoltán Turányi

      Hi,

      I have verified, it does not work as expected. :-(
      I will take a look.
      Zoltan

       
      • Zoltán Turányi

        Hi Martijn,

        Thanks for reporting this problem. I have now fixed the issue and uploaded the 5.6.5 version. Could you please check if this works OK for you?

        Please note that this is not a completed release as it contains half-baked Block Diagram code. But the signalling chart and graph code is final, and you can go on using them until the next stabile version comes out.

        Please feel free to contact me if there is any more problems or feature requests. Please use the "Tickets" menu to submit bugs and feature requests.

        Z

         
  • Martijn Schiedon

    Hi Zoltan,

    Thanks for fixing this, escaped characters work as expected now, also on version 6.0!

    Kind regards,
    Martijn

     
    • Zoltán Turányi

      Splendind, thanks. BTW, how do you use Msc-generator? Do you use the signalling part, as well? Do you use it to embed graphics into word or powerpoint? How large graphs do you have? How often do you use it? (Just curiosity.)
      Z

       
  • Martijn Schiedon

    Hi Zoltan,

    I started out using the signalling part 4 or 5 years ago actually, to be able to quickly flesh out (and validate) processes as found in SOA-environments, where multiple applications exchange messages with each other through service calls. There were a lot of similarities to message sequence charts. I specifically searched for a tool supporting text-based specification, because I like to focus on the content, not the pixel-perfect drawing part. So, more keyboard, less mouse, and intelligent placement of shapes. For this particular application I sort of worked around the fact that service/endpoint re-use is harder to capture with the MSC philosophy. These diagrams become as large as the process is, so they're often limited in size. One of the larger ones probably had 20 entities/swimlanes and 40-50 interactions/rows.

    More recently, I'm using the graph feature (DOT language) to capture the applications and application components of a whole application landscape and their interactions with an ESB. These can become (very) large, and may also be generated from multiple sources. The graphic representation has proven to be quite insightful, though I am sometimes struggling with the (non-overlapping) routing of edges, which I can attribute to a lack of fully understanding DOT and the rendering engines. These often consist of hundreds of nodes, clusters and edges. I'm now investigating of the block language is a good alternative for this use case.

    Generally, I copy and paste the diagrams as MSC chart or Windows Metafile. But I'm also an enthousiastic user of markdown (Typora on Windows and Atom), and I sometimes use embedded Mermaid diagrams. If at all technically possible, it would be nice to have the MSC texts also render inside a code block. But I'm already very grateful for what you offer with the current version of Msc-generator, and what you announced for the near future!

    Kind regards,
    Martijn

    P.S. I can share some diagrams through PM if you're interested.