![创建新的标题样式](https://linux22.com/image/347494/%E5%88%9B%E5%BB%BA%E6%96%B0%E7%9A%84%E6%A0%87%E9%A2%98%E6%A0%B7%E5%BC%8F.png)
答案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}