我正在尝试编译一个文档,该文档具有 (1) 页面的彩色背景和 (2) 水印。但是,当我尝试使用 xwatermark 包时,它会消除页面的彩色背景。有人知道解决这个问题的方法吗?请参阅下面的代码示例:
\documentclass[oneside,a4paper,14pt]{extreport}
\usepackage{fontspec}
\usepackage{libertine} % Font Libertine
\usepackage{polyglossia}
\usepackage{microtype}
\setmainlanguage{english}
\usepackage{vmargin}
\setmarginsrb{2cm}{1.5cm}{2cm}{1cm}{0pt}{0mm}{0pt}{13mm}
\usepackage{lipsum}
\usepackage{color}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}
\definecolor{purple}{rgb}{0.41, 0.16, 0.38}
\usepackage[printwatermark]{xwatermark}
\newwatermark[allpages,color=purple,angle=45,scale=4,xpos=0,ypos=0]{Draft}
\begin{document}
\pagecolor{anti-flashwhite}
\lipsum[1-5]
\end{document}
答案1
pagecolor
有效。水印有效,并且非常紫,正如定义的那样。
虽然我几乎看不到这么浅的灰色,但它确实存在:
文档中提到了值何时达到如此极端的范围。我认为,PDF 查看器和缩放功能可能也存在依赖性。
一条比例尺,穿过阴影:
注意,在区分等级方面,两端是相似的。非线性的。
打印机肯定存在一些需要考虑的问题。尝试一些测试页。
平均能量损失
\documentclass[oneside,a4paper,14pt]{extreport}
\usepackage{tikz}
\usepackage{libertine} % Font Libertine
\usepackage{vmargin}
\setmarginsrb{2cm}{1.5cm}{2cm}{1cm}{0pt}{0mm}{0pt}{13mm}
\usepackage{xcolor}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}
\definecolor{purple}{rgb}{0.41, 0.16, 0.38}
\definecolor{tca}{rgb}{1, 1, 1}
\definecolor{tcb}{rgb}{0.95, 0.95, 0.96}
\definecolor{tcc}{rgb}{0.90, 0.90, 0.90}
\definecolor{tcd}{rgb}{0.85, 0.85, 0.85}
\definecolor{tce}{rgb}{0.80, 0.80, 0.80}
\definecolor{tcf}{rgb}{0.75, 0.75, 0.75}
\definecolor{tcg}{rgb}{0.70, 0.70, 0.70}
\definecolor{tch}{rgb}{0.65, 0.65, 0.65}
\definecolor{tci}{rgb}{0.60, 0.60, 0.60}
\definecolor{tcj}{rgb}{0.55, 0.55, 0.55}
\definecolor{tck}{rgb}{0.50, 0.50, 0.50}
\definecolor{tcl}{rgb}{0.45, 0.45, 0.45}
\definecolor{tcm}{rgb}{0.40, 0.40, 0.40}
\definecolor{tcn}{rgb}{0.35, 0.35, 0.35}
\definecolor{tco}{rgb}{0.30, 0.30, 0.30}
\definecolor{tcp}{rgb}{0.25, 0.25, 0.25}
\definecolor{tcq}{rgb}{0.20, 0.20, 0.20}
\definecolor{tcr}{rgb}{0.15, 0.15, 0.15}
\definecolor{tcs}{rgb}{0.10, 0.10, 0.10}
\definecolor{tct}{rgb}{0.05, 0.05, 0.05}
\definecolor{tcu}{rgb}{0, 0, 0}
\usepackage[printwatermark]{xwatermark}
\newwatermark[allpages,color=purple,angle=45,scale=4,xpos=0,ypos=0]{Draft}
\newcommand\mysize{0.55cm}
\begin{document}
\pagecolor{red!35!yellow!80}
\colorbox{anti-flashwhite}{anti-flashwhiteThe cat sat on the mat.}
The \colorbox{white}{cat sat }on the mat.
\colorbox{anti-flashwhite}{anti-flashwhiteThe cat sat on the mat.}
\noindent
\fbox{\colorbox{tca}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcb}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcc}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcd}{\makebox[\mysize]{}}}
\fbox{\colorbox{tce}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcf}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcg}{\makebox[\mysize]{}}}
\fbox{\colorbox{tch}{\makebox[\mysize]{}}}
\fbox{\colorbox{tci}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcj}{\makebox[\mysize]{}}}
\tikz{\node[overlay,xshift=0.5cm,yshift=-1.65\baselineskip,inner sep=0pt]{\fbox{\colorbox{tck}{\makebox[\mysize]{}}}}}
\noindent
\fbox{\colorbox{tca}{\makebox[\mysize]{1}}}
\fbox{\colorbox{tcb}{\makebox[\mysize]{0.95}}}
\fbox{\colorbox{tcc}{\makebox[\mysize]{0.90}}}
\fbox{\colorbox{tcd}{\makebox[\mysize]{0.85}}}
\fbox{\colorbox{tce}{\makebox[\mysize]{0.80}}}
\fbox{\colorbox{tcf}{\makebox[\mysize]{0.75}}}
\fbox{\colorbox{tcg}{\makebox[\mysize]{0.70}}}
\fbox{\colorbox{tch}{\makebox[\mysize]{0.65}}}
\fbox{\colorbox{tci}{\makebox[\mysize]{0.60}}}
\fbox{\colorbox{tci}{\makebox[\mysize]{0.55}}}
\tikz{\node[overlay,xshift=0.5cm,yshift=-1.25\baselineskip,inner sep=0pt]{\fbox{\colorbox{tck}{\makebox[\mysize]{0.50}}}}}
\noindent
\fbox{\colorbox{tcu}{\makebox[\mysize]{}}}
\fbox{\colorbox{tct}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcs}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcr}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcq}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcp}{\makebox[\mysize]{}}}
\fbox{\colorbox{tco}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcn}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcm}{\makebox[\mysize]{}}}
\fbox{\colorbox{tcl}{\makebox[\mysize]{}}}
\noindent
\fbox{\colorbox{tcu}{\makebox[\mysize]{\textcolor{white}{0}}}}
\fbox{\colorbox{tct}{\makebox[\mysize]{\textcolor{white}{0.05}}}}
\fbox{\colorbox{tcs}{\makebox[\mysize]{\textcolor{white}{0.10}}}}
\fbox{\colorbox{tcr}{\makebox[\mysize]{\textcolor{white}{0.15}}}}
\fbox{\colorbox{tcq}{\makebox[\mysize]{\textcolor{white}{0.20}}}}
\fbox{\colorbox{tcp}{\makebox[\mysize]{\textcolor{white}{0.25}}}}
\fbox{\colorbox{tco}{\makebox[\mysize]{\textcolor{white}{0.30}}}}
\fbox{\colorbox{tcn}{\makebox[\mysize]{\textcolor{white}{0.35}}}}
\fbox{\colorbox{tcm}{\makebox[\mysize]{\textcolor{white}{0.40}}}}
\fbox{\colorbox{tcl}{\makebox[\mysize]{\textcolor{white}{0.45}}}}
\end{document}