I have a number of .tex files containing sections which are \input{} into a large document. I'd now like to create an "excerpt" document that includes only a subset of these sections. The problem is, the hierarchy level should be different in the excerpt than in the main document. That is, in the main document the concerned section may be a \subsection, but in the excerpt it must be a \section (i.e. everything moves up a level). Is there a way to handle this hierarchy level correctly in different files using \input{}?
Since in comments you imply that you want to change the relative levels rather than just move a branch up or down the hierarchy, I'd use custom commands in the input files.
If qqqq.tex
looks like
\sectA{zzzz}
zz zz zz
\sectB{thing}
xx xx xx
\sectB{more things}
ww ww ww
Then one document can go
\newcommand\sectA{\section}
\newcommand\sectB{\section}
\input{qqq}
with everything at the same level, and another can go
\newcommand\sectA{\subsection}
\newcommand\sectB{\subsubsection}
\input{qqq}
with A headings a level down and B headings two levels down
\renewcommand\subsection{\section}
and similar redefinitions in the preamble for the excerpt. – Ian Thompson Mar 13 '15 at 8:41\subsubsection
to\section
as well if you want to. Anything is possible withTeX
... – Ian Thompson Mar 13 '15 at 9:19