Even though it seems to be a non-standard position, I'd like to place my document's page numbers vertically centered in the outer page margin – i.e. where you usually have your thumb when you skim through a book.

How can I achieve that with scrbook? As far as I can see the only predefined positions for page numbers are in the header and footer.

  • Thanks Gonzalo and egreg, both of your solutions work. I prefer egreg's one because it goes without an additional package and because it's way beyond my LaTeX skills :) p.s. I'm sorry to post this as an answer to my own question, but SX doesn't recognize me. I guess it's because I posted the question as unregistered user and now I'm registered (even though I used the same email address - anyways). Also I'm sorry for not being able to mark the question answered and give credits :( – Matthias Jul 29 '11 at 20:38
  • 3
    I merged your two accounts together now (the questions was asked with an unregistered account). I also converted your post to a comment. Don't worry about it. You can now place comments here and also accept your favored answer to conclude the question. Welcome to TeX.sx! – Martin Scharrer Jul 29 '11 at 20:58
  • 2
    @Martin: Wow, that was quicker than quick! I was in the means of writing a mail about this, but it seems I don't need to send it anymore :) Great site, great people! – Matthias Jul 29 '11 at 21:04
  • Note that you can flag posts for moderator attention which will be noticed very quickly. Use the 'flag' link below each post to do so. There is also the chat and our TeX - LaTeX Meta site. – Martin Scharrer Jul 29 '11 at 21:26

Another solution with only KOMA-Script tools (and some low level trickery):

  \vbox to 0pt{
    \hbox to 0pt{\Huge\normalfont
      \if#1o\kern 2em\else\hss\fi\thepage

I use the normal footer, putting into it a zero height box that contains a zero width box that is raised to the center of the text block; in it the page number is typeset shifted on the right or on the left depending if we are in an odd or even page.


You can use the background package; a little exampe:






You could also use KOMA-Script package scrlayer-scrpage. It is the successor of the deprecated package scrpage2.

scrlayer-scrpage uses layer to declare pagestyles. So you can declare a new layer for the pagenumber in the outer margin and add this layer to pagestyle scrheadings and plain.scrheadings. Note that after loading scrlayer-scrpage pagestyle scrheadings is set and pagestyle plain is redefined as an aliaspagestyle for plain.scrheadings.




\usepackage{blindtext}% <- only for dummy text

results in

enter image description here

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.