Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Can't use escaped special character in class name #3

Open
GoogleCodeExporter opened this issue May 7, 2015 · 2 comments
Open

Can't use escaped special character in class name #3

GoogleCodeExporter opened this issue May 7, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
- Use an escaped special character in a class name (mostly "\_", "\$", ...).

What version of the product are you using? On what operating system?

I'm using pgf-umlcd-0.2.1 on linux (Archlinux).

Please provide any additional information below.

There should be a way to give the displayed name independently of the internal 
class name (that could be used as default otherwise).

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 4:40

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 31 Jan 2012 at 1:58

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@davidschnermann
Copy link

davidschnermann commented Jun 16, 2022

Maybe it's better to use a label to write the name of the class instead of the shape-name (ID) itself. I made a workaround by adding a label argument to the class-environment.

\renewenvironment{class}[4][]% add another argument
	{
		\def\umlcdClassLabel{#4}% define label here 
		\begin{classAndInterfaceCommon}{#1}{#2}{#3} 
	}%
	{
		\calcuateNumberOfParts{}
		% another change is in the following line, where "anchor=north" was moved before "this umlcd style" % this is an other tip from https://github.com/xuyuan/pgf-umlcd/pull/16
		\node[anchor=north,this umlcd style] (\umlcdClassName) at (\umlcdClassPos)
		{\textbf{\umlcdClassLabel} % ClassLabel instead of ClassName (ID)
			\insertAttributesAndOperations{}
		};
		\end{classAndInterfaceCommon}
	}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants