![如何为每个 {chapter} 或 {section} 添加 {author}、{tableofcontents} 和 {date}](https://linux22.com/image/279070/%E5%A6%82%E4%BD%95%E4%B8%BA%E6%AF%8F%E4%B8%AA%20%7Bchapter%7D%20%E6%88%96%20%7Bsection%7D%20%E6%B7%BB%E5%8A%A0%20%7Bauthor%7D%E3%80%81%7Btableofcontents%7D%20%E5%92%8C%20%7Bdate%7D.png)
我正在编写一本书(使用 xelatex),每一章都来自不同的作者,是否有任何环境/包可以将这些信息靠近每个章节/部分,而不是书的标题页?
答案1
检查combine
类(它也利用了包combinet
,combnat
并combcite
实现了在准备由不同作者的不同文章组成的卷时所期望的结果)。
我自己从未使用过它,但它似乎足以胜任这项工作。
答案2
不幸的是,我只能为您提供每章的目录建议。我使用库minitoc
来执行此操作。请参阅下面的代码。在每一章中,您必须添加命令\minitoc
。我通常还会设置计数器tocdepth
和secnumdepth
。我希望它至少能帮助您解决部分问题
\documentclass[%
,fontsize=12pt %
,b4paper, pagesize
,captions=nooneline
,DIV=11 % calculation of the typearea
,BCOR=12mm % binding correction for the left/inner side
]{scrbook}
\usepackage[x11names, dvipsnames, table]{xcolor} % http://www.ctan.org/pkg/xcolor/
% ~~~~~~~~~~~ Hyperlinks ~~~~~~~~~~~~~~~~~~~~~~~~
\usepackage[xetex]{hyperref}
\hypersetup{pdfauthor={Athor name},
pdftitle={Book name},
pdfsubject={My study notes},
pdfkeywords={linear algebra, math, electronics},
pdfpagelayout={TwoPageLeft}, % Displays two pages, odd-numbered pages to the left
pdfcreator={Xelatex}
bookmarks={true}, % A set of Acrobat bookmarks are written
colorlinks={true}, % Colors the text of links and anchors.
linkcolor={NavyBlue}, % Color for normal internal links.
anchorcolor={black}, % Color for anchor text.
filecolor={cyan}, % Color for URLs which open local files.
menucolor={red}, % Color for Acrobat menu items.
runcolor={blue}, % Color for run links (launch annotations).
urlcolor={NavyBlue}, % Color for linked URLs.
citecolor={CornflowerBlue}
}
\usepackage{lipsum}
\usepackage[nohints]{minitoc} % Control the fonts and formatting used in the table of
% contents.
\begin{document}
% =============================== TOC =============================================================
% this sets the depth to which things are listed in the table of contents
% (Chapters =0, Sections =1, etc)
\setcounter{tocdepth}{1} %
\setcounter{secnumdepth}{4}
\dominitoc
\tableofcontents
% =============================== BOOK ============================================================
\chapter{chapter 1}
\minitoc
\section {chap 1 sec 1}
\lipsum[1]
\section {chap 1 sec 2}
\section {chap 1 sec 3}
\chapter{chapter 2}
\minitoc
\section {chap 1 sec 1}
\section {chap 1 sec 2}
\section {chap 1 sec 3}
\end{document}
结果: