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 use

\pagecolor{black}
\color{white}

to create a document with white text on black background.

I draw a border around the page using

\pgfpagesdeclarelayout{boxed}
{
  \edef\pgfpageoptionborder{0pt}
}
{
  \pgfpagesphysicalpageoptions
  {%
    logical pages=1,%
  }
  \pgfpageslogicalpageoptions{1}
  {
    border code=\pgfsetlinewidth{2pt}\pgfstroke,%
    border shrink=\pgfpageoptionborder,%
    resized width=.95\pgfphysicalwidth,%
    resized height=.95\pgfphysicalheight,%
    center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
  }%
}

\pgfpagesuselayout{boxed}

or

\thisfancypage{%
   \setlength{\fboxsep}{2pt}\doublebox}{}

.

But I need to have white lines for the border, else they won't show up on the black page. How do I change or set the border line colours ?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Like this

\pagecolor{black}
\color{white}
\thisfancypage{% 
\color{white}
   \setlength{\fboxsep}{2pt}\doublebox}{} 
share|improve this answer

enter image description here

\documentclass[12pt]{article}
\usepackage[letterpaper]{geometry}
\usepackage{eso-pic,xcolor,lipsum}
\pagecolor{white}
\AddToShipoutPictureBG{%
 \AtTextLowerLeft{\color{black}%
  \rule[-\footskip]{\textwidth}{\dimexpr\textheight+\footskip\relax}}}
\color{white}
\begin{document}
\lipsum
\end{document}
share|improve this answer
1  
I would always add a \relax after a \dimexpr to terminate it explicitly: \dimexpr\textheight+\footskip\relax. You never know how the length argument is used in the macro internally. –  Martin Scharrer Jun 16 '11 at 15:33

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.