SourceForge has been redesigned. Learn more.

Using (La)TeX for rendering labels

  • Achim D. Brucker

    I think, it would be nice if one could use (La)Tex to render the metauml labels. This would one allow to 1) easily use a consistent font setup in the document and the UML diagrams and 2) to use mathematical notion within the labels, e.g., for notes.

    I did a quick 'proof-of-concept' hack which is attached to the feature request 1459267. This patch extends the FontInfo structure with an "latex" attribute; if this attribute is true, the text will be rendered by TeX/LaTeX (using textext from latexmp). Otherwise the text will be rendered as before. At the moment, all other font information (size, etc.) are ignored for the text rendred via LaTeX.

    What do you think about such an feature?


    • Ovidiu Gheorghies

      Interesting patch! My main concern with it is how are things going to be alligned: in particular, would it still be possible to properly allign the texts "yyy" and "aaa" at the bottom? I'll make some experiments myself and hope to have the patch included in the release by the end of the week.

      Best regards,

    • Achim D. Brucker

      That's why I called it a 'proof-of-concept' hack :-). Yes the allignement is a problem. A dirty solution would be, to generate something like '\vphantom{gh}' at the beginning of every label/text. Albeit, I think using LaTeX for rendering is most useful for the contents of Notes, which could be completely put into a parbox (here, the alignment problem shouldn't matter). But that's just a quick idea. 

    • Ovidiu Gheorghies

      Sure thing, it would look great on notes. I'm working to include it in the release as an experimental feature.

    • Ovidiu Gheorghies

      Experimental feature added to release 0.2.4, awaiting feedback...


Log in to post a comment.