1

I need a uml class-diagram and I am using pgf-umlcd. My "Classes" do not have attributes (because it is a C-Interface). But the attibute section is still drawn and i could not find an option to remove it .

My classes look like this :

______________________
|                    |
| class name         |
|--------------------|
|--------------------|
|                    |
| some functions.... |
| more functions.....|
|...                 |
---------------------

I'd like to remove the attribute-section:

______________________
|                    |
| class name         |
|--------------------|                 
| some functions.... |
| more functions.....|
|...                 |
----------------------

Minimal example:

\documentclass[tikz,border=10pt]{standalone}
\usepackage{tikz}
\usepackage{pgf-umlcd}
\begin{document}
\begin{tikzpicture}
\begin{class}[text width=7cm]{test}{0,0}
    \operation{execute(cmd : command) : abct}
\end{class}
\end{tikzpicture}
\end{document}

Please help me :D I couldn't find anything in the documentation...

1

Actually, it's basically the first thing that's said in the documentation:

Note: If you don’t want to show empty parts in the diagrams, please use simplified option, e.g. \usepackage[simplified]{pgf-umlcd}.

output of code

\documentclass[tikz,border=10pt]{standalone}
\usepackage[simplified]{pgf-umlcd}
\begin{document}
\begin{tikzpicture}
\begin{class}[text width=7cm]{test}{0,0}
    \operation{execute(cmd : command) : abct}
\end{class}
\end{tikzpicture}
\end{document}

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.