# print document author last name, firstname with abntex

Hi I'm editing a sty document and I am trying to get print the author's name (that was declared in the preamble like this

\titulo{Title}
\autor{First mid. last name}


and I am using the command \imprimirautor to print the author's name like it is declared in the preamble. but how do I print it in the format of last name, first name?

this is the portion of the sty that I am trying to get this to work

\newcommand{\insereFichaCatalografica}{
\begin{fichacatalografica}%\color{blue}

{
\vspace*{\fill}                 % Posição vertical
%\hrule                         % Linha horizontal
\begin{center}
pelo(a) autor(a) através do Módulo de Biblioteca do \\
Sistema GURI (Gestão Unificada de Recursos Institucionais) .

\end{center}
\vspace{-15 mm}
\begin{minipage}[c]{10cm}       % Largura

\end{minipage}
\end{center}

\vspace{0cm}
\fbox{
\begin{minipage}[c]{12.5cm}     % Largura

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%% here is suposed to be last name, first name %%%%%%%%%%%
\imprimirautor

\hspace{0.5cm} \imprimirtitulo  / \imprimirautor. --
\imprimirlocal, \imprimirdata-

\hspace{0.5cm} \pageref{LastPage} p. : il. (algumas color.) ; 30 cm.\\

\hspace{0.5cm}
\\

\hspace{5mm}
\parbox[t]{\textwidth}{\imprimirtipotrabalho~--~\imprimirinstituicao,
\imprimirdata.}\\

\hspace{5mm}
\begin{minipage}{.80\textwidth}
1. \PalavraschaveTexto

II. \imprimirinstituicao

III. \imprimirCurso

IV. \imprimirtitulo\\

\end{minipage}
\end{minipage}
\end{center}
}
%\hrule
}
\end{fichacatalografica}
}

• I guess you could just write down the author's name (how many times do you use it, anyway?). It would save you all the hassle. – Joseph Aug 28 at 23:49

\def\testnameswap#1{\nameswap#1\relax}