答案1
一个非常“基本”的设置作为一个表格并将其注入到页眉中fancyhdr
。
\documentclass{article}
\usepackage{fancyhdr}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage[headheight=15pt]{geometry}
\newcounter{week}
\renewcommand{\arraystretch}{0.3}
\newcommand{\myniceheader}{%
\refstepcounter{week}
\begin{tabularx}{\linewidth}{XcX}
\cline{1-1} \cline{3-3}
& \multirow{5}{*}{\bfseries Problems of Week \theweek} & \tabularnewline
\cline{1-1} \cline{3-3} \tabularnewline
\cline{1-1} \cline{3-3} \tabularnewline
\cline{1-1} \cline{3-3} \tabularnewline
\cline{1-1} \cline{3-3}
\end{tabularx}}
\renewcommand{\headrulewidth}{0pt}
\fancypagestyle{plain}{%
\fancyhf{}
\chead{\myniceheader}
}
\usepackage{blindtext}
\begin{document}
\pagestyle{plain}
\blindtext[20]
\end{document}
使用阵列规则颜色进行更新并控制规则的厚度
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{fancyhdr}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage[headheight=28pt]{geometry}
\newcounter{week}
\renewcommand{\arraystretch}{0.3}
\newcommand{\myniceheader}{%
\refstepcounter{week}
\begingroup
\arrayrulecolor{blue}
\renewcommand{\arrayrulewidth}{1.5pt}
\begin{tabularx}{\linewidth}{XcX}
\cline{1-1} \cline{3-3}
& \multirow{5}{*}{\bfseries Problems of Week \theweek} & \tabularnewline
\cline{1-1} \cline{3-3} \tabularnewline
\cline{1-1} \cline{3-3} \tabularnewline
\cline{1-1} \cline{3-3} \tabularnewline
\cline{1-1} \cline{3-3}
\end{tabularx}
\endgroup
}
\renewcommand{\headrulewidth}{0pt}
\fancypagestyle{plain}{%
\fancyhf{}
\chead{\myniceheader}
}
\usepackage{blindtext}
\begin{document}
\pagestyle{plain}
\blindtext[20]
\end{document}