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.

I was thinking about giving a finishing touch to my resume by adding a border to the document in black color. I tried using \fancybox but not impressed with the output.

\documentclass[a4paper]{article}

\usepackage[a4paper,vmargin={20mm,20mm},hmargin={20mm,20mm}, includehead,%
 includefoot]{geometry}
 \usepackage{fancybox}

\begin{document}

\fancypage{\setlength{\fboxsep}{0pt}\fbox}{}

Document text goes here...

\end{document}

The output that I am trying to get is something similar like this.

enter image description here

How do I get multiple recessed rectangle covering the whole page ?

share|improve this question
1  
See the package background: tex.stackexchange.com/questions/26957/… –  Marco Daniel Sep 22 '12 at 7:12
    
Another possibility: the tikzpagenodes package. –  Claudio Fiandrino Sep 22 '12 at 8:43
add comment

2 Answers

up vote 6 down vote accepted

With tikz:

\documentclass[12pt]{scrartcl}
\usepackage{lipsum}
\usepackage[a4paper,margin=1in,heightrounded]{geometry}
%
\usepackage{tikz}
%
\usetikzlibrary{calc}
%
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[overlay,remember picture]
    \draw [line width=1pt,rounded corners=7pt,
        ]
        ($ (current page.north west) + (1cm,-1cm) $)
        rectangle
        ($ (current page.south east) + (-1cm,1cm) $);
        \draw [xshift=4mm,dashed,line width=1pt,rounded corners=7pt]
        ($ (current page.north west) + (.5cm,-.5cm) $)
        rectangle
        ($ (current page.south east) + (-.5cm,.5cm) $);
    \draw [line width=1pt,rounded corners=7pt]
        ($ (current page.north west) + (1.5cm,-1.5cm) $)
        rectangle
        ($ (current page.south east) + (-1.5cm,1.5cm) $);
\end{tikzpicture}
%
\lipsum[1-6]
\end{document}

With background:

\documentclass[12pt]{scrartcl}
\usepackage{xcolor,lipsum}
\usepackage[a4paper,margin=1in,heightrounded]{geometry}
%
\usepackage{background}
%
\usetikzlibrary{calc}
\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{black}
\SetBgContents{
\begin{tikzpicture}[overlay,remember picture]
    \draw [line width=1pt,rounded corners=7pt,
        ]
        ($ (current page.north west) + (1cm,-1cm) $)
        rectangle
        ($ (current page.south east) + (-1cm,1cm) $);
        \draw [xshift=4mm,dashed,line width=1pt,rounded corners=7pt]
        ($ (current page.north west) + (.5cm,-.5cm) $)
        rectangle
        ($ (current page.south east) + (-.5cm,.5cm) $);
    \draw [line width=1pt,rounded corners=7pt]
        ($ (current page.north west) + (1.5cm,-1.5cm) $)
        rectangle
        ($ (current page.south east) + (-1.5cm,1.5cm) $);
\end{tikzpicture}
}
%
\begin{document}
\pagestyle{empty}
\lipsum[1-6]
\end{document}

enter image description here

share|improve this answer
    
That worked, I modified the layout and now I can get the result I wanted, I am using the tikz package and its cool. However the margin/border doesn't extend to second page and stays in the first page itself. How do I make it extended to n number of pages ? –  Shashwat Sep 22 '12 at 9:11
    
@Shashwat: Use the background version of the answer. –  Harish Kumar Sep 22 '12 at 9:26
add comment

This is the code that I am using in the resume, pasting the code after \newpage creates line at multiple pages.

\usepackage[a4,frame]{crop}
\usepackage{tikz}
\usetikzlibrary{calc}

%%%
%%%The code below will help us draw borders.
%%%
\pagestyle{empty}
\begin{tikzpicture}[overlay,remember picture]
\draw [line width=3pt,rounded corners=1pt,]
    ($ (current page.north west) + (1cm,-1cm) $)
    rectangle
    ($ (current page.south east) + (-1cm,1cm) $);       
\end{tikzpicture}

%%%Till here 
%%%
%%%

Thanks everyone who helped me complete my resume.

enter image description here

share|improve this answer
add comment

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.