如何将页边距纳入回忆录的页眉和页脚中?

如何将页边距纳入回忆录的页眉和页脚中?

我想知道如何实现以下两件事:

  1. 我想定义页边距以用于\marginpar注释和评论。问题是,虽然我使用带有 twoside 选项的 memoir,但奇数页外边距和偶数页外边距不同。我希望奇数页和偶数页的外边距完全相同(例如,外边距为 6 厘米,内边距为 2 厘米)。

  2. 我想扩展页眉和页脚以包含外边距(marginsep 和 marginwidth)。据我了解,可以使用页面样式来完成此操作companion,但我更喜欢默认章节样式(即其字体、样式、形状、无规则等)。我如何修改章节页面样式以使页眉和页脚延伸到边距区域?顺便说一句:我确实尝试headwidth通过使用companion回忆录手册中的样式定义进行修改。但我没有成功:

我尝试过这个:

\setlength{\headwidth}{\textwidth}
 \addtolength{\headwidth}{\marginparsep}
 \addtolength{\headwidth}{\marginparwidth}

 \copypagestyle{chapter}{plain}
 \makerunningwidth{chapter}{\headwidth} 

这是 MWE。我尝试将其缩短一点。

\documentclass[12pt,foliopaper,twoside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{kantlipsum}
\usepackage{tikz}


%*****************Margins and MarginNotes******************

\setmarginnotes{10pt}{5cm}{6pt}
\setlength{\textwidth}{0.9\textwidth}
\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[\footnotesize #1]%
{\raggedright\footnotesize #1}}

%*******************Header & Footer***********************
 \nouppercaseheads 
%***********************Document*******************
\author{Author}
\date{\today}
\title{\textbf{Title}}

\begin{document}

\maketitle

\chapter{Chapter 1}

\kant[12]
\marginpar{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\kant[8]
\marginpar{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\kant[7]\marginpar{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\section{Section 1}
\kant[7]


\chapterstyle{default}
\newpage

\printindex
\end{document}

答案1

我用的是几何学正确设置边距大小(6 个外边距,2 个内边距)。记住\headwidth必须几何边距定义。正如达莱夫使用回忆录同伴风格会更加简单和干净。如果您希望第一章页面具有相同的样式,只需\aliaspagestyle{chapter}{companion}在 \pagestyle 后添加即可。Adobe Acrobat 中的屏幕截图:回忆录伴侣宽标题

\documentclass[12pt,foliopaper,twoside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{kantlipsum}
\usepackage{tikz}

%*****************Margins and MarginNotes******************

\usepackage[outer=6cm, inner=2cm, heightrounded, marginparwidth=4cm, marginparsep=1cm]{geometry}

%*******************Header & Footer***********************

\setlength{\headwidth}{\textwidth}
\addtolength{\headwidth}{\marginparsep}
\addtolength{\headwidth}{\marginparwidth}

 \nouppercaseheads 
%***********************Document*******************
\author{Author}
\date{\today}
\title{\textbf{Title}}

\pagestyle{companion}

\begin{document}

\maketitle
\chapter{Chapter 1}
\kant[12]
\marginpar{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\kant[8]
\marginpar{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\kant[7]\marginpar{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\section{Section 1}
\kant[7]
\marginpar{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\chapterstyle{default}
\newpage

\printindex
\end{document}

相关内容