我使用以下代码片段创建法律诉状文件 - 左侧第 1 至第 28 行有两条垂直线,右侧有一条垂直线。
问:如何才能隐藏某一特定页面的垂直线和行号?[例如,\newpage
... \suppress-pleading-paper]
% BEGIN vertical lines and line numbers.
\usepackage{eso-pic}
\usepackage{calc}
\newlength{\leftruleA}
\setlength{\leftruleA}{3.0\leftmargin-\marginparsep}
\newlength{\leftruleB}
\setlength{\leftruleB}{2.8\leftmargin-\marginparsep}
\newlength{\rightrule}
\setlength{\rightrule}{2.6\leftmargin+\textwidth+\marginparsep}
\AddToShipoutPicture{
\AtPageLowerLeft {
\put(\LenToUnit{\leftruleA},0){\rule{1pt}{\paperheight}}
\put(\LenToUnit{\leftruleB},0){\rule{1pt}{\paperheight}}
\put(\LenToUnit{\rightrule},0){\rule{1pt}{\paperheight}}
\rput(1.6,13.74) {
\begin{minipage}[t]{5mm}
\begin{flushright}
\begin{doublespace}
1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\20\\21\\22\\23\\24\\25\\26\\27\\28
\end{doublespace}
\end{flushright}
\end{minipage} }}}
% END
编辑:应下面评论中@A Feldman 的要求,以下是生成法律诉状文件(加利福尼亚州)的完整模板 - 它与 TeXLive 2012 配合良好:
\documentclass{article}
\usepackage{soul}
\usepackage{geometry}
\newgeometry{top=.84in, bottom=.7in, left=1in, right=.5in}
\setlength{\footskip}{15pt}
\usepackage{ulem}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\usepackage{parskip}
\setlength{\parskip}{0mm}
\usepackage[all]{nowidow}
\usepackage{pstricks}
\usepackage{quoting}
\quotingsetup{leftmargin=1in, rightmargin=1in, vskip=-1.5mm}
\makeatletter
\g@addto@macro\quoting\singlespacing
\g@addto@macro\quoting{\vspace{-2mm}}
\makeatother
\makeatletter
\renewenvironment{quotation}
{\list{}{\listparindent=0pt
\itemindent \listparindent
\leftmargin=1in
\rightmargin=1in
\topsep=-1mm
\parsep \z@ \@plus\p@}
\item\relax}
{\endlist}
\makeatother
\usepackage[T1]{pbsi}
\usepackage{times}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\normalsize}
{\fontsize{14}{14.5}\selectfont}
\newcommand*{\ptm}{
\fontfamily{ptm} \selectfont
\fontsize{14}{0}
\selectfont}
\newcommand*{\bsi}{
\bsifamily \selectfont
\fontsize{16}{15}
\selectfont}
\usepackage{setspace}
\doublespacing
\raggedright
\usepackage{tabto}
\TabPositions{0.5in,1.0in,1.5in,2.0in,2.5in,3.0in,3.5in,4.0in,4.5in,5.0in,5.5in,6.0in,6.5in,7.0in}
\newcounter{foo}
\newcommand\num{%
\refstepcounter{foo}%
\thefoo.}
\newcounter{counter-ROMAN}
\newcommand\RONUM{%
\refstepcounter{counter-ROMAN}%
\Roman{counter-ROMAN}.}
\newcounter{counter-roman}
\newcommand\ronum{%
\refstepcounter{counter-roman}%
\roman{counter-roman}.}
\newcounter{counter-arabic}
\newcommand\arabnum{%
\refstepcounter{counter-arabic}%
\arabic{counter-arabic}.}
\newcounter{counter-alpha}
\newcommand\alphanum{%
\refstepcounter{counter-alpha}%
\alph{counter-alpha}.}
\newcounter{counter-ALPHA}
\newcommand\ALPHA{%
\refstepcounter{counter-ALPHA}%
\Alph{counter-ALPHA}.}
\newenvironment{tightcenter}{
\setlength\topsep{0pt}
\setlength\parskip{0pt}
\begin{center} }{
\end{center} }
% BEGIN vertical lines and line numbers.
\usepackage{eso-pic}
\usepackage{calc}
\newlength{\leftruleA}
\setlength{\leftruleA}{3.0\leftmargin-\marginparsep}
\newlength{\leftruleB}
\setlength{\leftruleB}{2.8\leftmargin-\marginparsep}
\newlength{\rightrule}
\setlength{\rightrule}{2.6\leftmargin+\textwidth+\marginparsep}
\AddToShipoutPicture{
\AtPageLowerLeft {
\put(\LenToUnit{\leftruleA},0){\rule{1pt}{\paperheight}}
\put(\LenToUnit{\leftruleB},0){\rule{1pt}{\paperheight}}
\put(\LenToUnit{\rightrule},0){\rule{1pt}{\paperheight}}
\rput(1.6,13.74) {
\begin{minipage}[t]{5mm}
\begin{flushright}
\begin{doublespace}
1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\20\\21\\22\\23\\24\\25\\26\\27\\28
\end{doublespace}
\end{flushright}
\end{minipage} }}}
% END
% BEGIN footer
\newcommand{\settitle}[1]{\renewcommand{\mytitle}{#1}}
\newcommand{\mytitle}{Title Not Set!}
\pagestyle{fancy}
\cfoot{\vspace{-1mm} \ptm{-\thepage-} }
\rfoot{\makebox[2in]{\hrulefill}\\ \mytitle }
% END
% \usepackage{draftwatermark}
\begin{document}
\end{document}
答案1
您可以使用清除设置\ClearShipoutPictureBG
,然后在页面结束后重置。为了更方便,我将垂直线和线号放在一个新的宏中。
\documentclass{article}
\usepackage{soul}
\usepackage{geometry}
\newgeometry{top=.84in, bottom=.7in, left=1in, right=.5in}
\setlength{\footskip}{15pt}
\usepackage{ulem}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\usepackage{parskip}
\setlength{\parskip}{0mm}
\usepackage[all]{nowidow}
\usepackage{pstricks}
\usepackage{quoting}
\quotingsetup{leftmargin=1in, rightmargin=1in, vskip=-1.5mm}
\makeatletter
\g@addto@macro\quoting\singlespacing
\g@addto@macro\quoting{\vspace{-2mm}}
\makeatother
\makeatletter
\renewenvironment{quotation}
{\list{}{\listparindent=0pt
\itemindent \listparindent
\leftmargin=1in
\rightmargin=1in
\topsep=-1mm
\parsep \z@ \@plus\p@}
\item\relax}
{\endlist}
\makeatother
\usepackage[T1]{pbsi}
\usepackage{times}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\normalsize}
{\fontsize{14}{14.5}\selectfont}
\newcommand*{\ptm}{
\fontfamily{ptm} \selectfont
\fontsize{14}{0}
\selectfont}
\newcommand*{\bsi}{
\bsifamily \selectfont
\fontsize{16}{15}
\selectfont}
\usepackage{setspace}
\doublespacing
\raggedright
\usepackage{tabto}
\TabPositions{0.5in,1.0in,1.5in,2.0in,2.5in,3.0in,3.5in,4.0in,4.5in,5.0in,5.5in,6.0in,6.5in,7.0in}
\newcounter{foo}
\newcommand\num{%
\refstepcounter{foo}%
\thefoo.}
\newcounter{counter-ROMAN}
\newcommand\RONUM{%
\refstepcounter{counter-ROMAN}%
\Roman{counter-ROMAN}.}
\newcounter{counter-roman}
\newcommand\ronum{%
\refstepcounter{counter-roman}%
\roman{counter-roman}.}
\newcounter{counter-arabic}
\newcommand\arabnum{%
\refstepcounter{counter-arabic}%
\arabic{counter-arabic}.}
\newcounter{counter-alpha}
\newcommand\alphanum{%
\refstepcounter{counter-alpha}%
\alph{counter-alpha}.}
\newcounter{counter-ALPHA}
\newcommand\ALPHA{%
\refstepcounter{counter-ALPHA}%
\Alph{counter-ALPHA}.}
\newenvironment{tightcenter}{
\setlength\topsep{0pt}
\setlength\parskip{0pt}
\begin{center} }{
\end{center} }
% BEGIN vertical lines and line numbers.
\usepackage{eso-pic}
\usepackage{calc}
\newlength{\leftruleA}
\setlength{\leftruleA}{3.0\leftmargin-\marginparsep}
\newlength{\leftruleB}
\setlength{\leftruleB}{2.8\leftmargin-\marginparsep}
\newlength{\rightrule}
\setlength{\rightrule}{2.6\leftmargin+\textwidth+\marginparsep}
\newcommand{\addlinenumbers}{
\AtPageLowerLeft {
\put(\LenToUnit{\leftruleA},0){\rule{1pt}{\paperheight}}
\put(\LenToUnit{\leftruleB},0){\rule{1pt}{\paperheight}}
\put(\LenToUnit{\rightrule},0){\rule{1pt}{\paperheight}}
\rput(1.6,13.74) {
\begin{minipage}[t]{5mm}
\begin{flushright}
\begin{doublespace}
1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\20\\21\\22\\23\\24\\25\\26\\27\\28
\end{doublespace}
\end{flushright}
\end{minipage} }}}
\AddToShipoutPicture{\addlinenumbers}
% END
% BEGIN footer
\newcommand{\settitle}[1]{\renewcommand{\mytitle}{#1}}
\newcommand{\mytitle}{Title Not Set!}
\pagestyle{fancy}
\cfoot{\vspace{-1mm} \ptm{-\thepage-} }
\rfoot{\makebox[2in]{\hrulefill}\\ \mytitle }
% END
% \usepackage{draftwatermark}
\begin{document}
Page with line numbers.
\newpage
\ClearShipoutPictureBG
Page without line numbers.
\newpage
\AddToShipoutPicture{\addlinenumbers}
Page with line numbers.
\end{document}