3

the watermark appears on 2 pages, the title and the first TOC. After some testing I think the TOC resets the page numbering. If I insert a blank page after the title, the page of the start of the TOC is still one.

\documentclass[12pt,runningheads]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,hyperref,array,xcolor,multicol,verbatim,mathpazo}
\usepackage[normalem]{ulem}
\usepackage[printwatermark]{xwatermark}
\usepackage{fullpage}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes.arrows}
\usepackage{array}
\setlength{\skip\footins}{24pt}
\newwatermark[firstpage,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{Vorabgabe}
\begin{document}

\setcounter{page}{1}
\title{XXXXX\\ XXX }

\author{XXXX, XXXXX, XXXXX}

\begin{titlepage}
\maketitle
\thispagestyle{empty}
\end{titlepage}

\tableofcontents

\section{XXXX}
\end{document}
6
  • Welcome to TeX.SX! The description and the code is not really helpful since incomplete. Please add \documentclass etc., the relevant packages and \end{document} to your post
    – user31729
    Commented Nov 24, 2015 at 19:25
  • Thanks! these are the relevant pages (?) the first page is twice, so the watermark appears on the title page and the first TOC page
    – Leander
    Commented Nov 24, 2015 at 19:28
  • Leander: packages, not pages ;-) Your example above will not compile! And \begin{tableofcontents}\tableofcontents\end{tableofcontents} really looks weird
    – user31729
    Commented Nov 24, 2015 at 19:29
  • ah sry :D thanks! i am new to tex....as you would have guessed :)
    – Leander
    Commented Nov 24, 2015 at 19:40
  • 1
    You should not combine titlepage and maketitle, cf. for instance this post.
    – Clément
    Commented Nov 24, 2015 at 20:42

2 Answers 2

2

You should either use the \maketitle command, or uses the titlepage environment, but not both at the same times.

With \maketitle

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[printwatermark]{xwatermark}
\newwatermark[firstpage,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{Vorabgabe}

\title{XXXXX\\ XXX }
\author{XXXX, XXXXX, XXXXX}

\begin{document}
\maketitle
\thispagestyle{empty}
\newpage
\tableofcontents

\section{XXXX}
\end{document}

enter image description here

With titlepages

You could have some fancier display of the title but for some reason, indeed the xwatermark package display twice the watermark when the firstpage option is given. This is not the expected behaviour, and I don't know how to patch it.

1
  • 1
    You linked to a post by Werner in the comments to the question. Werner also explains that the titlepage indeed resets the page number for the standard classes. If you peek into classes.dtx you will see, who is to blame ;-)
    – Johannes_B
    Commented Dec 12, 2015 at 20:07
2

This is not the best solution, but if you want the watermark to appear only at the titlepage, you may set that page to any desired number, and then choose the watermark to appear only at that one instead of 'firstpage':

\newwatermark[page=100,...]{Vorabgabe}

\begin{titlepage}
\setcounter{page}{100}
\maketitle
\thispagestyle{empty}
\end{titlepage}

\tableofcontents

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .