I'm new to LaTeX. I created a new document with the following structure
\documentclass{scrreprt}
\usepackage[english]{babel}
\usepackage{appendix}
% ... %
\begin{document}
\maketitle
\tableofcontents
\input{./content/1-Introduction}
% ... %
\input{./content/7-Appendix}
\end{document}
When I compile it from the "main" file, everything works. But when I compile it from one of my chapter files, it says:
! Undefined control sequence.
l.1 \chapter
! LaTeX Error: Missing \begin{document}.
A chapter looks like this:
\chapter{My Chapter}
% ... %
\section{...}
% ... %
pdflatex 1-Introduction
? That won't work, as a\chapter
is a command only available in documentclass likereport
orbook
(orscrreprt
) -- you are looking after the\includeonly
stuffscrreprt
.scrreprt
you most likely don't need packageappendix
.