Basic Document Structure
A LaTeX document consists of two main parts:example.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio
The preamble (before
\begin{document}) contains global settings, package imports, and definitions. The document body (between \begin{document} and \end{document}) contains your actual content.Document Classes
The document class determines the overall layout and available commands:Standard Classes
example.tex
Class Options
Common options for document classes:example.tex
example.tex
example.tex
example.tex
Document Organization
Title Information
example.tex
Abstract
For articles and reports:example.tex
Sectioning Commands
LaTeX provides hierarchical sectioning:example.tex
Table of Contents
example.tex
Page Layout
Margins and Geometry
Using thegeometry package:
example.tex
Headers and Footers
Basic page numbering:example.tex
fancyhdr:
example.tex
Multi-file Documents
For large documents, split content into multiple files:Main File (thesis.tex)
example.tex
Chapter File (chapters/introduction.tex)
example.tex
\include vs \input:\include{file}- Starts new page, allows\includeonly\input{file}- Inserts content inline, no page break
Appendices
example.tex
Front Matter and Back Matter
For books and reports:example.tex
Best Practices
Common Patterns
Academic Article
example.tex
Technical Report
example.tex
Next: Explore Text Formatting commands or learn about Math Mode for mathematical content.
