我想以以下方式在课堂上打印水印,exam
因为我不希望水印在前景中并且具有一定的不透明度。一旦我取消注释,它\usepackage[printwatermark]{xwatermark}
就会出现错误:
! LaTeX Error: Command \lhead already defined.
! LaTeX Error: Command \chead already defined.
! LaTeX Error: Command \rhead already defined.
! LaTeX Error: Command \lfoot already defined.
! LaTeX Error: Command \cfoot already defined.
! LaTeX Error: Command \lfoot already defined.
! LaTeX Error: Command \rhead already defined.
有人可以帮帮我吗?
\documentclass{exam}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage[printwatermark]{xwatermark}
\newsavebox\mybox
\savebox\mybox{\tikz[opacity=0.1]\node{Sankhya};}
%\newwatermark*[
% allpages,
% angle=60,
% scale=12,
% xpos=-30,
% ypos=15
%]{\usebox\mybox}
\begin{document}
\begin{questions}
\question This is my first Question.
\question This is my second question
\end{questions}
\end{document}
答案1
我担心xwatermark
并且exam.cls
确实不相容(除非发生大量的重新定义)
我转而使用background
可用于水印等的包。应用placement=
或position=...
选项来\backgroundsetup
移动水印。
\documentclass{exam}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage{background}
\newsavebox\mybox
\savebox\mybox{\tikz[opacity=0.4]\node{Sankhya};}
\backgroundsetup{angle=60,contents={\usebox\mybox}}
\begin{document}
\begin{questions}
\question This is my first Question.
\question This is my second question
\end{questions}
\end{document}