latex-writing

Enforce semantic LaTeX environments and label usage in .tex and .nw files.

1|1|Updated Nov 4, 2025
One-click install
npx skills add https://github.com/dbosk/claude-skills --skill latex-writing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: latex-writing
Source: https://github.com/dbosk/claude-skills/tree/main/latex-writing
Command: npx skills add https://github.com/dbosk/claude-skills --skill latex-writing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires csquotes, listings.

What problem does it solve?

Users often misuse LaTeX environments or apply manual formatting, leading to inconsistent, non-semantic, and difficult-to-maintain documents. This skill guides you to write semantically correct LaTeX, ensuring professional output, efficient document preparation, and reduced formatting headaches.

Core Features & Use Cases

  • Semantic Markup Enforcement: Guides the proper use of environments like description for term-definition pairs and itemize/enumerate for lists, matching content meaning over visual appearance.
  • Best Practices Checklist: Provides guidelines for cross-references (\label/\ref), citations (\cite), quotations (\enquote), and emphasis (\emph), preventing common anti-patterns.
  • Code & Path Handling: Ensures correct formatting for code snippets (listings, \verb) and platform-independent path specifications, maintaining document integrity.
  • Use Case: Instead of manually bolding terms in an itemize list for a glossary, this skill would guide you to use \begin{description}\item[Term] Definition... for correct semantic structure and automatic formatting.

Quick Start

I am writing a LaTeX document. Guide me on best practices for using list environments and semantic markup.

Frequently Asked Questions about latex-writing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use semantic markup correctly in LaTeX documents?

Semantic markup in LaTeX means choosing environments that match your content's meaning, not appearance. Use `description` for term-definition pairs, `itemize` for unordered lists, and `enumerate` for ordered lists. This ensures consistent formatting, maintainability, and professional output without manual bolding or styling workarounds.

What's the best way to handle cross-references and citations in LaTeX?

Use `\label` and `\ref` for internal cross-references, `\cite` for citations, and `cleveref` for automatic reference formatting. Proper labeling prevents broken links and ensures your document structure remains intact during edits, eliminating manual reference updates.

How should I format code snippets and file paths in LaTeX documents?

Use the `listings` package for code blocks and `\verb` for inline code to maintain semantic structure and platform-independent formatting. This preserves document integrity and ensures code displays correctly across different LaTeX renderers and outputs.

Can I enforce consistent list formatting across a large LaTeX document?

Yes. Define and apply semantic list environments (`description`, `itemize`, `enumerate`) consistently throughout your document. This eliminates formatting inconsistencies, reduces maintenance overhead, and ensures your document follows LaTeX best practices automatically.

Why should I use `csquotes` for quotations instead of manual formatting?

`csquotes` with `\enquote` handles language-specific quotation marks and spacing automatically, preventing anti-patterns like straight quotes or manual punctuation placement. It adapts quotation style to your document's language settings for professional, consistent output.

What are common LaTeX formatting mistakes this approach prevents?

Common anti-patterns include using `itemize` with manual bolding for glossaries, incorrect `\label` placement breaking cross-references, and inconsistent code formatting. Semantic markup enforcement eliminates these by guiding you to the correct environment for each content type.