Skip to main content
To collaborate cleanly on a LaTeX project, keep one repository as the source of truth, split chapters or sections into separate .tex files, commit only source files (ignoring TeX build artifacts), leave review notes in the source, and generate visual change highlights between revisions with latexdiff.

Step 1: Keep one source of truth and split work by file

Emailing paper_v3_final.tex between co-authors guarantees conflicting copies. Put the project in one Git repository and divide the manuscript so co-authors edit different files (for example, sections/introduction.tex, sections/method.tex, sections/results.tex). See Managing large documents and Multi-file projects for how to wire those files into main.tex. Adopt one sentence per line (semantic line breaks) inside .tex files. Because LaTeX treats a single newline as a space and only starts a new paragraph on a blank line, putting each sentence on its own line keeps Git diffs readable and limits merge conflicts to the specific sentence that changed rather than the entire paragraph.

Step 2: Ignore TeX build artifacts in Git

Commit only files you write or need to build the PDF: .tex sources, .bib files, custom .cls/.sty files, and source figures (such as PDF, PNG, or SVG graphics). Ignore auxiliary files generated by pdfLaTeX, BibTeX, Biber, MakeIndex, and latexmk so commits stay clean and never conflict on machine-generated metadata:
.gitignore
If your figures live in figures/ as .pdf files, ignoring only main.pdf (rather than *.pdf) keeps figure PDFs tracked without extra negation rules.

Step 3: Leave review comments in the source

For notes that should never appear in the PDF, write plain % comments directly in the .tex file. When co-authors need to see open questions in the compiled draft, load \usepackage{todonotes} and use \todo{...} (margin note), \todo[inline]{...} (block inside the text), and \listoftodos (summary list). Before submission, change the line to \usepackage[disable]{todonotes} to hide every note without deleting them first.
review-notes.tex
Test this example live in your browser. Open a ready-to-compile LaTeX project with TeX Live 2026 preinstalled and zero local setup.Open starter article

Step 4: Compare revisions visually with latexdiff

When reviewers or co-authors want a marked-up PDF showing every wording change since the previous draft, run latexdiff (included in TeX Live 2026) on the old and new .tex files, then compile the generated diff file:
Both input arguments must be real files on disk (not shell pipes), because latexdiff opens each file twice. With its default UNDERLINE style, latexdiff marks removed text in red strikethrough and inserted text in blue wavy underline.
draft-v1.tex
draft-v2.tex
diff.tex
For multi-file projects, pass --flatten to latexdiff so \input and \include files are expanded before comparison, and run latexdiff-vc --git -r <commit> main.tex to diff your working file against an earlier Git commit.

Step 5: Move projects between GitHub and LaTeX Cloud Studio

In LaTeX Cloud Studio, projects can be transferred through ZIP upload/export and GitHub import, push, and pull workflows—see GitHub sync, import and export. That lets a team keep a GitHub repository as the canonical history while editing and compiling on TeX Live 2026 in the browser, or hand a ZIP archive to a co-author who prefers working locally. Ready to try todonotes or inspect a latexdiff file in the browser? Start from the Basic Article template in LaTeX Cloud Studio and replace main.tex with review-notes.tex or diff.tex from above.