我想在投影仪演示文稿的所有页面上打印水印:首页/标题页、目录、参考书目等所有页面。使用下面的代码,水印仅打印在第一页上。有没有办法在所有页面上打印水印? PS:我收到一条我不明白的错误消息。
\documentclass[9pt,trans,xcolor={table},envcountsect]{beamer} % Plain
\usefonttheme[onlymath]{serif}
\usetheme[shownavsym,right]{Aalborg}
\setbeamertemplate{section in toc}[sections numbered] % Automatic enumeration of sections
\definecolor{dgreen}{rgb}{0.,0.6,0.}
\definecolor{aaublue}{RGB}{33,26,82}% dark blue
\usepackage{etoolbox} % In order to still use an outdated beamer version
\usepackage[printwatermark]{xwatermark}
\newsavebox\mybox
\savebox\mybox{\tikz[color=red,opacity=0.4]\node{Peter Jensen};}
\newwatermark*[
allpages,
angle=45,
scale=4,
xpos=-20,
ypos=10,
]{\usebox\mybox}
\begin{document}
\begin{frame}%[allowframebreaks]
\frametitle{Watermark on this page}
\tableofcontents
\end{frame}
\begin{frame}{No watermark?}
Hello world!
\end{frame}
\end{document}
无需外部封装,可以通过
background canvas
模板添加水印:
\documentclass[9pt,trans,xcolor={table},envcountsect]{beamer} % Plain
\usefonttheme[onlymath]{serif}
\usetheme[shownavsym,right]{Aalborg}
\setbeamertemplate{section in toc}[sections numbered] % Automatic enumeration of sections
\definecolor{dgreen}{rgb}{0.,0.6,0.}
\definecolor{aaublue}{RGB}{33,26,82}% dark blue
\setbeamertemplate{background canvas}{
\begin{tikzpicture}[remember picture,overlay]
\node[color=red,opacity=0.4,rotate=45,opacity=0.5] at (current page.center) {Peter Jensen};
\end{tikzpicture}
}
\begin{document}
\begin{frame}%[allowframebreaks]
\frametitle{Watermark on this page}
\tableofcontents
\end{frame}
\begin{frame}{No watermark?}
Hello world!
\end{frame}
\end{document}