I want some files to compile with two different templates, one that has the hierarchy like chapter > section > subsection and the other as section > subsection > subsubsection.
For that, I tried to define newcommands to act like an alias to the level like:
\newcommand{\level1}[1]{\chapter{#1}}
\newcommand{\level2}[1]{\section{#1}}
\newcommand{\level3}[1]{\subsection{#1}}
and the in the body I would call \level1{title}. This way I could change from templates only by changing this 3 lines.
I use lines like: \newcommand{\secref}[1]{Section \ref{#1}}
, but the ones with \chapter
and so on don't work.
Any idea on how can I solve this?
\secref
thingy, see the packagecleveref
that does this quite nicely and automatically.