Writing everything in one file reduces readability, increases compile time, and makes debugging more difficult. Therefore a logical project structure is highly recommended.
Minimal version
main.texfor project structure which inputs all fileschapter1.texfor the first text chapter to be displayedchapter2.texfor the next text chapter to be displayedsetup/for the preamble, configuration, layout and formattingpackages.texfor used packageslayout.texfor formatting styles, package configurationdefinitions.texfor new commands, environments, etc.titlepage.texfor the first page of the document
resources/for images, table values, sourcecode files, attachmentsbibliographies/for sources and external references
Figure-heavy projects
main.texfor project structure which inputs all filespackages.texfor used packageslayout.texfor formatting styles, package configurationdefinitions.texfor new commands, environments, etc.
resources/for images, table values, sourcecode files, attachmentsbibliographies/for sources and external referencestable-floats/for floating object definitions of tablesfigure-floats/for the floating object definitions of images and graphicslisting-floats/for the floating object definitions of listingssty/for self-written packages
Preamble
Main document at main.tex
minimal version
\input{setup/packages}
\input{setup/definitions}
\input{setup/layout}
\begin{document}
\input{text/headings}
\end{document}regular version
\input{setup/packages}
\input{setup/definitions}
\input{setup/layout}
\begin{document}
\maketitle % print title, author, date information
\input{setup/titlepage}
\pagestyle{empty}
\tableofcontents
\newpage
\pagestyle{headings}
\input{text/headings}
\clearpage
\section{Verzeichnisse}
\listoftables % Tabellenverzeichnis
\listoffigures % Abbildungsverzeichnis
\lstlistoflistings % Codelistenverzeichnis
\input{bib/bibliography} % Literaturverzeichnis
\input{src/appendix.tex}
\end{document}Package requirements
Dependencies at setup/packages.tex
- see Document Classes for
\documentclass{}
\documentclass[a4paper, 11pt]{article}
\usepackage{syntonly} % Suppress pdf creating and check syntax only
\usepackage[T1]{fontenc} % Use Latin Modern font encoding, e.g. accents, greek letters
\usepackage[utf8]{inputenc} % Use unicode as input encoding
\usepackage[margin=1.5cm]{geometry} % Set page margins
\usepackage[ngerman]{babel} % Use German hyphenation and names like Inhaltsverzeichnis
\usepackage{csquotes} % Use German quotation marksHeadings
at text/headings.tex
\section{Introduction}
\label{sec:introduction}
\input{text/introduction}
\section{Capter 1}
\label{sec:capter-1}
\input{text/capter-1}Sources:
Related: