Compile the project
compile_projectCompile an Overleaf project locally with latexmk, report LaTeX errors and warnings before pushing changes, and catch broken papers early. Build artifacts stay outside the clone.
Instructions
Compile one project locally with latexmk -pdf and report the errors and warnings, so a broken paper is caught before collaborators see it. Call it after editing and before push_changes. It compiles the clone as it stands, local edits included, without pulling, and halts at the first error. Without mainTexFile it tries main.tex, paper.tex, manuscript.tex, root.tex, thesis.tex and article.tex at the root, then the shallowest .tex file, and stops with a message if that file has no \begin{document}. Build artifacts go to a directory outside the clone, so they are never pushed, and only the log comes back, never a PDF. Without latexmk and a TeX distribution installed locally it says so instead of compiling; a run past the configured timeout, 180 seconds by default, is reported as an error. It also restores any files sparse checkout was holding back, since figures must be on disk to compile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Which project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project. | |
| mainTexFile | No | Path to the root .tex file, the one containing \begin{document}. Omitted, the server guesses it from the project layout and says so if the guess has no document environment. |