**Skill**: [LaTeX Build Automation](../SKILL.md)


latexmk automatically tracks dependencies!

### Project Structure

```
my-project/
├── main.tex              # Root document
├── chapters/
│   ├── intro.tex
│   ├── methodology.tex
│   └── results.tex
├── figures/
│   └── diagram.pdf
└── bibliography.bib
```

### Root Document (main.tex)

```latex
\documentclass{article}
\usepackage{graphicx}

\begin{document}

\input{chapters/intro}
\input{chapters/methodology}
\input{chapters/results}

\bibliographystyle{plain}
\bibliography{bibliography}

\end{document}
```

### Compile Root

```bash
# latexmk watches ALL included files
latexmk -pvc -pdf main.tex

# Edit any chapter → automatic rebuild
# Update bibliography.bib → automatic rebuild
# Change figure → automatic rebuild
```
