如何在目录里出现附录?

如何在目录里出现附录?

我想知道您是否能帮助我将其出现在内容列表中(附录 A)。我的代码是:

\documentclass[12pt]{report}
\usepackage{times} %Times new roman font
%\usepackage{mathptmx}

\usepackage[top=2.5cm, bottom=2.5cm, left=3.5cm, right=2.5cm]{geometry}
\usepackage{amsfonts,amsmath,amssymb}

\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}


\begin{document}
\chapter*{Copyright}
\addcontentsline{toc}{chapter}{Copyright}
test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test Appendix \ref{app:benchmark}
\newpage

\tableofcontents
\addcontentsline{toc}{chapter}{Contents}
\newpage


\appendix
\makeatletter
\makeatother

\chapter{}

\section{IEC microgrid data}
\label{app:benchmark}
\begin{itemize}
\item Utility: rated short-circuit MVA=1000, f=60 Hz, rated kV=120, $V_{base}$=120 kV.
\item Distributed Generations (DGs):
\begin{itemize}
\item DG1, DG3: synchronous generator with rated MVA=9, f=60Hz, rated kV=2.4, Inertia constant H=1.07 s, friction factor F=0.1 pu, Rs=0.0036 pu, $Xd$=1.56 pu, $Xd^\prime$=0.296 pu, $Xd^{\prime\prime}$=0.177 pu, $Xq$=1.06 pu, $Xq^{\prime\prime}$=0.177 pu, $Xl$=0.052 pu, $Td^\prime$=3.7 s, $Td^{\prime\prime}$=0.05 s, $Tq0^{\prime\prime}$=0.05 s.
\end{itemize}
\end{itemize}
\section{Distributed energy source data}
\end{document}

在此处输入图片描述

答案1

\usepackage[titletoc]{appendix}我已使用和添加了出现在目录内的附录 A。\begin{appendices} .... \end{appendices}这是您想要实现的结果吗?

在此处输入图片描述

\documentclass[12pt]{report}
\usepackage{newtxtext, newtxmath}     
\usepackage[top=2.5cm, bottom=2.5cm, left=3.5cm, right=2.5cm]{geometry}
\usepackage{amsfonts,amsmath,amssymb, lipsum}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\usepackage[titletoc]{appendix}

\begin{document}
\chapter*{Copyright}
\addcontentsline{toc}{chapter}{Copyright}
\lipsum[1-2]

\ref{app:benchmark}
\newpage

\tableofcontents
\addcontentsline{toc}{chapter}{Contents}
\newpage
\makeatletter
\makeatother
\begin{appendices}
\chapter{}

\section{IEC microgrid data}
\label{app:benchmark}
\begin{itemize}
\item Utility: rated short-circuit MVA=1000, f=60 Hz, rated kV=120, $V_{base}$=120 kV.
\item Distributed Generations (DGs):
\begin{itemize}
\item DG1, DG3: synchronous generator with rated MVA=9, f=60Hz, rated kV=2.4, Inertia constant H=1.07 s, friction factor F=0.1 pu, Rs=0.0036 pu, $Xd$=1.56 pu, $Xd^\prime$=0.296 pu, $Xd^{\prime\prime}$=0.177 pu, $Xq$=1.06 pu, $Xq^{\prime\prime}$=0.177 pu, $Xl$=0.052 pu, $Td^\prime$=3.7 s, $Td^{\prime\prime}$=0.05 s, $Tq0^{\prime\prime}$=0.05 s.
\end{itemize}
\end{itemize}
\section{Distributed energy source data}
\end{appendices}
\end{document}

相关内容