Note: I'm writing this in a class file, therefore you may need to use
\makeatletter
and \makeatother
in the appropriated places.Code: Select all
\newcommand*{\@name}{}
\newcommand*{\name}[1]{\renewcommand*{\@name}{#1}}
\newlength{\nameLength}
\settowidth{\nameLength}{{\huge \@name}}
\name{Matthew Parnell}
sets the variable \@name
to "Matthew Parnell".Now what I'm trying to do, is to create a length
\nameLength
with the length of whatever the \@name
variable holds, in 'huge' font-size.Now my problem here is that it's setting the length to the length of the string "\@name" not the string the variable contains.
Currently I'm using
\settowidth{\nameLength}{{\huge Matthew~Parnell}}
to solve the problem for now; but as you can see, it's a temporary fix until a true solution is found.Anyone have any ideas? …I can't seemed to find one elsewhere.
Thank You