回忆录中的页面边框问题

回忆录中的页面边框问题

我正在基于回忆录文档类编写一本用于礼拜仪式的福音书(约 500 页)(可以使用 和pdfLaTeX下面的最小示例进行处理,尽管我实际上使用的是XeLaTeX),我已经弄清楚了如何通过图片环境生成页面边框。最小示例使用几个常见的字形来演示问题:一旦发出命令,我就无法控制边框。我希望一些页面真正空白且无边框。

移动\pageborder到文档中稍后的某个点将允许前面的页面无边框。但是发出该命令后,如何生成无边框页面?似乎必须在命令中添加或修改某些内容\pagestyle(或更深入地修改)才能引入真正的空白页。但是怎么做呢?或者我应该使用另一种方式来生成边框而不是图片环境?

我已经看到了可以用 等做什么pgfornaments——但我回避它,因为它对我来说看起来太复杂了!也许有人会说服我,但我持怀疑态度。:-)

我正在使用安装在 OS10.14.6 上的 MacTeX 2022。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[11pt,draft]{memoir}
\settypeblocksize{8in}{5in}{*}
\setlrmargins{*}{*}{1}
\setulmargins{1.5in}{*}{.5}
\checkandfixthelayout

\usepackage{fancybox}
\usepackage{lipsum}
\usepackage{color}

\newcommand\pageborder{
\fancyput{% 
\setlength{\unitlength}{12bp}% 
\begin{picture}(0,44)%
\fontsize{12bp}{12bp}\selectfont\color{red}%
\put(-2,3){+}%  upper left corner
\put(-1,3){ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo}% top row
\put(40,3){+}%  upper right corner
\put(-2,-57){+}%  bottom left corner
\put(-1,-57){ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo}%  botom row
\put(40,-57){+} %  bottom right corner          
\end{picture}}{} 
}

\setsecnumdepth{chapter}

\pagestyle{ruled}
\makeevenhead{ruled}{\thepage}{\MakeLowercase{\scshape The Real Story}}{}
\makeoddhead{ruled}{}{\MakeLowercase{\scshape Raw and Unfiltered}}{\thepage}
\makeevenfoot{ruled}{}{}{}
\makeoddfoot{ruled}{}{}{}

\title{The Beginning of My Troubles…}
\author{Yours Truly}

\begin{document}
\maketitle\pageborder
\lipsum[1-9]
\chapter{I tried everything}
\lipsum[10-20]
\chapter{Same old same old}
\lipsum[21-24]\pagestyle{plain}
\lipsum[41]
\newpage\thispagestyle{empty}
\lipsum[44]




\end{document}

答案1

在此处输入图片描述

ruled我在和页面样式中添加了边框plain。但不是empty,因此您可以使用以下方式启用/禁用边框\(this)pagestyle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[11pt,draft]{memoir}
\settypeblocksize{8in}{5in}{*}
\setlrmargins{*}{*}{1}
\setulmargins{1.5in}{*}{.5}
\checkandfixthelayout

\usepackage{fancybox}
\usepackage{lipsum}
\usepackage{color}

\newcommand\pageborder{%<<< you need this
%\fancyput{% 
\setlength{\unitlength}{12bp}% 
\begin{picture}(0,0)% 0,0
\fontsize{12bp}{12bp}\selectfont\color{red}%
\put(-4,3){+}%  upper left corner
\put(-3,3){ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo}% top row
\put(38,3){+}%  upper right corner
\put(-4,-57){+}%  bottom left corner
\put(-3,-57){ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo}%  botom row
\put(38,-57){+} %  bottom right corner          
\end{picture}%<<< you need this 
}

\setsecnumdepth{chapter}

\pagestyle{ruled}
\makeevenhead{ruled}{\pageborder\thepage}{\MakeLowercase{\scshape The Real Story}}{}
\makeoddhead{ruled}{\pageborder}{\MakeLowercase{\scshape Raw and Unfiltered}}{\thepage}
\makeevenfoot{ruled}{}{}{}
\makeoddfoot{ruled}{}{}{}
\makeevenhead{plain}{\pageborder}{}{}
\makeoddhead{plain}{\pageborder}{}{}


\title{The Beginning of My Troubles…}
\author{Yours Truly}

\begin{document}
\maketitle
\lipsum[1-9]
\chapter{I tried everything}
\lipsum[10-20]
\chapter{Same old same old}
\lipsum[21-24]\pagestyle{plain}
\lipsum[41]
\newpage\thispagestyle{empty}
\lipsum[44]




\end{document}

相关内容