2

I wounder if you could help me to appear (Appendix A) in list of contents. my code is:

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

enter image description here

  • 2
    Meanwhile I can tell you that times font is depreciated: https://tex.stackexchange.com/questions/374222/how-can-we-help-the-times-package-be-deprecated – Sebastiano Aug 20 '18 at 17:19

1 Answers1

3

I have added Appendix A that appear into list of contents using \usepackage[titletoc]{appendix} and \begin{appendices} .... \end{appendices}. Is it the result you wanted to achieve?

enter image description here

\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}
Sebastiano
  • 54,118
  • 2
    If you're telling people times is deprecated, you should fix the code in your answer to show the modern replacement (newtxtext and newtxmath). – Alan Munn Aug 20 '18 at 19:00
  • I did not make the change because the same user in one of his questions insisted on the use of times. Anyway I changed the code on your indication. – Sebastiano Aug 20 '18 at 19:05