I'm trying to use TeX macros to store multiple data such as website url/name. Here is an example :
\documentclass{article}
\def\Google{{http://www.google.com}{Google Search}}
\makeatletter
\newcommand*\WebSiteName[1]{\@WebSiteName\expandafter#1}
\newcommand*\WebSiteUrl[1]{\@WebSiteUrl\expandafter#1}
\newcommand*\@WebSiteName[2]{#2}
\newcommand*\@WebSiteUrl[2]{#1}
\makeatother
\begin{document}
Name : \WebSiteName\Google \par
Url : \WebSiteUrl\Google
\end{document}
On this example, \WebSiteName\Google should write "Google Search" and \WebSiteUrl\Google should write "http://www.google.com".
But the problem is that \WebSiteName\Google writes http://www.google.comGoogle Search". I try to use \expandafter to combine two arguments in only one. Maybe that's the wrong method.