MWE
\documentclass[11pt,a4paper]{exam}
\lhead{\fbox{\textbf{LEFT}}}
\newcommand[\macrol]{\lhead{\fbox{\textbf{LEFT}}}}
\rhead{\fbox{\textbf{RIGHT}}}
\newcommand[\macrol]{\lhead{\fbox{\textbf{RIGHT}}}}
\begin{document}
First Page
\newpage
The content of lhead is \macrol.
The content of rhead is \macror.
\end{document}
My purpose is to call \lhead
or \rhead
from anywhere in the text with a macro.
Thanks.
\lhead
command. How do you want the choice to be made?\lhead
and\rhead
values that can be used later on the document. I want to define a macro but this macro will be to read the contents of\lhead
and\rhead
.