答案1
您可以使用current page
Ti 创建的节点钾Z.这可能至少需要两次编译运行(当然,由于 A4 不是正方形,所以在这种情况下三角形的角度不是 45 度):
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz[overlay, remember picture]{ \fill[red] (current page.south west) -- (current page.north east) -- (current page.south east) -- cycle; }
% other stuff
\end{document}
如果您希望将其作为文档中所有页面的背景,您可以这样做:
\documentclass{article}
\usepackage{tikz}
\AddToHook{shipout/background}{%
\tikz[overlay, remember picture]{ \fill[red] (current page.south west) -- (current page.north east) -- (current page.south east) -- cycle; }%
}
\begin{document}
% ...
\end{document}