I have defined a new class. Within this class, I am calling on the hyperref package, and I set the following options:
\RequirePackage{hyperref}
\hypersetup
{
pdfauthor={...},
pdfsubject={...},
pdftitle={...},
}
Now, I have defined certain variables within this class (which I can call with \variablename{}
). However, if I use these within this package, as part of the option settings, then this fails (undefined control sequence). Am I not using the right syntax?
\RequirePackage{hyperref}
\hypersetup
{
pdfauthor={\variablename{}},
pdfsubject={\variablename{}},
pdftitle={\variablename{}},
}
I've read these questions (variable-name \newcommand with parameters within another \newcommand and Defining a newcommand, with variable name, inside another newcommand), but they are about newcommands... this is rather a regular package (hyperref) that I'm including, so I'm hoping it does not need to be this complicated)...
\variablename
? Can you post an MWE?