I would like to define a command that takes an input, passes through a list to generate another variable and then is fed to \href to give a link.
As in the following example:
\documentclass[11pt, a4paper]{article}
\usepackage{hyperref}
\usepackage{forarray}
\DefineArrayVar{Names}{@}
{,}{aaa,bbb,ccc}
{,}{Einstein,Newton,Leibnitz}
\newcommand{\links}[1]
{\csname Names@#1\endcsname\
}
\newcommand*{\newhref}[1]{\href{http://en.wikipedia.org/wiki/\links{#1}}{\links{#1}}}
\begin{document}
Here is a page about \newhref{aaa}.
\end{document}
However the link I obtain is highlighted but doesn't link to anything. What is going wrong? Thank you!