I am trying to draw a horizontal line using tikz relative to the page top/bottom.
Something similar to this, but using a line (simple \draw). What I have so far:
\begin{tikzpicture}[overlay, remember picture]
\draw[thin, gray, anchor=south] (-11,-20.4) -- (11,-20.4);
\end{tikzpicture}
My goal is to get rid of the absolute coordinates and replace them with i.e. current page.north and an offset of e.g. 2cm, but I wasn't able to figure it out yet.
Any hints or tricks are greatly appreciated, thx!
EDIT: (figured it out thx to the input below)
\newcommand\mOffset{2.8} % margin offset of vertical bar from top/bottom [cm]
% top bar
\draw[thin, gray] ($(current page.north west)+(0,-\mOffset)$) -- ($(current page.north east)+(0,-\mOffset)$);
% bottom bar
\draw[thin, gray] ($(current page.south west)+(0,\mOffset)$) -- ($(current page.south east)+(0,\mOffset)$);
Thx!

