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

How can i check if the value in \thechapter or \value{chapter} is a letter or a number? That way i could identify if the counter is referring to a normal Chapter or an Appendix.

share|improve this question
up vote 6 down vote accepted

if you're using the book.cls, you can check this way:

  <whatever you want to do for an appendix>
\else <whatever you want to do for a regular chapter>

if you're using a different class, look for how \chaptername and \appendixname are used and adapt the above code appropriately.

share|improve this answer
Thank you. Didn't knew about \@chapapp! Very useful – Pedro May 28 '12 at 18:05

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.