2

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 ?

2 Answers 2

3

Like this

\pagecolor{black}
\color{white}
\thisfancypage{% 
\color{white}
   \setlength{\fboxsep}{2pt}\doublebox}{} 
3

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}
1
  • 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. Jun 16, 2011 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.