I am doing my project report using latex, and the format requires a particular kind of page border around each page. (Its a black thick box enclosing a thin box).
I saw this question, Multiple border around page
and adapted it to get the required border using this example:
\documentclass[a4paper,12pt,oneside]{memoir}
\usepackage{lmodern} % Latin Modern font package
\usepackage[T1]{fontenc}
\usepackage{amssymb,amsmath}
\usepackage{graphicx}
\usepackage{url}
\usepackage{marvosym}
\usepackage{float}
% Metadata
\title{My Project}
\author{Philips George John}
\date{April 2013}
% Options for the memoir class
% Page Margins
\setulmarginsandblock{1in}{1in}{*}
\setlrmarginsandblock{1.4in}{1in}{*}
% Paragraph formatting for memoir class
\nonzeroparskip
% Get subfloats in figure environment
\newsubfloat{figure}
% Tells memoir to recalculate all parameters
% Apply and enforce our new layout
\checkandfixthelayout
% Page border
\usepackage{background}
\usetikzlibrary{calc}
\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{black}
\SetBgContents{
\begin{tikzpicture}[overlay,remember picture]
\draw [line width=3pt]
($ (current page.north west) + (2.0cm,-2.0cm) $)
rectangle
($ (current page.south east) + (-1.5cm,1.8cm) $);
\draw [line width=1pt]
($ (current page.north west) + (2.15cm,-2.15cm) $)
rectangle
($ (current page.south east) + (-1.65cm,1.95cm) $);
\end{tikzpicture}
}
\begin{document}
\frontmatter
\maketitle
\thispagestyle{empty}
\mainmatter
\chapter{Introduction}
\section{Section A}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue
massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero,
sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim.
\clearpage
\section {Section B}
In porttitor. Donec laoreet nonummy augue. Suspendisse dui purus, scelerisque at,
vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend.
Ut nonummy. Fusce aliquet pede non pede.
\end{document}
I could get the output, and the borders are "shaped" correctly. But I have two problems.
1) The borders appear in gray colour. They are supposed to be black. Specifying the colour "black" with \draw command did not help.
2) For some reason, I need to run pdflatex three times to get the output correctly. First time it shows no border. Second time, it shows a border placed incorrectly. When I compile it for the third time, it shows correctly (except for the colour).
Forgive me if this question is very obvious, but I am new to LaTeX.

