I'm trying to write a c.v. macro. I've got a first, middle and last name and I would like to arrange these as either "first middle last" or as "first last" if middle is unknown
The code I have so far is as follows (which works) :
\def\@normalname{
\@ifundefined{@middlename}
{
\@firstname\ \@lastname
}{
\@firstname\ \@middlename\ \@lastname
}}
and a shorter version that doesn't
\def\@normalname{
\@firstname\
\@ifundefined{@middlename}{}{\@middlename\ }
\@lastname
}
Any reason why the code would fail in the second case ?
(using pdfLatex if it helps)