Possible Duplicate:
How to make appendices behave like sections in ToC
Consider the minimal example below. How can I achieve that in the appendix part (only there!) of the ToC paragraphs are aligned with sections? Paragraphs should also figure as sections in the pdf bookmarks!
EDIT: Added hyperref.
\documentclass[10pt, a4paper]{report}
\usepackage[titletoc]{appendix}
\usepackage{hyperref}
\begin{document}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{4}
\tableofcontents
\chapter{XXX}
\section{YYY}
\subsection{WER}
\subsubsection{ABC}
\subsubsection{DEF}
\subsection{ZTR}
\subsubsection{OIU}
\subsubsection{OIZ}
\subsubsection{POI}
\paragraph{tzu}
\paragraph{rfv}
\begin{appendices}
\makeatletter
\def\chaptermark#1{\markboth{\MakeUppercase{\@chapapp. \ #1}}{}}
\def\thechapter{}
\makeatother
\chapter{AAA}
\paragraph{abc}
\paragraph{def}
\paragraph{ghi}
\end{appendices}
\end{document}