TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently I had cause to define a macro called \marks. If I try something like


I get the error

! LaTeX Error: Command \marks already defined.

In LaTeX, if I do \show\marks I get > \marks=\marks, which I think means it's a TeX primitive, but if I execute the same show command in TeX, I get > \marks=undefined. I can't find \marks in any documentation that I have. What does it do?

share|improve this question
up vote 22 down vote accepted

\marks is an etex primitive command. It extends the \mark command of the original tex. You can use it to store text on the current page which you want to use at shipout in the headers.

\lhead{\topmarks\mymark, \botmarks\mymark, \firstmarks\mymark}
\marks\mymark{A first mark}

\marks\mymark{A second mark}


text \marks\mymark{A third mark}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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