\appendixname 没有出现

\appendixname 没有出现

简单来说,出于某种原因,附录名称没有出现,无论是在标题中还是在目录中。请参阅所附图片。在此处输入图片描述并且:

在此处输入图片描述

如您所见,这里没有“附录 1”或“A.1.”,而只有“.1”。遗憾的是,我无法提供最小工作示例,因为我使用的是基于 KOMA 脚本的“mimosis”类,而且我对此了解不够,无法深入研究类定义文档。但是,我使用的是附录包

\documentclass{mimosis}
\usepackage[toc, title, titletoc]{appendix}
\renewcommand{\appendixname}{Appendix}

\begin{document}
\begin{appendices}

\section{Description of the Data}
Everything is self-explanatory.

\end{appendices}

\end{document}

有什么想法我可以尝试吗?

答案1

\setcounter{chapter}{1}附录开始后需要设置一项。

\documentclass{scrbook}
\usepackage[toc, title, titletoc]{appendix}
%\usepackage[hidelinks]{hyperref}

\begin{document}
%\phantomsection\pdfbookmark[1]{\contentsname}{Contents}
\tableofcontents

\setcounter{chapter}{1}
\chapter{Methodology}


\begin{appendices}
\addtocontents{toc}{\protect\setcounter{tocdepth}{1}}
\setcounter{chapter}{1}
\chapter*{Appendices}

\section{Description of the Data}
Everything is self-explanatory.

\end{appendices}

\chapter*{Bibliography}
\phantomsection\addcontentsline{toc}{chapter}{Bibliography}
\end{document}

目录

相关内容