我这里有一张来自《现代物理学》教科书的示例图像。我也喜欢章节样式(我想我可以用回忆录文档类来实现它们,但那是以后的事了)。现在,我正在尝试弄清楚如何让章节编号和标题显示在章节标题页的页边空白处。另外,有人认为这可以在书籍文档类而不是回忆录中工作吗?
答案1
我最近刚刚研究过这个问题,将 chapterstyle(数字)左对齐,我以 OP 的 MWE 为起点,并将此调用的宽度\makebox[3.2cm][r]{\usebox\feline@chapter}
从 0pt 更改为您在此处看到的 3.2cm,从而将红色章节编号框向右移动了该量。
然后,我在包的帮助下创建了一个包含列表的\marginpar
目录。它位于枚举的 s所在的名称下。事实上,我不得不手动插入 toc 组件,而不是使用像 这样的自动化工具,但 OP 在他的评论中似乎对此表示同意。\parbox
enumerate
enumitem
\addtoc{}
\item
minitoc
\documentclass[11pt, a4paper, oneside]{memoir}
\usepackage{color,calc,graphicx,soul,fourier}
\definecolor{wine}{rgb}{.5,0,0}
\makeatletter
\newlength\dlf@normtxtw
\setlength\dlf@normtxtw{\textwidth}
\def\myhelvetfont{\def\sfdefault{mdput}}
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{wine}{\color{white}\bfseries\thechapter}%
}}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
{!}{\scshape\so\@chapapp}}\quad%
\raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][l]{%
\makebox[3.2cm][r]{\usebox\feline@chapter}%
}}
\makechapterstyle{daleif1}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont ##1\par}
}
\makeatother
\chapterstyle{daleif1}
\usepackage{blindtext}
\newcommand\addtoc[1]{%
\leavevmode\marginpar{%
\parbox[t]{3.5cm}{\raggedright\footnotesize\sffamily%
\vspace{-7pt}%
\begin{enumerate}[leftmargin=.65cm, topsep=0pt, partopsep=0pt,
label=\textcolor{blue}{\thechapter-\arabic*}, nosep]%
#1
\end{enumerate}%
}%
}%
}
\usepackage{enumitem}
\begin{document}
\chapter{First Chapter}
\addtoc{
\item Newton's Laws
\item Work, Energy, and the Conservation of Energy
\item Rotations and the Center of Mass
\item Elastic Media and Waves
\item Thermal Phenomena
\item The Atomic Structure of Matter
\item Electricity and Magnetism
\item Electromagnetic Waves and Light
}
\blindtext
\blindtext
\end{document}