LaTeX Writer
Intelligent LaTeX document generator with template management and PDF compilation.
Features
- - 📄 Academic Templates: IEEE, ACM, Springer, Elsevier
- 📝 Chinese Support: CTeX for thesis and reports
- 👤 CV/Resume: moderncv, altacv templates
- 🎨 Custom Templates: Import your own .cls files
- 🔧 Auto Compilation: xelatex/lualatex with error handling
- 📊 Figure/Table Support: Auto-convert markdown tables to LaTeX
Trigger Conditions
Use this skill when:
- 1. User asks to "write a paper" with specific format
- User mentions "LaTeX", "PDF", "typesetting"
- User needs CV/resume generation
- User provides content and asks for professional formatting
Usage Examples
Academic Paper
CODEBLOCK0
Chinese Thesis
CODEBLOCK1
CV Generation
CODEBLOCK2
Implementation
See scripts/ directory for implementation:
- -
latex_writer.py - Main entry point - INLINECODE2 - Template library management
- INLINECODE3 - Parse user input to structured content
- INLINECODE4 - Generate LaTeX code
- INLINECODE5 - Compile LaTeX to PDF
Requirements
- - Python 3.10+
- TeX Live or MiKTeX (with xelatex)
- CJK fonts for Chinese support
LaTeX 编写器
智能LaTeX文档生成器,支持模板管理和PDF编译。
功能特性
- - 📄 学术模板:IEEE、ACM、Springer、Elsevier
- 📝 中文支持:适用于论文和报告的CTeX
- 👤 简历/履历:moderncv、altacv模板
- 🎨 自定义模板:导入您自己的.cls文件
- 🔧 自动编译:xelatex/lualatex,带错误处理
- 📊 图表支持:自动将Markdown表格转换为LaTeX
触发条件
在以下情况下使用此技能:
- 1. 用户要求写一篇论文并指定格式
- 用户提到LaTeX、PDF、排版
- 用户需要生成简历/履历
- 用户提供内容并要求专业排版
使用示例
学术论文
用户:帮我写一篇 IEEE 格式的机器学习论文,主题是深度学习在医学影像中的应用
技能操作:
- 1. 选择IEEEtran模板
- 生成结构:摘要 → 引言 → 方法 → 实验 → 结论
- 询问用户关键内容要点
- 生成包含数学公式的LaTeX
- 编译为PDF
中文论文
用户:我要写硕士毕业论文,学校要求用 LaTeX
技能操作:
- 1. 选择CTeX模板(ctexrep)
- 配置中文字体(宋体、黑体)
- 设置学校特定要求
- 生成章节结构
简历生成
用户:帮我生成一份软件工程师的英文简历
技能操作:
- 1. 选择moderncv模板(银行风格)
- 收集用户信息
- 使用适当章节进行格式化
- 生成PDF
实现方式
参见 scripts/ 目录下的实现文件:
- - latexwriter.py - 主入口
- templatemanager.py - 模板库管理
- contentparser.py - 将用户输入解析为结构化内容
- latexgenerator.py - 生成LaTeX代码
- pdf_builder.py - 将LaTeX编译为PDF
系统要求
- - Python 3.10+
- TeX Live 或 MiKTeX(含xelatex)
- 中文支持所需的CJK字体