模仿布局 LaTeX Companion (回忆录) - OneSide 章节标题问题

模仿布局 LaTeX Companion (回忆录) - OneSide 章节标题问题

我正在尝试使用配套布局设置文档作为页面和章节,但只使用单面。太乱了。双面可用。

我读了 100 页手册。我不是程序员,但——无意冒犯——大多数手册都是程序员为程序员编写的。回忆录手册也不例外。

  1. 章节标题和边距无法正确显示oneside,只能通过选项twoside

以下是 MWE:

\documentclass[12pt,a4paper,oneside]{memoir}  % <-- oneside is not working, only twoside
\usepackage{librecaslon}
\usepackage[T1]{fontenc}
\usepackage[svgnames]{xcolor}
\usepackage{kantlipsum}
\usepackage{layout}
%\usepackage[outer=6cm,inner=2cm,heightrounded,marginparwidth=3.5cm,%
%marginparsep=.5cm,bindingoffset=14pt,bottom=2.5cm,top=2.5cm]{geometry}
\usepackage{tikz}

%\setlength{\headwidth}{\textwidth}
%\addtolength{\headwidth}{\marginparsep}
%\addtolength{\headwidth}{\marginparwidth}
\setmarginnotes{10pt}{100pt}{\onelineskip}

\newcommand\Mnote[2][Black]{\mbox{}\marginpar{\small%
        {\emph{\color{#1}\hspace{0pt}#2}}}}

\pagestyle{companion}
\chapterstyle{companion}

\title{Title}
\author{Author}
\date{\today}

\begin{document}
\layout


\maketitle
\pagestyle{empty} 
\cleardoublepage

\tableofcontents* 
\pagestyle{empty} 

\chapter{Intro}
\Mnote[Crimson]{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[1]
\Mnote[ForestGreen]{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[2]
\section{Section}  % <-- has chapter name in Heading insted of section
\Mnote[MidnightBlue]{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[4]
\subsection{Subsection}   % <-- not added to TOC
\kant[5]
\chapter{Acknowledgment}
\kant[6]

\end{document}

1 号

在此处输入图片描述

答案1

这是partial对我的问题的回答。最初的想法是模仿 Companion 的风格,因为one side使用two side选项所有元素都显示正确。

备注:我既不是程序员也不是数学家(我教文学),下面的解决方案基于我对页面几何的理解。我认为程序员会想出一个更优雅、更简单的解决方案。

首先:thank you @Mico感谢您指出与thispagestyle{empty}&有关的初始问题thank you @leandriis,并向我说明我的边注大小导致了该问题。

所以,

经过两天的搜索,tex.stackexchange.com我终于找到了一个部分解决方案。看来使用A4paper回忆录documentclass不是一个好的解决方案,因为它有预定义的维度集。

因此我必须重建页面以适应30mm 边注的大小。

还有一个问题:the page Title由于页面设置,它没有居中。也许有人能帮我解决这个问题。

我还从这篇文章中获得了设置页面的帮助: 修复文本块和比例边距后,回忆录中的边距设置不正确 结合搜索memoir manual以更好地理解宏,因为它们与geometry包不同。

下面是partial solution

\documentclass[12pt,oneside,draft]{memoir}
\usepackage[svgnames]{xcolor}
\usepackage{kantlipsum}
\usepackage{layout}
\usepackage{tikz}

\newcommand\Mnote[2][Black]{\mbox{}\marginpar{\small%
        {\emph{\color{#1}\hspace{0pt}#2}}}} % set marginnotes

\setstocksize{297mm}{210mm} % set the stock size at A4 (297x210mm)
\settrimmedsize{270mm}{180mm}{*} % set the page size at 24x17cm
%\settrims{15mm}{23mm} % center the page on the stock
\settrims{15mm}{15mm} % center the page on the stock / see sec. 2.7 PUTTING IT TOGETHER in manual
\settypeblocksize{200mm}{140mm}{*} % set the textblock size
\setlrmargins{*}{35mm}{*} % set the fore-edge margin 1.5 times the spine margin
\setulmargins{*}{*}{2} % set the lower margin the same as the upper margin
\setmarginnotes{7pt}{30mm}{\onelineskip} % set marginnotes {<separation>}{<width>}{<push>}
\checkandfixthelayout


\pagestyle{companion} % use Companion style as page (header&footer)
\chapterstyle{companion}  % use Companion style for chapter (header&footer)
\setcounter{secnumdepth}{2} % Set number for subsection 
\setcounter{tocdepth}{2}  % Set TOC to show subsection

\title{Title}
\author{Author}
\date{\today}

\begin{document}

\layout % show layout of the page

\maketitle  
\thispagestyle{empty}
\cleardoublepage

\tableofcontents*
\thispagestyle{empty} 

\chapter{Intro}
\thispagestyle{empty}
\Mnote[Crimson]{The reader should be careful to observe that the objects}%
\kant[1]
\section{Section}
\Mnote[ForestGreen]{The reader should be careful to observe that the objects}
\kant[2]
\vfil  % <-- just to push marginnote to the next page since they don't break
\subsection{Subsection} 
\Mnote[MidnightBlue]{The reader should be careful to observe that the objects}
\kant[3]

\end{document}

相关内容