Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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
2  
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
1  
@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

2 Answers 2

up vote 6 down vote accepted

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

\usepackage{scrpage2}
\pagestyle{scrheadings}
\setlength{\footskip}{0pt}
\rofoot[\centerpageno{o}]{\centerpageno{o}}
\lefoot[\centerpageno{e}]{\centerpageno{e}}
\def\centerpageno#1{\leavevmode
  \vbox to 0pt{
    \vss
    \hbox to 0pt{\Huge\normalfont
      \if#1o\kern 2em\else\hss\fi\thepage
      \if#1o\hss\else\kern2em\fi}
    \vskip.5\textheight
    \vskip\baselineskip}}

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.

share|improve this answer

You can use the background package; a little exampe:

\documentclass[twoside]{scrbook}
\usepackage{background}
\usepackage{ifthen}
\usepackage{lipsum}

\SetBgContents{}
\SetBgAngle{0}
\SetBgColor{black}
\SetBgScale{3}

\makeatletter
\AddEverypageHook{%
  \ifthenelse{\isodd{\value{page}}}%
  {\SetBgPosition{1.05\textwidth,-.5\textheight}}
  {\SetBgPosition{0.3,-.5\textheight}}
  \SetBgContents{-\thepage-}
  \bg@material%
}
\makeatother

\pagestyle{empty}

\begin{document}
\lipsum[1-30]
\end{document}
share|improve this answer

Your Answer

 
discard

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.