答案1
像这样?
代码(受此页上某人的启发):
\documentclass[a4paper]{book}
\usepackage{geometry}
\usepackage{background}
\usepackage{lipsum} % for lorem ipsum
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{emptypage}
\backgroundsetup{
placement=center,
scale=1,
angle=0,
opacity=.3,
nodeanchor=center,
contents={
\begin{tikzpicture}[remember picture,overlay]
\draw[cyan, line width=2cm]
($(current page.north east)$) -- ($(current page.south east)$);
\
\end{tikzpicture}
}
}
\begin{document}
\tableofcontents
\chapter{One}
\lipsum
\section{One-one}
\lipsum[5-9]
\section{One-two}
\lipsum[10-15]
\end{document}
您可以根据自己的意愿更改颜色(这里是青色)。