
나는 의 답변을 사용해 보았습니다.각 페이지에 테두리 추가페이지 테두리를 만들면 작동하지만 특정 페이지에서 페이지 테두리를 제거할 수 있는 방법이 있는지 궁금합니다.
댓글로 물어보고 싶지만 안타깝게도 평판이 50이 아닙니다 :(
감사해요.
답변1
다음은 귀하가 인용한 답변의 확장 버전입니다.
% noborderprob.tex SE 559677
% the following code mainly from SE 404749
\documentclass{article}
% PW added the folowing code
\usepackage{lipsum}
\usepackage{ifthen}
\newboolean{borderon}
\newcommand{\borders}{\setboolean{borderon}{true}} % have borders
\newcommand{\noborders}{\setboolean{borderon}{false}} % no borders
\borders
% end of addition
\usepackage{calc}
\usepackage{eso-pic}
\newlength{\PageFrameTopMargin}
\newlength{\PageFrameBottomMargin}
\newlength{\PageFrameLeftMargin}
\newlength{\PageFrameRightMargin}
\setlength{\PageFrameTopMargin}{1cm}
\setlength{\PageFrameBottomMargin}{1cm}
\setlength{\PageFrameLeftMargin}{1cm}
\setlength{\PageFrameRightMargin}{1cm}
\makeatletter
\newlength{\Page@FrameHeight}
\newlength{\Page@FrameWidth}
% PW modified the \AddToShipoutPicture to output nothing for borderon=false
\AddToShipoutPicture{
\ifthenelse{\boolean{borderon}}{%
\thinlines
\setlength{\Page@FrameHeight}{\paperheight-\PageFrameTopMargin-\PageFrameBottomMargin}
\setlength{\Page@FrameWidth}{\paperwidth-\PageFrameLeftMargin-\PageFrameRightMargin}
\put(\strip@pt\PageFrameLeftMargin,\strip@pt\PageFrameTopMargin){
\framebox(\strip@pt\Page@FrameWidth, \strip@pt\Page@FrameHeight){}}}
{}}
\makeatother
\begin{document}
\section{Test}
% PW added the following code
\lipsum
\lipsum
\noborders % stop page borders
\lipsum
\borders % start page borders
\lipsum
\end{document}
이는 테두리가 있는 페이지부터 시작됩니다. 경계를 중지하려면 \noborders
경계가 없는 페이지를 놓습니다. \borders
경계를 다시 시작하려는 페이지를 놓습니다 .