Is there a way to omit the visibility (lock symbol) marker in MetaUML Class objects? If I just refrain to use one I get a protected marker as a default.

A short example (note: the LaTeX builder has to be run with -shell-escape option):

\begin{mpost}[mpsettings={input metauml;},use]

("-private","+public","default protected", "#protectedWithNumberSign")


Just to have stated it: in section 2 Class Diagrams on page 6, the handbook says that # produces a protected marker (therefore I was tempted to think that omitting the marker symbol it would result in no marker), but in fact this produces such a marker plus a # sign.

  • 1
    @karlkoeller MetaUML is a Metapost package, which is surely on topic here. – egreg Dec 7 '13 at 13:38
  • Please, add a minimal example of code. – egreg Dec 7 '13 at 13:39
  • @egreg Didn't know that, voted for reopen. – karlkoeller Dec 7 '13 at 14:38
  • I added an example. I hope you'll find it descriptive... Thanks for the suggestion. – Marste Dec 8 '13 at 0:01
  • You would have to patch metauml_class.mp to get it to leave out the lock symbol. One approach would be to define a new access definition character, change addAttribute to accept it, and change Class_drawFeatures to omit the lock selectively. – Thruston Apr 26 '14 at 11:38

You can use Class_noVisibilityMarkers.

  ("#x:int", "#y:int")

Class_noVisibilityMarkers was not available in MetaUML 0.2.5, but it is now available from the master branch of https://github.com/ogheorghies/MetaUML .

  • Welcome to TeX.SX! Glad to see that MetaUML is being developed again. – egreg Jul 17 '15 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.