latex-build
LaTeX builds with latexmk and live preview. TRIGGERS - latexmk, LaTeX build, live preview, compilation.
What this skill does
# LaTeX Build Automation > **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues. ## When to Use This Skill Use this skill when: - Compiling LaTeX documents - Setting up live preview with auto-rebuild - Managing multi-file projects - Troubleshooting build failures - Cleaning build artifacts - Automating compilation workflows ## Quick Reference ## Why latexmk? Industry standard build tool: - Auto-detects dependencies (bibliography, index, etc.) - Runs correct number of times (handles cross-references) - Live preview mode watches for file changes - Works with Skim for SyncTeX auto-reload - Bundled with MacTeX (no separate install needed) --- ## Basic Usage ### One-Time Build ```bash latexmk -pdf document.tex # Result: document.pdf created ``` ### Live Preview (Watch Mode) ```bash latexmk -pvc -pdf document.tex # What happens: # - Compiles document initially # - Watches for file changes # - Auto-recompiles when files change # - Auto-reloads PDF in Skim viewer ``` **Stop watching:** Press `Ctrl+C` --- ## Quick Reference Card ```bash # 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.tex ``` --- ## Build Checklist - [ ] Verify latexmk installed: `which latexmk` - [ ] Test basic build: `latexmk -pdf document.tex` - [ ] Enable SyncTeX: Add `-synctex=1` flag - [ ] Test live preview: `latexmk -pvc -pdf document.tex` - [ ] Configure Skim for auto-reload - [ ] Create Makefile for common tasks (optional) - [ ] Create .latexmkrc for project-specific settings (optional) - [ ] Test clean: `latexmk -c` removes artifacts --- ## Reference Documentation For detailed information, see: - [Common Commands](./references/common-commands.md) - Build options and output formats - [Multi-File Projects](./references/multi-file-projects.md) - Automatic dependency tracking for complex documents - [Configuration](./references/configuration.md) - .latexmkrc and Makefile integration - [Troubleshooting](./references/troubleshooting.md) - Common build issues and solutions - [Advanced Patterns](./references/advanced-patterns.md) - Parallel builds and CI/CD integration **Official Docs**: Run `man latexmk` or `latexmk -help` for complete reference **See Also**: - Use `latex/setup` skill for installing LaTeX and configuring environment - Use `latex/tables` skill for creating tables with tabularray --- ## Troubleshooting | Issue | Cause | Solution | | -------------------------- | ----------------------------- | ---------------------------------------------------- | | latexmk not found | Not in PATH | Add `/Library/TeX/texbin` to PATH | | Undefined control sequence | Missing package | Check `\usepackage` statements for required packages | | 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 `-interaction=nonstopmode` flag | | PDF not updating | Build error preventing output | Check .log file for specific error | | SyncTeX not working | Missing -synctex=1 flag | Add `-synctex=1` to build command | | Too many aux files | Normal build artifacts | Run `latexmk -c` to clean (keeps PDF) | ## Post-Execution Reflection After this skill completes, check before closing: 1. **Did the command succeed?** — If not, fix the instruction or error table that caused the failure. 2. **Did parameters or output change?** — If the underlying tool's interface drifted, update Usage examples and Parameters table to match. 3. **Was a workaround needed?** — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround. Only update if the issue is real and reproducible — not speculative.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.