```tex
\documentclass[8pt]{extarticle}
\usepackage[UTF8]{ctex}
%\usepackage[paperwidth=21cm,paperhei...
```tex
\documentclass[8pt]{extarticle}
\usepackage[UTF8]{ctex}
%\usepackage[paperwidth=21cm,paperheight=29.7cm,top=2.4cm,bottom=2.4cm,right=0.78cm,left=1.78cm]{geometry}
\usepackage[paperwidth=21cm,paperheight=29.7cm,top=2.6cm,bottom=2.1cm,right=0.8cm,left=0.8cm,headheight=1cm,showframe]{geometry}
\usepackage{tikz}
\usepackage{fancyhdr}
\setlength{\linewidth}{19.4cm}
\makeatletter
\newlength{\blk@height}
\newlength{\blk@width}
\newlength{\blk@cell@ht}
\newlength{\blk@cell@dp}
\newlength{\blk@cell@total}
\newlength{\blk@cell@wd}
\setlength{\blk@height}{\dimexpr\pagegoal-\pagetotal\relax}
\setlength{\blk@width}{\linewidth}
\setlength{\blk@cell@ht}{20pt}
\setlength{\blk@cell@dp}{4pt}
\setlength{\blk@cell@total}{\dimexpr\blk@cell@ht + \blk@cell@dp\relax}
\setlength{\blk@cell@wd}{20pt}
\newcommand{\drawBlocks}[1]{%
\def\rowCount{#1}%
\pgfmathsetmacro{\colCount}{floor(\blk@width / \blk@cell@wd)}%
\\
\foreach \y in {0, ..., \rowCount} {
\begin{tikzpicture}
\draw (0, \y * -\blk@cell@total) -- +(\blk@cell@wd * \colCount, 0)
++(0, -\blk@cell@ht) -- +(\blk@cell@wd * \colCount, 0);
\foreach \x in {0, ..., \colCount} {
\draw (\x * \blk@cell@wd, \y * -\blk@cell@total) -- +(0pt, -\blk@cell@ht);
}
\end{tikzpicture}
\ifnum\y=\rowCount
\relax
\else%
\\[4pt]
\fi%
}%
}
\makeatother
\pagestyle{fancy}
\lhead{\rule[0mm]{5mm}{5mm}}
\chead{\rule[0mm]{5mm}{5mm} {\hbox to 53mm{}} \rule[0mm]{5mm}{5mm}}
\rhead{\rule[0mm]{5mm}{5mm}}
\lfoot{\rule[0mm]{5mm}{5mm}}
\rfoot{\rule[0mm]{5mm}{5mm}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\setlength{\tabcolsep}{0.pt}
\raggedbottom
\begin{document}
\noindent
12.写作表达\quad\\[0pt]从下面两题中任选一题,按要求完成任务。\quad\\[0pt]\indent \textbf{题一:开在心中的花朵}\quad\\[0pt]\indent \textbf{题二:我最想感谢的人}\quad\\[0pt]\indent 要求:\textcircled{1}不少于600字;\textcircled{2}书写工整,语句通顺,勿写错别字;\textcircled{3}有事例,有真情实感。\quad\\[0pt]
\drawBlocks{51}
\end{document}
```
页眉的内容怎么和底部的线对齐。
![](https://pics.latexstudio.net/data/images/201912/daac5b8bb6f7d4a.png)
一周热门 更多>