TikzPageNodes absolute positioning guide: drive.google.c...
%%%%%%%%%%%%%% MWE CODE
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage[top=4cm,bottom=4cm,headheight=2cm,footskip=3cm,marginparwidth=2cm]{geometry}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{tikzpagenodes}
%custom template layout
ewcommand{\mypage}{%
\begin{tikzpicture}[remember picture, overlay]
\fill[fill=gray](current page.north west) rectangle ([yshift=-30mm]current page.north east) node[midway] {\Huge\bfseries\sffamily\color{white}{Here is my title}};
ode at (current page footer area) {\Huge\bfseries\sffamily\ Page \thepage};
\end{tikzpicture}
}%
%load page style
\fancypagestyle{MyPageStyle}{%
\fancyhf{}
\fancyhead[C]{\mypage}
enewcommand{\headrulewidth}{0pt}
}%
\pagestyle{MyPageStyle}
\begin{document}
\lipsum[1-50]
\end{document}
14 окт 2024