Loading...
Loading...
LaTeX builds with latexmk and live preview. TRIGGERS - latexmk, LaTeX build, live preview, compilation.
npx skill4agent add terrylica/cc-skills latex-buildlatexmk -pdf document.tex
# Result: document.pdf createdlatexmk -pvc -pdf document.tex
# What happens:
# - Compiles document initially
# - Watches for file changes
# - Auto-recompiles when files change
# - Auto-reloads PDF in Skim viewerCtrl+C# Build once
latexmk -pdf document.tex
# Live preview (watch mode)
latexmk -pvc -pdf document.tex
# Build with SyncTeX
latexmk -pdf -synctex=1 document.tex
# Clean artifacts
latexmk -c # Keep PDF
latexmk -C # Remove PDF too
# Force rebuild
latexmk -gg -pdf document.tex
# Non-interactive (for CI)
latexmk -pdf -interaction=nonstopmode document.texwhich latexmklatexmk -pdf document.tex-synctex=1latexmk -pvc -pdf document.texlatexmk -cman latexmklatexmk -helplatex/setuplatex/tables| Issue | Cause | Solution |
|---|---|---|
| latexmk not found | Not in PATH | Add |
| Undefined control sequence | Missing package | Check |
| References show ?? | Need multiple runs | latexmk handles this automatically; ensure no errors |
| Live preview not updating | Skim auto-reload disabled | Skim Preferences → Sync → Check for file changes |
| Build hangs | Input prompt in nonstop mode | Use |
| PDF not updating | Build error preventing output | Check .log file for specific error |
| SyncTeX not working | Missing -synctex=1 flag | Add |
| Too many aux files | Normal build artifacts | Run |