In a class file, I have set (to automatically set PDF information fields):
\hypersetup{pdfinfo={Title={\@doctitle}, Author={\@docauthor}, Subject={\@docsubject}, Producer={LaTeX}, Version={\@docversion}, Date={\@docdate}, Institution={\@universityname}}} However, when I typeset documents using this class file (which works fine in every other respect), and look at document properties for the PDF, I get literal strings 'doctitle', 'docauthor' etc. for the various fields. That suggests that the LaTeX commands (which are defined and used elsewhere in class file) are not getting expanded.
What am I missing? Do I need to escape the '\' (which seems to be escaping the ampersand)?
So, \\@doctitle, and not \@doctitle. Or are the contents of {} simply treated as literal strings? If so, how do I achieve what I am trying to do.