添加“附录"在"A"之前论文目录 [英] Add "Appendix" before "A" in thesis TOC
问题描述
我需要在论文目录中的字母A之前插入附录一词,如下所示:
I am required to insert the word Appendix before the letter A in my dissertation Table of Contents as follows:
附录A(附录A的标题)
Appendix A (title for appendix A)
但是我使用的乳胶论文cls文件仅生成字母A,后跟附录标题:
but the latex thesis cls file I use generates only the letter A followed by the appendix title:
A(附录A的标题)
论文的cls文件定义了一个"backmatter"命令,附录被视为一章.
The thesis cls file defines a "backmatter" command and the appendix is treated as a chapter.
\newcommand\backmatter{\appendix
\def\chaptermark##1{\markboth{%
\ifnum \c@secnumdepth > \m@ne \@chapapp\ \thechapter: \fi ##1}{%
\ifnum \c@secnumdepth > \m@ne \@chapapp\ \thechapter: \fi ##1}}%
\def\sectionmark##1{\relax}}
是否对上述代码进行了简单的修复,将在附录A的TOC中的字母A之前添加了附录一词?有一个相关的问题,如何使附录"出现在乳胶中的toc?,但在这种情况下,答案似乎无济于事.
Is there a simple fix to the above code that will add the word Appendix before the letter A in the TOC for Appendix A? There is a related question, How to make 'appendix' appear in toc in Latex?, but the answers did not appear to help in this case.
推荐答案
您可以使用 appendix
包轻松实现所需的功能.这是一个示例文件,向您展示如何.调用软件包时,键是 titletoc
选项.它采用您在 \ appendixname
中定义的任何值,默认值为 Appendix
.
You can easily achieve what you want using the appendix
package. Here's a sample file that shows you how. The key is the titletoc
option when calling the package. It takes whatever value you've defined in \appendixname
and the default value is Appendix
.
\documentclass{report}
\usepackage[titletoc]{appendix}
\begin{document}
\tableofcontents
\chapter{Lorem ipsum}
\section{Dolor sit amet}
\begin{appendices}
\chapter{Consectetur adipiscing elit}
\chapter{Mauris euismod}
\end{appendices}
\end{document}
输出看起来像
这篇关于添加“附录"在"A"之前论文目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!