![徽标和文字位于文章顶部,每页周围都有边框](https://linux22.com/image/425274/%E5%BE%BD%E6%A0%87%E5%92%8C%E6%96%87%E5%AD%97%E4%BD%8D%E4%BA%8E%E6%96%87%E7%AB%A0%E9%A1%B6%E9%83%A8%EF%BC%8C%E6%AF%8F%E9%A1%B5%E5%91%A8%E5%9B%B4%E9%83%BD%E6%9C%89%E8%BE%B9%E6%A1%86.png)
答案1
fancyhdr
您需要页眉和页脚以及tikz
页面框架的帮助。atbegshi
将构建第一页和后续页面。
\documentclass{article}
\usepackage{fancyhdr}
\usepackage{kantlipsum} % dummy text
\usepackage{graphicx}
\usepackage{tikz}
\usepackage[top=3cm, bottom=3cm, left=4cm, right=4cm, headheight=1.5cm]{geometry}
\usepackage{atbegshi}
\AtBeginShipout{\AtBeginShipoutUpperLeft{\borders}}
\AtBeginShipoutFirst{\borders}
\pagestyle{fancy}{%
\fancyhead[L,R,C]{}
\fancyfoot[L,R,C]{}
\fancyhead[L]{\includegraphics[height=0.10\textwidth,width=0.10\textwidth]{example-image-a} }
\fancyhead[R]{\includegraphics[height=0.10\textwidth,width=0.10\textwidth]{example-image-b} }
\fancyhead[C]{ Course--XXX \\ University xxx\vspace{0.02\textwidth}}
\fancyfoot[L]{Course--XXX, year -- 2020}
\fancyfoot[R]{Page -- \thepage}
}
\renewcommand{\headrulewidth}{2pt} % width of line bellow the header
\renewcommand{\footrulewidth}{2pt}
\newcommand{\borders}{
\begin{tikzpicture}[remember picture, overlay]
\node [anchor=north west, inner sep=0pt]
at (current page.north west)
{%
\begin{tikzpicture}[every node/.append style = {anchor=center}]
\draw[%
anchor=north,
line width=2.pt, % width of the frame
color=blue] (0,0) rectangle (\paperwidth-4pt,\paperheight-4pt);
\end{tikzpicture}
};
\end{tikzpicture}
}
\begin{document}
1. \kant[1]
\bigskip
a
b
c
d
e
f
g
\bigskip
Select the right option.
\bigskip
Solution:
\clearpage
2. \kant[2]
\bigskip
a
b
c
d
e
f
g
\bigskip
Select the right option.
\bigskip
Solution:
\end{document}