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
    Commented Dec 7, 2013 at 13:38
  • Please, add a minimal example of code.
    – egreg
    Commented Dec 7, 2013 at 13:39
  • @egreg Didn't know that, voted for reopen. Commented Dec 7, 2013 at 14:38
  • I added an example. I hope you'll find it descriptive... Thanks for the suggestion.
    – Marste
    Commented Dec 8, 2013 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
    Commented Apr 26, 2014 at 11:38

1 Answer 1


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
    Commented Jul 17, 2015 at 19:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .