如何在整个文档的中间位置创建一条水平线?我希望这条线位于之前创建和放置的所有其他对象上方,以获得用水平线将整个文档切成两半的效果。有没有简单的方法可以添加它?
答案1
适应此解决方案,如果该线应与文本重叠。
\documentclass{article}
\usepackage{lipsum} % dummy text
\usepackage{tikz}
\usepackage{eso-pic}
\AddToShipoutPicture{%
\begin{tikzpicture}[overlay,remember picture]
\draw[line width=1pt,red]
(current page.east) -- (current page.west);
\end{tikzpicture}%
}
\begin{document}
\lipsum
\end{document}
如果你改变锚点,你可以轻松获得其他线条。例如(current page.south east) -- (current page.north west);
或者另一种规则。
(current page.west) -- (current page.north)
(current page.south west) -- (current page.north east)
(current page.south) -- (current page.east) ;