latex-drawing-collection
LaTeX drawing examples for Bayesian networks, tensors, and diagrams
Best use case
latex-drawing-collection is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
LaTeX drawing examples for Bayesian networks, tensors, and diagrams
Teams using latex-drawing-collection should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/latex-drawing-collection/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How latex-drawing-collection Compares
| Feature / Agent | latex-drawing-collection | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
LaTeX drawing examples for Bayesian networks, tensors, and diagrams
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# LaTeX Drawing Collection
A skill providing ready-to-use LaTeX drawing examples and guidance for creating publication-quality scientific figures using TikZ, PGFPlots, and related packages. Based on awesome-latex-drawing (2K stars), this skill covers Bayesian networks, tensor decompositions, neural architectures, time series visualizations, and more.
## Overview
High-quality figures are essential for effective scientific communication. While external tools like Matplotlib or Inkscape can produce figures, native LaTeX drawings offer superior integration with the document, consistent typography, vector-quality output at any resolution, and automatic style matching with the surrounding text.
This skill equips the agent with knowledge of 30+ LaTeX drawing patterns commonly used in academic publications. Each pattern includes the required packages, a description of the drawing approach, and guidance on customization for specific research contexts.
## Essential Packages
The following LaTeX packages form the foundation for scientific drawing:
**TikZ (tikz)**
- The core drawing package for LaTeX, providing a programming interface for vector graphics
- Supports coordinate systems, transformations, path operations, and decorations
- Required for virtually all complex scientific diagrams
- Load with: `\usepackage{tikz}` and relevant libraries via `\usetikzlibrary{...}`
**PGFPlots (pgfplots)**
- Built on TikZ for creating publication-quality data plots
- Supports 2D and 3D plots, error bars, fill areas, and custom markers
- Handles axis formatting, legends, and annotations
- Load with: `\usepackage{pgfplots}` and `\pgfplotsset{compat=1.18}`
**TikZ Libraries**
- `arrows.meta` - customizable arrowhead styles
- `positioning` - relative node placement (above=of, right=of)
- `fit` - bounding boxes around groups of nodes
- `matrix` - grid-based node layouts
- `decorations.pathreplacing` - braces, zigzag, snake decorations
- `calc` - coordinate arithmetic
- `backgrounds` - layered drawing with background regions
## Bayesian Network Diagrams
Bayesian networks are among the most common diagrams in probabilistic modeling papers:
**Node Styles**
- Observed variables: filled circles or shaded nodes
- Latent variables: open (unfilled) circles
- Hyperparameters: small solid dots or fixed-value nodes
- Plates: rounded rectangles indicating repetition with index labels
**Construction Approach**
- Define node styles at the beginning of the tikzpicture environment
- Place nodes using relative positioning for maintainable layouts
- Draw directed edges with arrow styles indicating conditional dependencies
- Add plate notation around repeated variable groups
- Label edges with conditional probability annotations when needed
**Common Patterns**
- Latent Dirichlet Allocation (LDA) plate diagram
- Hidden Markov Model (HMM) chain structure
- Variational autoencoder (VAE) graphical model
- Gaussian mixture model (GMM) with plate notation
- Deep generative model hierarchies
## Tensor and Matrix Diagrams
For linear algebra and tensor decomposition papers:
**Tensor Representations**
- Matrices as 2D grids with element shading
- Third-order tensors as 3D cubes with visible faces
- Tensor networks as connected node diagrams
- Factor matrices as thin rectangular blocks
**Decomposition Visualizations**
- CP decomposition: tensor equals sum of rank-one components
- Tucker decomposition: core tensor multiplied by factor matrices
- Tensor train: chain of connected 3D cores
- Matrix factorization: large matrix as product of thin matrices
## Neural Network Architectures
For deep learning and machine learning papers:
**Layer Representations**
- Fully connected layers as columns of nodes with all-to-all connections
- Convolutional layers as stacked feature map grids
- Attention layers as matrix operation diagrams
- Recurrent connections as self-loops or unrolled sequences
**Architecture Patterns**
- Encoder-decoder structures with bottleneck
- Skip connections and residual blocks
- Multi-head attention mechanisms
- Transformer block diagrams
## Time Series and Spatiotemporal Plots
For data analysis and forecasting papers:
**Time Series Elements**
- Line plots with confidence bands using PGFPlots fill between
- Missing data indicators with dashed segments
- Multi-variate time series as stacked or aligned panels
- Seasonal decomposition as vertically arranged subplots
**Spatiotemporal Grids**
- Heatmaps using TikZ matrix with color-coded cells
- Geographic grids with observation points
- Temporal slices showing spatial evolution
## Customization Guidelines
When adapting templates for specific publications:
- Match the font size to the document class (typically 8-10pt for figure labels)
- Use consistent color schemes that work in both color and grayscale
- Align arrow styles across all figures in the paper
- Keep node sizes proportional to their importance in the diagram
- Add descriptive labels rather than relying solely on mathematical notation
- Test figures at the target column width before finalizing
## Integration with Research-Claw
This skill supports the Research-Claw writing workflow:
- Generate LaTeX drawing code from verbal descriptions of desired figures
- Adapt existing templates to match specific research contexts
- Debug TikZ compilation errors and suggest fixes
- Recommend appropriate diagram types for different data structures
- Produce standalone compilable .tex files for figure testing
## Best Practices
- Always use relative positioning instead of absolute coordinates for maintainability
- Define reusable styles at the document or figure level to ensure consistency
- Compile figures as standalone documents first, then include in the main paper
- Use `\footnotesize` or `\scriptsize` for labels inside dense diagrams
- Export to PDF for vector quality and include via `\includegraphics`
- Keep TikZ code well-commented for future modifications by collaboratorsRelated Skills
latex-templates-collection
Collection of LaTeX templates for papers, presentations, and CVs
latex-ecosystem-guide
Comprehensive guide to LaTeX editors, packages, and typesetting workflows
latex-drawing-guide
TikZ and PGFPlots techniques for publication-quality scientific figures
academic-writing-latex
LaTeX-based academic writing assistant for thesis and paper templates
latex-skills
11 latex skills. Trigger: LaTeX typesetting, formatting papers, mathematical notation, Beamer. Design: template-based guides with package recommendations and compilation tips.
latex-translation-guide
Translate LaTeX documents preserving math formulas and structure
latex-ocr-guide
Extract and convert mathematical formulas from images and PDFs to LaTeX code
data-collection-automation
Automate survey deployment, data collection, and pipeline management
arxiv-latex-source
Download and parse LaTeX source files from arXiv preprints
thuthesis-guide
Write Tsinghua University theses using the ThuThesis LaTeX template
thesis-writing-guide
Templates, formatting rules, and strategies for thesis and dissertation writing
thesis-template-guide
Set up LaTeX templates for PhD and Master's thesis documents