如何为每个 {chapter} 或 {section} 添加 {author}、{tableofcontents} 和 {date}

如何为每个 {chapter} 或 {section} 添加 {author}、{tableofcontents} 和 {date}

我正在编写一本书(使用 xelatex),每一章都来自不同的作者,是否有任何环境/包可以将这些信息靠近每个章节/部分,而不是书的标题页?

答案1

检查combine类(它也利用了包combinetcombnatcombcite实现了在准备由不同作者的不同文章组成的卷时所期望的结果)。

我自己从未使用过它,但它似乎足以胜任这项工作。

答案2

不幸的是,我只能为您提供每章的目录建议。我使用库minitoc来执行此操作。请参阅下面的代码。在每一章中,您必须添加命令\minitoc。我通常还会设置计数器tocdepthsecnumdepth。我希望它至少能帮助您解决部分问题

\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}

结果: 在此处输入图片描述

相关内容