Advanced Latex Platform
All-in-one skill covering create, professional, research, posters. Includes structured workflows, validation checks, and reusable patterns for scientific.
Advanced LaTeX Platform
Build professional scientific documents, papers, and presentations using LaTeX with advanced typesetting features. This skill covers document structure, mathematical notation, bibliography management, custom formatting, and automated document generation pipelines for academic and technical writing.
When to Use This Skill
Choose Advanced LaTeX Platform when you need to:
- Write research papers, theses, or dissertations with complex mathematical content
- Generate publication-ready documents conforming to journal submission templates
- Create presentations with Beamer that include code listings and equations
- Build automated document generation pipelines for reports or documentation
Consider alternatives when:
- You need quick informal documents without mathematical notation (use Markdown)
- You need collaborative real-time editing (use Overleaf or Google Docs)
- You need interactive data visualizations embedded in documents (use Jupyter notebooks)
Quick Start
# Install TeX Live (full distribution) # macOS brew install --cask mactex # Ubuntu/Debian sudo apt-get install texlive-full # Compile a document pdflatex main.tex bibtex main pdflatex main.tex pdflatex main.tex
\documentclass[12pt]{article} \usepackage{amsmath, amssymb, graphicx, hyperref} \usepackage[margin=1in]{geometry} \title{Analysis of Neural Network Convergence} \author{Research Team} \date{\today} \begin{document} \maketitle \begin{abstract} We present a convergence analysis for gradient descent in deep neural networks with ReLU activations. \end{abstract} \section{Introduction} Consider a neural network $f_\theta: \mathbb{R}^d \to \mathbb{R}$ parameterized by $\theta \in \mathbb{R}^p$. The loss function is defined as: \begin{equation} \mathcal{L}(\theta) = \frac{1}{n} \sum_{i=1}^{n} \ell(f_\theta(x_i), y_i) \label{eq:loss} \end{equation} \end{document}
Core Concepts
Document Classes and Packages
| Class/Package | Purpose | Use Case |
|---|---|---|
article | Short documents, papers | Journal submissions |
report | Multi-chapter documents | Theses, technical reports |
book | Full-length books | Textbooks, monographs |
beamer | Presentations | Conference talks |
amsmath | Advanced math typesetting | Equations, matrices |
biblatex | Bibliography management | Reference citations |
listings | Code listings | Source code display |
tikz | Vector graphics and diagrams | Figures, plots |
Advanced Mathematical Typesetting
% Aligned equations \begin{align} \nabla_\theta \mathcal{L} &= \frac{1}{n} \sum_{i=1}^n \nabla_\theta \ell(f_\theta(x_i), y_i) \label{eq:gradient} \\ \theta_{t+1} &= \theta_t - \eta \nabla_\theta \mathcal{L}(\theta_t) \label{eq:update} \end{align} % Theorem environment \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \begin{theorem}[Convergence Rate] Under Assumptions~\ref{asm:smooth}--\ref{asm:convex}, gradient descent with step size $\eta = \frac{1}{L}$ satisfies: \[ \mathcal{L}(\theta_T) - \mathcal{L}(\theta^*) \leq \frac{L \|\theta_0 - \theta^*\|^2}{2T} \] \end{theorem} % Matrix notation \begin{equation} \mathbf{H} = \begin{pmatrix} \frac{\partial^2 \mathcal{L}}{\partial \theta_1^2} & \cdots & \frac{\partial^2 \mathcal{L}}{\partial \theta_1 \partial \theta_p} \\ \vdots & \ddots & \vdots \\ \frac{\partial^2 \mathcal{L}}{\partial \theta_p \partial \theta_1} & \cdots & \frac{\partial^2 \mathcal{L}}{\partial \theta_p^2} \end{pmatrix} \end{equation}
Automated Document Generation
import subprocess import os def generate_report(data, template_path, output_path): """Generate a LaTeX report from data and template.""" with open(template_path, "r") as f: template = f.read() # Replace placeholders for key, value in data.items(): template = template.replace(f"<<{key}>>", str(value)) # Write filled template tex_path = output_path.replace(".pdf", ".tex") with open(tex_path, "w") as f: f.write(template) # Compile to PDF (run twice for references) for _ in range(2): subprocess.run( ["pdflatex", "-interaction=nonstopmode", tex_path], cwd=os.path.dirname(tex_path), capture_output=True ) return output_path # Generate monthly report report_data = { "TITLE": "Q1 Performance Report", "AUTHOR": "Analytics Team", "SUMMARY": "Revenue increased 15% quarter-over-quarter.", "TABLE_ROWS": "Jan & 1.2M & 15\\% \\\\\nFeb & 1.3M & 8\\% \\\\\nMar & 1.4M & 7\\%" } generate_report(report_data, "template.tex", "report_q1.pdf")
Configuration
| Parameter | Description | Default |
|---|---|---|
documentclass | Document type and options | article, 12pt |
geometry | Page margins and dimensions | 1in margins |
bibliography_style | Citation and reference format | plain |
encoding | Input file encoding | utf8 |
compiler | LaTeX engine to use | pdflatex |
draft_mode | Fast compilation without images | false |
Best Practices
-
Split large documents into files — Use
\input{chapters/intro}or\include{chapters/methods}to organize chapters separately. This speeds up compilation (with\includeonly) and makes version control diffs manageable. -
Use
latexmkfor compilation — Instead of manually runningpdflatex→bibtex→pdflatex→pdflatex, uselatexmk -pdf main.texwhich automatically determines the correct compilation sequence and number of passes. -
Label everything you reference — Add
\label{sec:methods},\label{eq:loss},\label{fig:results}and reference with\ref{},\eqref{},\autoref{}. Never hardcode section or equation numbers — they break when you reorder content. -
Define custom commands for repeated notation — Use
\newcommand{\loss}{\mathcal{L}}and\newcommand{\params}{\boldsymbol{\theta}}to keep equations consistent and enable easy notation changes across the entire document. -
Use version control for LaTeX projects — Track
.tex,.bib, and style files in Git. Add generated files (*.aux,*.log,*.pdf) to.gitignore. This provides history, branching for revisions, and collaboration support.
Common Issues
Undefined reference warnings after compilation — LaTeX requires multiple passes to resolve cross-references. Run pdflatex at least twice, or use latexmk which handles this automatically. If warnings persist, check for typos in \label and \ref commands.
Bibliography entries not appearing — The compilation sequence must be pdflatex → bibtex → pdflatex → pdflatex. Also verify that every cited key (\cite{key}) exists in your .bib file and that the .bib file path in \bibliography{refs} is correct (no file extension needed).
Package conflicts causing cryptic errors — Load order matters for LaTeX packages. Load hyperref last (it redefines many commands). If two packages conflict, check their documentation for compatibility options. Common conflicts include amsmath with wasysym and natbib with biblatex.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.