设置中文目录格式:
\RequirePackage{titletoc}
\titlecontents{chapter}[0pt]{\heiti \zihao{4}}
{\bfseries\thecontentslabel\hspace{\ccwd}}{\bfseries}
{\hspace{.5em}\titlerule*{.}\contentspage}
\titlecontents{section}[2\ccwd]{\heiti \zihao{-4}}
{\bfseries\thecontentslabel\hspace{\ccwd}}{\bfseries}
{\hspace{.5em}\titlerule*{.}\contentspage}
\titlecontents{subsection}[4\ccwd]{\songti \zihao{-4}}
{\thecontentslabel\hspace{\ccwd}}{}
{\hspace{.5em}\titlerule*{.}\contentspage}
然后定义英文目录,与大部分参考资料类似,中文目录生成toc文件,而英文目录单独生成eoc文件
%% 用于英文目录, list it in eoc
\newcommand\echapter[1]{\addcontentsline{eoc}{chapter}{\protect\numberline{\thechapter}#1}}
\newcommand\esection[1]{\addcontentsline{eoc}{section}{\protect\numberline{\thesection}#1}}
\newcommand\esubsection[1]{\addcontentsline{eoc}{subsection}{\protect\numberline{\thesubsection}#1}}
\newcommand\esubsubsection[1]{\addcontentsline{eoc}{subsubsection}{\protect\numberline{\thesubsubsection}#1}}
定义生成中英文目录的指令
%% 中文目录
\renewcommand\tableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\contentsname}%目录里显示“目录”,否则\chapter*
\@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
\pdfbookmark[0]{目录}{XMUtoc}
\@starttoc{toc}%
\chapter*{\encontentsname}%英文目录里显示“英文目录”,否则\chapter*
\@mkboth{\MakeUppercase\encontentsname}{\MakeUppercase\encontentsname}%
\pdfbookmark[0]{英文目录}{XMUeoc}
\@starttoc{eoc}%
\if@restonecol\twocolumn\fi
}
在.tex文件里,实例化目录命令
% 加入中文目录
\tableofcontents
正文中,章节的定义如下:
\chapter{绪 论}
\echapter{Introduction}
\label{chap:intro}
\section{本论文研究的目的和意义}
\esection{The purpose of this thesis}