I'm not that familiar with LaTeX and have a problem with the structure of my document. The table of contents has been created with "\tableofcontents", the appendix with "\appendix" (no further commands for both of them, they are filled completely automatically). In the appendix I have a subsection "MyDocument" which should represent a logically separate document (but actually I want to write in the same tex file). Only the subsection name should appear in the table of contents, not more (normally it would also include one hierarchy layer below). Within this subsection I have three further layers of hierarchy which should be numbered without the appendix prefix "A".
So, the toc should look like this:
1 Chapter
2 Chapter
...
A Appendix
A.1 One appendix
A.2 MyDocument
A.3 Another appendix
The subsection "MyDocument" is placed in a separate tex file (included into appendix) and should look like this (all headings numbered and formatted as headings):
A.2 My Document
1 abc
1.1 hello
1.2 world
1.2.1 world A
1.2.2 world B
2 xyz
Edit: some code
main document
...
\tableofcontents
\include{chapters/chapter1}
\include{chapters/chapter2}
\appendix
\include{general/appendix}
appendix.tex
\section{Appendix}
\input{appendices/one}
\input{appendices/mydocument}
\input{appendices/another}
mydocument.tex
\subsection{My Document}
\subsubsection{abc}
\paragraph{hello}
\paragraph{world}
\subparagraph{world 1}
\subparagraph{world 2}
\subsubsection{xyz}
I found a static solution which is not very comfortable, but ok for my case (I'm mainly interested in the pre-formatted headings, but I don't want the structure of mydocument appear in the table of contents): Remove automated numbering and adding to the toc, use hard-coded numbers instead (probably not a good idea if the structure of this document changes, but in this special case it really is fixed)
\subsubsection*{1. abc}
etc.