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.

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 to create a coloured page border for a document using KOMA-Script scrbook class?

Something like this:

enter image description here

(image taken from the memoir tutorial)

share|improve this question
Have a look on Page Bordering with an image?, which seems to be similar enough. – Martin Scharrer May 14 '11 at 13:16
You could have e-mailed me or left a comment to ask how I did it - I wrote that blog post and that sample page! ^_^ Anyway @Toby gave the correct answer, and it's true that I wrote about the memoir way, the book way (using fancyhdr) but not the scrbook way. – LianTze Lim May 16 '11 at 9:28
up vote 7 down vote accepted

You could use TikZ

This example can give an idea how to use it:


    \begin{tikzpicture}[remember picture, overlay]
        % page frame
        \fill [red] (current page.north west)
            rectangle (current page.south east);
        \fill [white, rounded corners=1cm] ($(current page.north west)+(1cm,-1cm)$)
                    rectangle ($(current page.south east)+(-1cm,4cm)$);
        \node [fill=green, text width=1.5cm, align=center] at
            ($(current page.south)+(0,4cm)$) {\strut\pagemark};
            % \strut gives all page mark nodes the same hight.
% set page style


When using different definitions of \cehead and \lefoot (or other heading-commads) you can define different borders for left and right pages. You can even “draw” the pagemark with the TikZ way.

Note that TikZ needs two latex-runs to get the right positions.

See PGF Manual, section 16.13.2 Referencing the Current Page Node – Absolute Positioning and the KOMA-Script Manual about using scrpage2.

share|improve this answer
As mentioned in “Tikz rectangle hiding text!” theres a problem when using the foot to define the border so I changed the example. No it uses the center head instead of left foot to draw the frame (an everything else) behind the text body. This makes it even easier to draw the frame cause we can use two overlaying rectangles instead of four arbors which gives us the opportunity to make the inner rectangle with rounded corners. – Tobi May 16 '11 at 9:05
+1 for \strut! – LianTze Lim May 16 '11 at 9:32

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.