厦门大学LaTeX毕业论文模板:中英文双目录

"这篇博客详细介绍了如何在 LaTeX 中设置中文和英文目录。内容包括使用 titletoc 宏包定制目录格式,以及通过 echapter, esection, esubsection 命令分别添加英文目录条目。此外,还定义了生成中英文目录的指令,并在正文中展示了章节定义的示例。"
摘要由CSDN通过智能技术生成

设置中文目录格式:

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

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值