LaTeX学习日记-2

以上来就打算做好每章的首页,仿照原书的样子,自己没有找到头绪,在http://bbs.ctex.org中求助,版主指点我去看看titlesec和minitoc。郁闷的是自己不知道自己的安装版本(CTeX 2.4.2 Full)里有没有,在网上找到并下载,但却不知道如何安装。后来终于发现所有程序->中文CTex套装->MiKTeX->MiKTex Package Management,就可以看到自己的宏包安装情况了,titlesec和minitoc都有。

下面是一个例子:

documentclass{book}
usepackage{minitoc}
setcounter{minitocdepth}{2} setlength{mtcindent}{24pt}
setlength{mtcskipamount}{bigskipamount}
begin{document}
dominitoc
nomtcrule
nomtcpagenumbers
faketableofcontents
chapter*{Title of chapter}
minitoc
addstarredchapter{Title of chapter} minitoc
section*{First section}
addcontentsline{toc}{section}{First section}
section*{Second section}
addcontentsline{toc}{section}{Second section}
end{document}

Did you like this? Share it:

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.