我想创建一个跨页的网格。所以我有以下代码:
\documentclass[letter,openleft,twoside]{memoir}
\usepackage[left=0pt,right=0pt,top=2cm,bottom=2cm]{geometry}
\usepackage{forloop}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\fancypagestyle{mypagestyle}{%
\fancyhf{}% Clear header/footer
\fancyhead[OC]{}% Author on Odd page, Centred
\fancyhead[EC]{Week of \makebox[2in]{\dotfill} to \makebox[2in]{\dotfill}}% Title on Even page, Centred
\fancyfoot[C]{\thepage}%
\renewcommand{\headrulewidth}{0pt}% Header rule of .4pt
}
\pagestyle{mypagestyle}
\newcommand{\aline}{\\\hline &&&&&&\rule{0cm}{5cm}}
\newcounter{theyflines}
%\pagestyle{empty}
\parindent=0pt
\newcommand{\apage}{
\adjustbox{clip=true,trim=0pt 0pt {\textwidth} 0pt}{\usebox\tempbox}
\pagebreak\vspace*{\fill}%
\adjustbox{clip=true,trim={\textwidth} 0pt 0pt 0pt}{\usebox\tempbox}
}
\newcounter{theyfpages}
\newsavebox{\tempbox}
\newlength{\pwidth}
\newlength{\spwidth}
\setlength{\pwidth}{\dimexpr \textwidth-6\tabcolsep-4\arrayrulewidth}%
\divide\pwidth by 3
\setlength{\spwidth}{\dimexpr \pwidth-2cm-2\tabcolsep-\arrayrulewidth}%
\savebox{\tempbox}{% fit 3 columns into \textwidth
\begin{tabular}{p{2cm}|p{\spwidth}|p{\pwidth}|p{\pwidth}|p{\pwidth}|p{\pwidth}|p{\pwidth}|}
\hline
Course & Weekly goal & Monday & Tuesday & Wednesday & Thursday & Friday
\forloop{theyflines}{1}{\value{theyflines} < 5}{\aline}\\
\hline
&&&&&&\rule{0cm}{2cm}\\
\hline
\end{tabular}}
\begin{document}
\null\newpage
\forloop{theyfpages}{1}{\value{theyfpages} < 41}{\apage}
\end{document}
如何才能使对开页上的行正确对齐?我尝试使用 中的边距选项geometry
,但没有什么帮助。