边框页+空白页

边框页+空白页

我尝试了这个漂亮的解决方案来在页面中创建边框,现在我想创建许多没有内容的页面。主要想法是只打印边框来做笔记。我在文档中尝试了许多选项,但都不起作用。这个方法有效\lipsum[2-20],但我不想要 lipsum 代码。

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[scale=1,angle=0,opacity=1,color=black!60]{background}
\usepackage{tikzpagenodes}
\usepackage{lastpage}
\usepackage{lmodern}
\usepackage{lipsum}

\makeatletter

% A length to control the separation of the text and the frame
\newlength\AUCFrameSep
\setlength\AUCFrameSep{2cm}

% A length to control the height of the minipages used in the header
\newlength\AUCBoxHt
\setlength\AUCBoxHt{1.5cm}

% A length to control the width of the frame
\newlength\AUCFrameWd
\setlength\AUCFrameWd{\textwidth}
\addtolength\AUCFrameWd{2\AUCFrameSep}

% Definition of the user commands to fill the header
% Initially they are empty
\newcommand\Description[1]{\gdef\@ACUdescription{\textsc{#1}}}
\newcommand\LibNum[1]{\gdef\@ACUlibnum{\textsc{#1}}}
\newcommand\Rev[1]{\gdef\@ACUrev{#1}}
\Description{}
\LibNum{}
\Rev{}

% Command to build each one of the boxes for the header
% \AUCBox{<width>}{<title>}{<contents>}
% The optional argument controls the height of the minipages;
% default value= \AUCBoxHt 
\newcommand\AUCBox[4][\AUCBoxHt]{%
\fbox{\begin{minipage}[t][#1][t]{#2}
\begin{flushleft}\footnotesize #3\end{flushleft}
\centering#4
\end{minipage}}}

% We define the background: the header and the frame
\backgroundsetup{%
contents={%
\begin{tikzpicture}[remember picture,overlay]
\draw 
  ([xshift=-\AUCFrameSep,yshift=-2cm]current page text area.north west|-current page.north west)
  rectangle
  ([xshift=\AUCFrameSep,yshift=-1.5\AUCFrameSep]current page text area.south east);
\node[anchor=north west,xshift=-\the\dimexpr\AUCFrameSep+\fboxrule\relax,yshift=-2cm,inner sep=0pt,outer sep=0pt] at (current page text area.north west|-current page.north west)
{%
  \sffamily\small%
  \setlength\fboxsep{2pt}%
  \AUCBox{\dimexpr.6\AUCFrameWd-3\fboxrule-8\fboxsep\relax}{Description}{\@ACUdescription}\kern-\fboxrule%
  \AUCBox{.175\AUCFrameWd}{Lib Num}{\@ACUlibnum}\kern-\fboxrule%
  \AUCBox{0.10\AUCFrameWd}{Rev.}{\@ACUrev}\kern-\fboxrule%
  \AUCBox{0.125\AUCFrameWd}{Page}{\scshape\thepage\ of \pageref{LastPage}}%
};%
\end{tikzpicture}%
  }
}
\makeatother

\Description{\vskip-2ex%
  Description line 1 \\
  Description line 2 \\
  Description line 3 \\
}
\LibNum{Doc 12345}
\Rev{---}

\usepackage{afterpage}

\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage}

\begin{document}

\lipsum[2-20]

\end{document}

PD:感谢边界:带有方框部分和页面边框的页眉

相关内容