\documentclass[12pt,
DIV=12,
twoside=false,
twocolumn=false,
abstraction,
dottedtoc,
headings=normal,
headinclude=true,
footinclude=true,
parskip=half]{scrbook}
\usepackage{subfiles}
\usepackage[USenglish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\RequirePackage[l2tabu,orthodox,abort]{nag}
\usepackage{fixltx2e}
\usepackage{typearea}
\usepackage[onehalfspacing]{setspace}
\raggedbottom
\usepackage{graphicx}
\usepackage{ellipsis,ragged2e,marginnote}
\usepackage[tracking=true]{microtype}
\usepackage{cmbright}
\usepackage{inconsolata}
\renewcommand{\familydefault}{\sfdefault}
\setkomafont{sectioning}{\normalcolor\bfseries}
\setkomafont{disposition}{\normalcolor\bfseries}
\usepackage[small, bf, up, hang]{caption}
\usepackage[percent]{overpic}
\usepackage{mathtools}
\usepackage{nicefrac}
\usepackage{units}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage[backend=bibtex,style=alphabetic]{biblatex}
\addbibresource{bibliography.bib}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{sagetex}
\usepackage{color}
\usepackage{xspace}
\let\orgLaTeX\LaTeX
\renewcommand*{\LaTeX}{\orgLaTeX\xspace}
\usepackage[automark]{scrlayer-scrpage}
\clearpairofpagestyles
\ofoot{\thepage}
\title{Multiple \LaTeX Source Files}
\subtitle{Howto handle this in CoCalc}
\author{Harald Schilly}
\begin{document}
\maketitle
\chapter{Introduction}
This is an overview about how to write a large \LaTeX document
with multiple input sources, where:
\begin{itemize}
\item all sub-documents can be previewed by rendering only the partial document,
\item the forward/inverse search works,
\item SageTeX~\cite{sagetex} is supported,
\item formulas, graphics and the advanced KOMAscript package are enabled.
\end{itemize}
\tableofcontents
\chapter{Setup}
The general setup of this document is best explained by reading the header
of the ``\texttt{master.tex}'' file.
\section{Bibliography}
The bibliography uses \texttt{biblatex} and \texttt{biber},
which works much more robust than the older \texttt{bibtex}.
The file ``\texttt{bibliography.bib}'' defines the references
in the usual bibtex format,
and the references work across all sub-documents.
It also directly supports special characters. For example, the \cite{komascript} reference contains the letter ``ü'',
which is processed and rendered without any issues.
The next chapters are sub-documents.
They briefly describe each individual aspect in more detail.
\subfile{10-make.tex}
\subfile{20-subfiles.tex}
\subfile{30-komascript.tex}
\subfile{40-sagetex.tex}
\chapter{Conclusion}
\printbibliography
\end{document}