以下代码使用 Tikz 创建编号网格。我想将 << quadrill >> 环境适配到分页符。
实际上,网格不能在两个页面之间分成两部分。
\documentclass[a4paper,10pt,table]{book}
\usepackage{tikz,tikzpagenodes}
\usetikzlibrary{calc}
\usepackage[left=1.8cm,right=1.7cm,top=1.5cm,bottom=1.7cm,marginparwidth=0.8cm, marginparsep=0.4cm]{geometry}
\definecolor{quadrillgrey}{RGB}{179,182,183}
%Grid
\newcounter{NoQuadrill}
\setcounter{NoQuadrill}{1}
\newcommand{\quadrillseul}[1]{\smallbreak\begin{tikzpicture}[scale=0.5,grey]
\draw(0,0) grid (33.4,#1);
\end{tikzpicture}\medbreak}
\newcommand{\quadrill}[1]{\smallbreak\begin{tikzpicture}[scale=0.5,quadrillgrey]
\draw(0,0) grid (33.4,#1);
\node[anchor=north west] at (32.8,1.1) {\color{blue}\bfseries\Large{\thesection.\theNoQuadrill}};
\end{tikzpicture}
\refstepcounter{NoQuadrill}
\medbreak}
\newenvironment{Quadrill}[1]{\refstepcounter{NoQuadrill}\quadrill{#1}}{}
\begin{document}
\quadrill{12}
\end{document}