Hallo,
ich habe getestet und bin nicht zu dem gewünschten Ergebnis gekommen.
Mein Dokument besteht aus mehreren Teilen:
- * Titelblatt
* Inhaltsverzeichnis
* Haupttext mit Kapiteln
* Anhang
Ich möchte nun z.B. Kapitel 1 als einzelnes Dokument mit eigenem Titelblatt und eigenem Inhaltsverzeichnis usw. erstellen.
Wenn ich das erstelle, fängt meine Nummerierung der Kapitel mit 0.1 usw an.
Die Ebene "section" fehlt ja.
Ich möchte gerne, dass hier die Subkapitel auf der Ebene "section", also mit 1, 2, usw. beginnen.
Hier mein Codebeispiel:
Hauptdokument
\documentclass[11pt,a4paper]{article}
\usepackage{subfiles}
\newcommand{\onlyinsubfile}[1]{#1}
\newcommand{\notinsubfile}[1]{}
\def\DOC_TITLE{Musterdokument}
\begin{document}
\subfile{TitlePage-Main} % --> Titelseite!
%\subfile{TableOfContent} % --> Inhaltsverzeichnis!
\subfile{MainText} % --> Dokument!
%\subfile{Appendix} % --> Anhang!
\end{document}
Haupttext
\documentclass[MainDocument.tex]{subfiles}
\begin{document}
%\onlyinsubfile{this only appears if chapter1.tex is compiled (not when main.tex is compiled)}
%\notinsubfile{this only appears if main.tex is compiled (not when chapter1.tex is compiled)}
Haupttext!
\begin{section}{Kapitel 1}
\subfile{Section01} % --> Kapitel 1
\end{section}
\begin{section}{Kapitel 2}
\subfile{Section02} % --> Kapitel 2
\end{section}
\end{document}
Kapitel 1
\documentclass[MainDocument.tex]{subfiles}
\begin{document}
%\onlyinsubfile{this only appears if chapter1.tex is compiled (not when main.tex is compiled)}
%\notinsubfile{this only appears if main.tex is compiled (not when chapter1.tex is compiled)}
\onlyinsubfile{
\subfile{TitlePage-Main} % --> Titelseite!
%\subfile{TableOfContent} % --> Inhaltsverzeichnis!
}
Text Kapitel 1!
\begin{subsection}{Unter-Kapitel 1}
Text Unter-Kapitel 1!
\end{subsection}
\begin{subsection}{Unter-Kapitel 2}
Text Unter-Kapitel 2!
\end{subsection}
\end{document}
Mache ich einen grundlegenden Denkfehler?[/list]