ToC에서 페이지 번호 매기기 없이 워터마크가 결합됨

ToC에서 페이지 번호 매기기 없이 워터마크가 결합됨

\pagenumbering{gobble}업데이트 20190319 목차에서 페이지 번호 매기기를 억제하기 위해 명령을 사용하고 있습니다 (제목만 표시하고 싶습니다). 문제는 실제로 ToC의 페이지 번호를 표시하지 않지만 이제 ToC 페이지에는 DRAFT 워터마크만 표시되고 다음 모든 페이지에서는 DRAFT 워터마크가 사라졌다는 것입니다. 줄을 삭제하자마자 \pagenumbering{gobble}DRAFT 워터마크가 모든 페이지에 다시 표시되지만 ToC에는 페이지 번호가 표시됩니다.

이 문제를 우회하고 모든 페이지에 DRAFT 워터마크를 표시하고 ToC(제목만)에서 페이지 번호 표시를 억제하려면 어떻게 해야 합니까?

여기 내 코드가 있습니다

\documentclass[10pt, a3paper]{article}
\newcommand{\projecttitle}{Example}

\usepackage{tikz}
\usepackage[printwatermark]{xwatermark}
\usepackage{pdfpages}
\usepackage{pdflscape}
\usepackage{geometry}

\geometry{
a3paper,
left=23mm,
top=15mm,
right=10mm,
bottom=15mm,
headheight=38pt,
includeheadfoot,
showframe=false
}

\newsavebox\mybox
\savebox\mybox{\scalebox{20}{\tikz[color=gray!1000,opacity=0.3]\node{DRAFT};}}
\newwatermark*[allpages,angle=45]{\usebox\mybox}

\begin{document}

\tableofcontents \thispagestyle{fancy}
\addtocontents{toc}{\protect\thispagestyle{empty}}
\pagenumbering{gobble}

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\parbox{\linewidth}{\section{Section 1}}}; \end{tikzpicture}}]{any_pdf_image.pdf}

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\parbox{\linewidth}{\section{Section 2}}}; \end{tikzpicture}}]{any_pdf_image.pdf}

\newpage
\thispagestyle{empty}
\includepdf[scale=1.000, trim=0cm 0cm 0.0cm 2cm, pagecommand= {\begin{tikzpicture}[remember picture, overlay] \node [anchor=west] at (-0.2, 0) {\parbox{\linewidth}{\section{Section 3}}}; \end{tikzpicture}}]{any_pdf_image.pdf}

\end{document}

답변1

로 워터마크만 추가하시면 eso-pic그런 문제는 없습니다. (더 잘 보이도록 워터마크 모양을 변경했지만 쉽게 다시 변경할 수 있습니다.)

\documentclass{article}
\usepackage{eso-pic}
\usepackage{tikz}
\usepackage{lipsum}
\begin{document}
\pagenumbering{gobble}
\tableofcontents

\clearpage
\AddToShipoutPictureBG{\begin{tikzpicture}[overlay,remember picture]
\node[gray,opacity=0.3,scale=8,font=\sffamily,rotate=45] at (current page.center){DRAFT};
\end{tikzpicture}}
\foreach \X in {1,...,20}
{\section{Section \X}
\lipsum[\X]}
\end{document}

여기에 이미지 설명을 입력하세요

답변2

'배경' 패키지를 사용하여 문제를 해결했습니다. 도와주신 모든 분들께 감사드립니다. 제가 한 일은 다음과 같습니다.

\usepackage[pages=all]{background} % in the preamble
..............

\backgroundsetup{contents={DRAFT}, color=gray!1000, opacity=0.3, angle=45, scale=23} % right before \begin{document}

관련 정보