When I put two or more TeX files together with the subfiles
package, the header disappears on the last pages of the included files.
Why is that?
The Root.tex
file:
\documentclass[a4paper]{scrartcl}
\usepackage{subfiles}
\usepackage{scrpage2}
\usepackage[ngerman]{babel}
\usepackage{blindtext}
\clearscrheadfoot
\pagestyle{scrheadings}
\begin{document}
\subfile{test1.tex}\newpage
\subfile{test2.tex}
\end{document}
The used subfiles have the same content and are named test1.tex
and test2.tex
:
\documentclass[Root.tex]{subfiles}
\clearscrheadfoot
\chead[Test]{Test}
\begin{document}
\Blindtext
\Blindtext
\end{document}
standalone
could be a better choice instead ofsubfiles
.