amhuppert/my-ai-resources/latex
- community
Checking that the SKILL.md file is still in the repository.
Generate LaTeX documents (or convert markdown to LaTeX) with professional typography. Optionally compile to PDF.
Install
npx vskill@latest install amhuppert/my-ai-resources/latexSKILL.md
LaTeX Document Creator
Create beautifully formatted LaTeX documents from any input source (markdown files, plain text, structured data, or user instructions). Produce professional-quality typeset output following modern LaTeX best practices.
Workflow
- Analyze input - Read the source material, identify structure (headings, lists, tables, figures, math, code, citations)
- Determine document class - Select appropriate class based on content type and length
- Generate LaTeX - Produce a complete
.texfile with proper preamble and body - Compile to PDF (if requested) - Detect platform and compile using
latexmk
If the user provides additional formatting instructions, apply them. User instructions override defaults below.
Document Class Selection
| Content Type | Class | When | |
|---|---|---|---|
| Short documents, articles, memos | scrartcl | No chapters needed | |
| Reports, theses, long documents | scrreprt | Chapter-level structure | |
| Books, manuals | scrbook | Front/back matter, parts | |
| Presentations | beamer | Slides |
Use KOMA-Script classes (scrartcl, scrreprt, scrbook) over standard classes for superior typography defaults and built-in customization.
Standard Preamble
Organize the preamble in this order. Include only packages the document actually needs.
Package Notes
microtypeis non-negotiable for professional output - always include itmathtoolsloadsamsmathautomatically; never load bothcleverefmust load afterhyperrefhyperrefshould load near-last- For bibliography: use
biblatexwithbiberbackend, not legacybibtex/natbib
Typography Rules
Fonts
- Default:
lmodern(Latin Modern) - clean, professional, widely available - Alternative serif:
libertinus,newtxtext/newtxmath(Times-like) - For system fonts (Unicode): switch to LuaLaTeX with
fontspec
Spacing and Punctuation
- En-dash for ranges:
2020--2025renders as 2020–2025 - Em-dash for breaks:
word---wordrenders as word—word - Non-breaking space (
~) before\cite,\cref, and between numbers and units - Thin space before differentials:
\int f(x) \, dx - Use
\enquote{}fromcsquotesfor quotation marks, never manual quote characters - Use
\emph{}instead of\textit{}- semantic emphasis that adapts to context - Use
\dotsfor ellipses, never three periods
Sentence Spacing
- After abbreviations (not ending a sentence):
e.g.\ this,i.e.\ that - After a capital letter ending a sentence:
NASA\@. The next sentence
Formatting Standards
Tables
- Always use
booktabs:\toprule,\midrule,\bottomrule - Never use vertical rules (
|) or\hline - Place table captions above the table
- Place figure captions below the figure
Figures
- Use
\centeringinside floats, not\begin{center} - Default float placement:
[htbp] - Reference all figures in text before they appear
Cross-References
- Use
\cref{}fromcleveref- automatically produces "Figure 1", "Table 2", etc. - Label prefixes:
fig:,tab:,sec:,eq:,lst: - Place
\labelimmediately after\captionor\section
Lists
- Use
enumitemfor customization - Avoid nesting deeper than 3 levels - restructure content instead
Common Pitfalls to Avoid
- Never use
$$...$$for display math - use\[...\]orequationenvironment - Never use
\\for paragraph breaks - use a blank line - Never use
\begin{center}inside floats - use\centering - Never place
\labelbefore\caption- produces wrong reference numbers - Never hardcode reference numbers - always use
\cref{} - Never use bare function names in math - use
\sin,\log, or\DeclareMathOperator - Escape special characters:
#,%,$,&,_,{,}
Markdown-to-LaTeX Conversion
When converting from markdown, apply these mappings:
| Markdown | LaTeX | |
|---|---|---|
# Heading | \section{Heading} | |
## Heading | \subsection{Heading} | |
### Heading | \subsubsection{Heading} | |
**bold** | \textbf{bold} | |
*italic* | \emph{italic} | |
` code ` | \texttt{code} | |
> blockquote | \begin{quote}...\end{quote} | |
- item | \begin{itemize}\item ...\end{itemize} | |
1. item | \begin{enumerate}\item ...\end{enumerate} | |
[text](url) | \href{url}{text} | |
 | \begin{figure}...\includegraphics{path}...\end{figure} | |
` `lang ` ` | \begin{lstlisting}[language=lang]...\end{lstlisting} | |
--- (horizontal rule) | \bigskip\noindent\rule{\textwidth}{0.4pt}\bigskip | |
| Tables | \begin{tabular} with booktabs rules | |
$math$ | $math$ (same) | |
$$math$$ | \[math\] |
Conversion Guidelines
- Infer document title from the first
#heading or filename - Infer
\authorand\dateif present in the source, otherwise omit - Preserve the semantic structure - do not flatten or over-nest headings
- Convert markdown tables to
booktabs-styledtabularenvironments - Escape all LaTeX special characters in text content
- For documents with chapters, promote heading levels (
#→\chapter,##→\section)
Compiling to PDF
When the user requests PDF output, detect the platform and compile.
Engine Selection
| Engine | Command | Use When | |
|---|---|---|---|
| pdfLaTeX | latexmk -pdf | Default. ASCII/Latin content, standard fonts, fastest compilation | |
| XeLaTeX | latexmk -xelatex | System fonts via fontspec, native Unicode | |
| LuaLaTeX | latexmk -lualatex | System fonts + Lua scripting, no memory limits |
Using latexmk (Preferred)
latexmk automatically runs the correct number of passes for cross-references, bibliographies, and indices. Always prefer it over manual multi-pass compilation.
Manual Compilation (When latexmk Is Unavailable)
Platform-Specific Installation
If LaTeX tools are not installed or compilation fails due to missing packages, read the appropriate platform guide for installation instructions:
- Ubuntu/Debian: Read
references/pdf-compilation-ubuntu.md - macOS: Read
references/pdf-compilation-macos.md
Detect the platform with uname -s (Linux or Darwin).
Package installation requires system permissions — present the installation command to the user and let them confirm before running sudo or brew commands.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude/ai-resources-plugin/skills/latex/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/amhuppert/my-ai-resources/latex)