提问于:
浏览数:
2670
```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.4cm,bottom=2.4cm,right=1.28cm,left=1.28cm,showframe]{geometry}
\usepackage{tikz}
\usepackage{fancyhdr}
\setlength{\linewidth}{18.44cm}
\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}{26pt}
\setlength{\blk@cell@dp}{4pt}
\setlength{\blk@cell@total}{\dimexpr\blk@cell@ht + \blk@cell@dp\relax}
\setlength{\blk@cell@wd}{26pt}
\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]{7mm}{7mm}}
\chead{\rule[0mm]{7mm}{7mm} {\hbox to 53mm{}} \rule[0mm]{7mm}{7mm}}
\rhead{\rule[0mm]{7mm}{7mm}}
\lfoot{\rule[0mm]{7mm}{7mm}}
\rfoot{\rule[0mm]{7mm}{7mm}}
\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}
```
1 回答
0
注意看 log
```
Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 22.76694pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.
```
这导致第 1 页和后面页面的页面布局不同。
为 `geometry` 宏包增加选项 `headheight=24pt` 即可修复问题。
-
非常感谢! – wlianghe00 2019-12-19 10:03 回复
你的回答
请登录后回答
你的回答将会帮助更多人,请务必认真回答问题。