我正在使用附录包来格式化我的论文。问题在于目录中附录的命名。
目前看起来像这样:附录 A
表格列表................................................iv
附图列表...................................... v ...
附录 A ................................................ 15
参考书目................................................. 25
我如何强制 LaTeX 删除 A?
以下是我正在使用的 MWE。
%\listfiles
\documentclass[lscape]{msu-thesis}
% lscape option is needed for this sample file to show correct placement
% of page numbers on landscape pages. If you don't have any landscape pages
% in your document, you don't need to load this option.
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{amsmath}
% If you need newlines in your title, you must use \protect\\
\title{Topics in the Syntax and Semantics of Phonology}
\author{Joe Linguist}
\fieldofstudy{Linguistics}
\dedication{This thesis is dedicated to someone.}
\date{2010}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{gb4e}
\usepackage{cgloss}
\usepackage{natbib}
\counterwithin{exx}{chapter}
\bibliographystyle{unified}
\singlegloss
% Uncomment the next two lines for single spaced examples with gb4e
%\let\oldexe\exe
%\renewcommand{\exe}{\SingleSpacing\oldexe}
\begin{document}
\frontmatter
\maketitlepage
\begin{abstract}
\lipsum
\end{abstract}
\clearpage
\makecopyrightpage
\makededicationpage
\clearpage
\chapter*{Acknowledgements}
\DoubleSpacing
\lipsum[1]
\clearpage
\SingleSpacing
\tableofcontents* % ToC will not appear in the table of contents
\clearpage
\listoftables
\clearpage
\listoffigures
\mainmatter
% The next command changes chapters in the TOC to have no dotted leader
%\addtocontents{toc}{\protect\renewcommand{\protect\cftchapterdotsep}{\cftnodots}}
\chapter{Introduction}
\section{Some section}
\lipsum[2]
\subsection{Subsection}
\lipsum
\subsubsection{Subsubsection}
% Uncomment this next command if you have more than one appendix
%\appendicestrue
% This command creates the cover page for the appendix/appendices
\makeappendixcover
\appendix
\chapter{An appendix}
\lipsum[9-15]
\backmatter
% The next command forces the Bibliography to have a dotted leader
% (May not be required)
\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchapterdotsep}{\cftdotsep}}
\SingleSpacing
% This command creates the cover page for the bibliography
\makebibliographycover
\bibliography{MSU-thesis-testfile}
\end{document}
答案1
这也许就是你想要的:
使用\chapter*{\appendixname}
没有“数字”(即没有前缀“A”)的,并且只提供前缀\thefigure
,A
通过
\renewcommand{\thefigure}{A.\arabic{figure}}
此外,使用以下方式将添加Appendix
到目录中
\addcontentsline{toc}{chapter}{\appendixname}
手动。
请参阅下面的代码,我在其中注释了一些导致错误的命令。MWE 肯定太大了 ;-)
\documentclass[lscape]{msu-thesis}
% lscape option is needed for this sample file to show correct placement
% of page numbers on landscape pages. If you don't have any landscape pages
% in your document, you don't need to load this option.
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{amsmath}
% If you need newlines in your title, you must use \protect\\
\title{Topics in the Syntax and Semantics of Phonology}
\author{Joe Linguist}
\fieldofstudy{Linguistics}
\dedication{This thesis is dedicated to someone.}
\date{2010}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{gb4e}
%\usepackage{cgloss}
\usepackage{natbib}
\counterwithin{exx}{chapter}
\bibliographystyle{unified}
\singlegloss
% Uncomment the next two lines for single spaced examples with gb4e
%\let\oldexe\exe
%\renewcommand{\exe}{\SingleSpacing\oldexe}
\let\standardthefigure\thefigure%
\begin{document}
\frontmatter
\maketitlepage
\begin{abstract}
\lipsum
\end{abstract}
\clearpage
\makecopyrightpage
\makededicationpage
\clearpage
\chapter*{Acknowledgements}
\DoubleSpacing
\lipsum[1]
\clearpage
\SingleSpacing
\tableofcontents* % ToC will not appear in the table of contents
\clearpage
\listoftables
\clearpage
\listoffigures
\mainmatter
% The next command changes chapters in the TOC to have no dotted leader
%\addtocontents{toc}{\protect\renewcommand{\protect\cftchapterdotsep}{\cftnodots}}
\chapter{Introduction}
\section{Some section}
\lipsum[2]
\subsection{Subsection}
\lipsum
\subsubsection{Subsubsection}
% Uncomment this next command if you have more than one appendix
%\appendicestrue
% This command creates the cover page for the appendix/appendices
\makeappendixcover
%\appendix
\chapter*{An appendix}
\addcontentsline{toc}{chapter}{\appendixname}%
\renewcommand{\thefigure}{A.\arabic{figure}}%
\begin{figure}
\caption{A dummy figure}
\caption{Another dummy figure}%
\end{figure}
\lipsum[9-15]
\backmatter
% The next command forces the Bibliography to have a dotted leader
% (May not be required)
\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchapterdotsep}{\cftdotsep}}
\SingleSpacing
\let\thefigure\standardthefigure% Backstorage of traditional numbering for figures
% This command creates the cover page for the bibliography
%\makebibliographycover
%\bibliography{MSU-thesis-testfile}
\end{document}
答案2
您需要在附录部分开始时重新定义章节计数器。这是您的 MWE:
\documentclass[lscape]{msu-thesis}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\begin{document}
\frontmatter
\tableofcontents*
\mainmatter
\chapter{Introduction}
\section{Some section}
\lipsum[2]
\subsection{Subsection}
\lipsum
\subsubsection{Subsubsection}
\appendix
\renewcommand{\thechapter}{} %% Here we redefine the chapter counter
\chapter{My appendix}
\renewcommand{\thechapter}{\Alph{chapter}} %%And here we redefine it back
\begin{figure}
\caption{Figure one}
\caption{Figure two}
\end{figure}
\lipsum[9-15]
\end{document}
这里讨论了非常类似的问题:附录:无章节计数器的章节