latex-guard

Preserve LaTeX citations, references, figures, and equations while editing prose.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/woaijiadanoo/thesis-agent --skill latex-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: latex-guard
Source: https://github.com/woaijiadanoo/thesis-agent/tree/main/.cursor/skills/latex-guard
Command: npx skills add https://github.com/woaijiadanoo/thesis-agent --skill latex-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill protects LaTeX structural elements during thesis editing and proofreading.

Core Features & Use Cases

  • Identify protected elements (citations, cross-references, figures, tables, equations, and file paths)
  • Preserve them exactly; edit only prose
  • Escape special characters when inserting new text
  • Output a complete, compilable LaTeX document with all protected content unchanged
  • Edge case handling: nested environments, malformed citations, and mixed content lines

Quick Start

Use latex-guard to edit a LaTeX chapter while preserving citations, cross-references, figures, tables, and equations. Provide the LaTeX content with edits limited to prose and request protection for all structural elements. Return a complete, compilable LaTeX document with protected content preserved.

Frequently Asked Questions about latex-guard

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

FAQPage Schema
How do I edit LaTeX prose without breaking citations and cross-references?

To edit LaTeX prose without breaking citations and cross-references, apply rules that identify protected structural elements and restrict modifications to text only. This approach preserves citations, figures, tables, and equations exactly while polishing chapters.

Can I proofread a LaTeX thesis while keeping equations and file paths intact?

Yes, you can proofread a LaTeX thesis while keeping equations and file paths intact by enforcing protection rules during editing. This ensures structural elements remain unchanged while academic proofreading occurs strictly in prose sections.

What is the best way to preserve LaTeX environments during academic editing?

The best way to preserve LaTeX environments during academic editing is to identify protected commands, environments, and math content first. This mechanism ensures edits occur only in prose and handles edge cases like nested environments and mixed content lines.

How do I escape special characters when inserting new text into a LaTeX document?

To escape special characters when inserting new text into a LaTeX document, apply proper escaping rules during the editing process. This ensures the output remains a complete, compilable LaTeX document with all protected content unchanged.

Does LaTeX editing handle malformed citations and nested environments?

LaTeX editing handles malformed citations and nested environments through specific edge case processing. It identifies these protected structural elements during thesis editing and preserves them exactly, ensuring modifications happen only in prose.

Why does my LaTeX document fail to compile after proofreading?

A LaTeX document may fail to compile after proofreading if structural elements like citations, cross-references, or equations were accidentally modified. Using a protection mechanism ensures edits occur only in prose, outputting a complete, compilable document.