First Page

The content of lhead is \macrol.

The content of rhead is  \macror.


My purpose is to call \lhead or \rhead from anywhere in the text with a macro.

enter image description here


  • I'm sorry but I don't understand what you want. There's no problem to put a macro inside the \lhead command. How do you want the choice to be made? – Alan Munn Dec 3 '17 at 22:23
  • I apologize for not telling you exactly. I edited the problem and added new image. Can you check? – Özgür Dec 3 '17 at 22:32
  • I'm sorry but I still don't understand. Do you want to define a macro that saves the value of \lhead and \rhead which can then be used in the document. – Alan Munn Dec 4 '17 at 0:06
  • I want to write that I'm sorry again. No I do not want to define a macro without saving the \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. – Özgür Dec 4 '17 at 4:59

Here's a simple way to do what you want:


First Page
Booklet Choice \savedlhead\ or \savedrhead.

output of code

| improve this answer | |
  • The explanation you wrote provided me with good information. – Özgür Dec 3 '17 at 21:25
  • 1
    @Özgür if the answer helped you it's helpful to "Accept" it by clicking on the green checkmark beside it. – Alan Munn Dec 3 '17 at 21:30
  • I edited the problem. Can you check? – Özgür Dec 3 '17 at 21:40
  • I took your precious time. – Özgür Dec 4 '17 at 5:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.