如何多次使用 background 包

如何多次使用 background 包

如何使用背景包来绘制不同的背景?

例如,此代码

\usepackage[center,all]{background}
\SetBgContents{Wrote by Human - Wrote by Human - Wrote by Human - }
\SetBgOpacity{1}
\SetBgColor{black!40}
\SetBgScale{1}

在每一页上绘制一条对角线文本(人写 - 人写 - 人写 - )。我想写更多这样的垂直间距的线条(在对角线上)。有人能帮我吗?无论如何,谢谢你,祝你有美好的一天 :)

答案1

获取多行的一种方法是将所需的内容放在表中:

在此处输入图片描述

如果您希望在后续页面上更改此设置,您可以重新定义\MyWatermark

代码:

\documentclass[]{article}
\usepackage[center,all]{background}
\usepackage{lipsum}

\SetBgContents{\MyWatermark}
\SetBgOpacity{1}
\SetBgColor{red}
\SetBgScale{1}

\newcommand*{\MyWatermark}{%
    \Huge
    \begin{tabular}{l}
        Wrote by Human \\ 
        Wrote by Monkey \\ 
        Wrote by Human \\
    \end{tabular}%
}

\begin{document}
\lipsum[1-7]
\renewcommand*{\MyWatermark}{%
    \Huge
    \begin{tabular}{l}
        Wrote by Me \\ 
        Wrote by Monkey \\ 
        Wrote by Me \\
    \end{tabular}%
}
\lipsum[8-12]
\end{document}

相关内容