Skip to main content
A real LaTeX project separates its root file (main.tex) from section .tex files, figure files, and a .bib bibliography database, then joins them with \input, \includegraphics, and \bibliography (or \addbibresource). If you only need a minimal four-line single-file document first, start with Creating your first LaTeX document.

Step 1: Organize the project files

Even a short report stays easier to navigate when you keep the root file clean and store chapters, figures, and references in dedicated files or folders:
Only main.tex contains \documentclass{...}, \begin{document}, and \end{document}. Section files hold plain LaTeX body content such as \section{...}, paragraphs, figures, and tables.

Step 2: Connect files from main.tex

Three commands link the pieces of a project together:
  • Section files: \input{sections/introduction} inserts the file inline at that point (the .tex extension is optional). For chapter-based books and theses where you need page breaks and selective compilation with \include and \includeonly, see Managing large documents and Multi-file projects.
  • Images: Load \usepackage{graphicx} and pass a path relative to main.tex, such as \includegraphics[width=0.7\linewidth]{figures/site-map} (omitting the extension lets the compiler pick .pdf, .png, or .jpg).
  • Bibliography: With BibTeX, add \bibliographystyle{plain} and \bibliography{references} (no .bib extension) where the reference list should appear. With BibLaTeX, load \usepackage[backend=biber]{biblatex} and \addbibresource{references.bib} in the preamble and call \printbibliography in the body.
The compiled example below keeps its four project files side by side in one folder so you can inspect the complete source and output together, and uses TeX Live’s built-in example-image-a placeholder graphic.
main.tex
introduction.tex
method.tex
references.bib
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

Step 3: Run the first full compile

When a project contains cross-references (\ref) and a BibTeX bibliography (\cite), a single TeX pass leaves [?] or ?? placeholders because LaTeX writes keys to .aux on the first run before BibTeX builds the .bbl file. Locally on the command line, run a full sequence:
You can also run latexmk -pdf main.tex, which detects how many passes and bibliography runs are needed. In LaTeX Cloud Studio, the compile service runs TeX Live 2026 (full distribution) and drives full compilations with latexmk, so BibTeX or Biber and the follow-up LaTeX passes run automatically in one full compile.

Step 4: Start the project in LaTeX Cloud Studio

When creating a project in LaTeX Cloud Studio, you can start from a blank project, pick one of the 20 catalog templates (articles, lab reports, theses, books, CVs, resumes, and Beamer presentations), upload a ZIP archive (up to 50 MB and 180 files), or import a GitHub repository. Once the project is open, use the Explorer panel in the left sidebar to create files and folders or upload images and .bib files; projects can also be transferred via ZIP export or GitHub push and pull (see GitHub sync, import and export). Ready to set up this project in the browser? Start from the Basic Article template in LaTeX Cloud Studio, replace main.tex with the complete example, and add introduction.tex, method.tex, and references.bib to the project.