答案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}