1
\documentclass[12pt,a4paper]{report}
\usepackage{titlesec}
\usepackage[toc]{appendix}
\titleformat{\chapter}[display] {\normalfont\Huge\bfseries}{\chaptertitlename\ \thechapter}{0pt}{\Huge}

\usepackage[english]{babel}
\usepackage{pdfpages}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{subfig}
\usepackage{float}
\usepackage{booktabs}
\linespread{1.5}   
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{xcolor}
\usepackage{tocbibind}
\usepackage{xpatch}
\usepackage{hyperref}
\hypersetup{
  colorlinks=false,
  urlbordercolor=red
}
\makeatletter

\xpatchcmd{\titlepage}{\thispagestyle{empty}}{\pagestyle{plain}}{}{}% \xpatchcmd{\endtitlepage}{\setcounter{page}\@ne}{\cleardoublepage}{}{}% Remove the reset of page at the end of titlepage

\newcommand\frontmatter{%
  \cleardoublepage
  % \@mainmatterfalse
  \pagenumbering{roman}
}

\newcommand\mainmatter{%
    \cleardoublepage
    % \@mainmattertrue
    \pagenumbering{arabic}
  }

\newcommand\backmatter{%
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  % \@mainmatterfalse
}

\makeatother

\title{Your Paper}
\author{You}

\begin{document}

%\includepdf{Cover_Page}


\frontmatter
\begin{abstract}
\addcontentsline{toc}{chapter}{Abstract}    
\end{abstract}

\begingroup
  \hypersetup{hidelinks}
  \tableofcontents
\endgroup

\mainmatter
\chapter{Introduction}

\appendix
\chapter{MSE Reconstruction}
\chapter{Latent Encodings}
\end{document}

enter image description here

  • amsbook etc. are using different mechanisms than report. Why are you linking a question about amsbook? Also, like in the other post from one hour ago: Please provide a compilable document. Apparently, you're using the appendix package ... – user31729 Dec 30 '17 at 0:08
  • i have edited my code. I now use \appendix. I would like the content page to only show Appendix, instead of all the titles of each appendix – Kong Dec 30 '17 at 1:16
1

It's ugly, but it works. Note: I used \addappheadtotoc instead of \appendixpage to save a page of text.

\documentclass[12pt,a4paper]{report}
\usepackage{titlesec}
\usepackage[toc]{appendix}
\titleformat{\chapter}[display] {\normalfont\Huge\bfseries}{\chaptertitlename\ \thechapter}{0pt}{\Huge}

\usepackage[english]{babel}
\usepackage{pdfpages}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{subfig}
\usepackage{float}
\usepackage{booktabs}
\linespread{1.5}   
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{xcolor}
\usepackage{tocbibind}
\usepackage{xpatch}
\usepackage{hyperref}
\hypersetup{
  colorlinks=false,
  urlbordercolor=red
}
\makeatletter

\xpatchcmd{\titlepage}{\thispagestyle{empty}}{\pagestyle{plain}}{}{}% \xpatchcmd{\endtitlepage}{\setcounter{page}\@ne}{\cleardoublepage}{}{}% Remove the reset of page at the end of titlepage

\newcommand\frontmatter{%
  \cleardoublepage
  % \@mainmatterfalse
  \pagenumbering{roman}
}

\newcommand\mainmatter{%
    \cleardoublepage
    % \@mainmattertrue
    \pagenumbering{arabic}
  }

\newcommand\backmatter{%
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  % \@mainmatterfalse
}

\makeatother

\title{Your Paper}
\author{You}

\begin{document}

%\includepdf{Cover_Page}


\frontmatter
\begin{abstract}
\addcontentsline{toc}{chapter}{Abstract}    
\end{abstract}

\begingroup
  \hypersetup{hidelinks}
  \tableofcontents
\endgroup

\mainmatter
\chapter{Introduction}

\appendix
\clearpage\addappheadtotoc% or \appendixpage
\refstepcounter{chapter}%
\chapter*{\appendixname~\thechapter\newline MSE Reconstruction}
\refstepcounter{chapter}%
\chapter*{\appendixname~\thechapter\newline Latent Encodings}
\end{document}

demo

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.