TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I've been looking for a method of having different designs on odd/even pages, and from what I found on Google, background seems to be the package to do it; but in using it, it indiscriminately puts my design on EVERY page, even ones that I specify to be blank.

How might I make it so that completely blank pages don't have this design, nor do the start of chapters?


\RequirePackage{amsthm, amsfonts, amsmath}
\RequirePackage{blindtext, xcolor}


\renewcommand*\familydefault{\sfdefault} % Set default font

%%% Table of Contents ----------------------------------------------------------
\setcounter{tocdepth}{1} % Show only Chapters and Sections

%%% Change font/color/layout of TOC


\contentsmargin{1.5cm} % global right margin, perhaps also global left

  {} %     ^^^ pretendously zero width box puts its contents in the left margin
  {\hfill\makebox[-3cm]{\thecontentspage}}  % 3cm = twice 1.5cm

\titlecontents{chapter}[3cm] % <-- seems to set some specific left margin
  {} %     ^^^ pretendously zero width box puts its contents in the left margin
  {\hfill\makebox[-3cm]{\thecontentspage}}  % 3cm = twice 1.5cm

\titlecontents{section}[3cm] % <-- again this left (additional?) margin
  {\makebox[0cm][r]{\thecontentslabel\hspace{.75cm}}} % box pushed to the left
  {\hfill\makebox[-3cm]{\thecontentspage}}  % 3cm = twice 1.5cm



    \begin{tikzpicture}[remember picture, overlay]
      \fill [cyan!50] (18.25,3) rectangle (19,-26);
    \begin{tikzpicture}[remember picture, overlay]
      \fill [cyan!50] (-3,3) rectangle (-1.85,-26);


%%% Chapter Header ----------------------------------------------------------
  {\thispagestyle{empty}    % Remove page number on new chapters
  \begin{tikzpicture}[remember picture,overlay]
    \node[yshift=-3cm] at (current page.north west)
      {\begin{tikzpicture}[remember picture, overlay]
        \draw[fill=cyan!50] (0,-1) rectangle
        \draw[fill=cyan!50] (0,-24) rectangle
        \ifttl@label% <---------------------- Added condition on \ifttl@label
              {\color{white}\LARGE \MakeUppercase{\@chapapp} \Huge\thechapter};
        \fi% <------------------------------- end condition on \ifttl@label


\titleformat{\section}{\color{cyan}\itshape\LARGE}{\llap{\thesection} #1}{1em}{}[\titleline{\color{cyan}\titlerule[1pt]}]
\titleformat{\subsection}{\color{cyan}\normalfont\large}{\; #1}{1em}{}

share|improve this question
Do you really need all the code that you posted to reproduce the behavior? Please reduce it to a minimum, helping you it will be a lot easier then. – krlmlr Feb 4 '13 at 22:24
THat is the minimum. I am designing a custom class and I put that in so my style can be seen. – agent154 Feb 4 '13 at 22:31
Erm, no. What does \RequirePackage{DejaVuSansCondensed} contribute to the problem you are seeing? The \oddsidemargin? The \titlecontents? And so forth... – krlmlr Feb 4 '13 at 22:37
up vote 3 down vote accepted

Call also


and add the code


at the end of your preamble (at least after having defined the chapter format). Then change your code for the blue bars as

      \begin{tikzpicture}[remember picture, overlay]
        \fill [cyan!50] (18.25,3) rectangle (19,-26);
      \begin{tikzpicture}[remember picture, overlay]
        \fill [cyan!50] (-3,3) rectangle (-1.85,-26);

In order to produce a blank page use \makeemptypage.

But, please, don't do it. This layout is a punch in the eye.

share|improve this answer
It'll look much better when there's actual content there. But thanks for the help. – agent154 Feb 5 '13 at 11:05

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.