像这种章节、目录格式怎么设置啊

2020-02-28 14:24发布

![1](https://pics.latexstudio.net/data/images/202002/aa7275ba6238e42.png 1)![2](https://pics.latexst...

![1](https://pics.latexstudio.net/data/images/202002/aa7275ba6238e42.png "1")![2](https://pics.latexstudio.net/data/images/202002/7a9a80af66949c9.png "2")
3条回答
vic156
2020-02-28 16:23
除了上面提到的包,还需要[tocdata](https://download.nus.edu.sg/mirror/ctan/macros/latex/contrib/tocdata/tocdata.pdf "tocdata")用于向目录中添加作者。 ```tex \documentclass{ctexbook} \ctexset{section/number = \arabic{section}} \usepackage{titletoc,titlesec} \usepackage{tocdata} \makeatletter \AtBeginDocument{ \@ifpackageloaded{titletoc}{ \titlecontents{section}[0em] {\begin{minipage}[t]{.4\textwidth} \begin{flushright} {\TD@usetocdata} \quad \thecontentslabel \end{flushright} \end{minipage} \large \bf}% { } {} { \quad \thecontentspage }[\addvspace{10pt}] \titlecontents{chapter}[0em] {\hspace*{.4\textwidth}\LARGE \bf}% {} {} {\quad \thecontentspage} [\addvspace{10pt}] }% end of titletoc loaded {% titletoc is not loaded }% end of \@ifpackageloaded{titletoc} }% end of \AtBeginDocument \makeatother \begin{document} \tableofcontents \chapter{三大佛寺} \tocdata{toc}{作者A} \section{来打发} \tocdata{toc}{作者BB} \section{在现存} \tocdata{toc}{作者CCC} \section{学校学习} \tocdata{toc}{作者DDDD} \section{斯蒂芬} \tocdata{toc}{作者EEEEE} \section{aa} \tocdata{toc}{作者FFFFFF} \section{的三法司} \tocdata{toc}{作者GGGGGGG} \section{l拉萨副} \end{document} ```

一周热门 更多>

相关问答