![将徽标添加到 tikz fancyhead 和 footer](https://linux22.com/image/407012/%E5%B0%86%E5%BE%BD%E6%A0%87%E6%B7%BB%E5%8A%A0%E5%88%B0%20tikz%20fancyhead%20%E5%92%8C%20footer.png)
使用 OverLeaf
我想在页眉的右上角添加一个徽标。距离右边缘 1 厘米。在页脚中距离左边缘 1 厘米处添加一段文本。我尝试使用 rhead。但我对 LaTex 还很陌生,这对新手来说太花哨了。右侧的蓝色边框必须保留。
\documentclass[a4paper]{letter}
\usepackage{xcolor}
\definecolor{maxlink}{RGB}{2,60,180}
\usepackage{tikz} % you know what this does!
\usetikzlibrary{calc}
\usepackage{fancyhdr} % put things headers and footers and we plan misuse it ;)
\usepackage{lipsum}
%\usepackage[margin=2.5cm,headheight=26pt,includeheadfoot]{geometry}
%\setlength\headheight{26pt} %% just to make warning go away. Adjust the value after looking into the warning.
%\rhead{{\color{blue}\rule{1cm}{1cm}}}
%\rhead{\includegraphics[width=1cm]{Max-Logo.png}}
%\rhead{\begin{picture}(3,3)
%\put(3,3){\includegraphics[width=1cm]{example-image-a}}
%\end{picture}}
\fancypagestyle{mypage}{%
\fancyhf{}
\fancyhead[LO]{%
\begin{tikzpicture}[overlay,remember picture]
\fill [color=maxlink] (current page.north west) rectangle
($ (current page.south west) + (0.4cm,0cm) $);
\end{tikzpicture}
}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\begin{document}
\pagestyle{mypage} % activate colored margins
\pagenumbering{gobble}
\mbox{}
\clearpage
%\pagestyle{mypage} % activate colored margins
\pagenumbering{gobble}
\mbox{}
\end{document}
我不需要使用 tikz 和 fancy head 来制作边框,我刚刚在 如何为某些页面设置彩色边距