双栏文档两侧的边注(和小节标题)

双栏文档两侧的边注(和小节标题)

我想编写一份有两列的书籍文档,并在页面的两侧(与列相对应的一侧)使用小节标题作为边注。

为了指定子小节标题,我使用了一个简单的变体titlesec 示例代码

\newcommand{\secformat}[1]{\MakeLowercase{\so{#1}}}
% \so spaces out letters
\titleformat{\subsubsection}[block]
{\normalfont\scshape\filcenter}
{\thesubsubsection}
{1em}
{\secformat}
% La subsubseccion
\titleformat{\subsubsection}[leftmargin]
{\normalfont
\titlerule*[.6em]{\bfseries.}%
\vspace{6pt}%
\sffamily\bfseries\filleft}
{\thesubsubsection}{.5em}{}
\titlespacing{\subsubsection}
{4pc}{1.5ex plus .1ex minus .2ex}{1pc}

正如您在下图中看到的,边距标题位于左侧,因为它在代码中被设置为固定参数,所以标题位于右列的文本上方。

双列示例

我想知道如何动态检查标题是否对应右列或左列并将其放在实际边距中:我想可以通过设置参数来完成[leftmargin][rightmargin]但我不确定:-?

答案1

我不确定您在更改基础文档类时有多大的灵活性,但回忆录类包含与 titlesec 类似的功能,并且默认情况下不会出现此问题。

\documentclass[twocolumn]{memoir}
\usepackage{lipsum}
\settrimmedsize{11in}{210mm}{*}
\setlength{\trimtop}{0pt}
\setlength{\trimedge}{\stockwidth}
\addtolength{\trimedge}{-\paperwidth}
\settypeblocksize{7.75in}{33pc}{*}
\setulmargins{4cm}{*}{*}
\setlrmargins{1.25in}{*}{*}
\setmarginnotes{17pt}{51pt}{\onelineskip}
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{*}{2\onelineskip}{*}
\checkandfixthelayout

\begin{document}
\chapter{Chapter Title}
\section{Section Title}
\marginpar{\subsection{Subsection Title 1}}{\lipsum[1-3]}
\marginpar{\subsection{Subsection Title 2}}{\lipsum[4]}
\end{document}

这里我使用的是回忆录手册(第 2.9.1 节)中的页面布局。您需要通读其页面布局文档并根据您的需要进行调整。

结果:

回忆录边注示例

相关内容