LaTeX Revision Tracker Skill
Overview
This skill provides a comprehensive workflow for managing revisions to large LaTeX academic papers (10+ pages, multiple sections, complex bibliographies). It emphasizes systematic version control, careful content integration, and quality assurance throughout the revision process.
When to Use
Use this skill when:
- - Revising large academic papers or dissertations in LaTeX
- Integrating new content (figures, data, analysis) into existing manuscripts
- Collaborating on multi-author academic documents
- Preparing papers for journal submission with multiple revision rounds
- Managing complex manuscripts with extensive bibliographies and cross-references
Core Workflow
1. Version Control Setup
File Naming Convention:
CODEBLOCK0
Change Documentation:
Create version_changes.md for each revision:
CODEBLOCK1
2. Content Integration Strategy
Pre-Integration Checklist:
- - [ ] New content reviewed for accuracy and style
- [ ] Figures prepared in publication quality (PDF/EPS preferred)
- [ ] All citations properly formatted and verified
- [ ] Mathematical notation consistent with existing document
- [ ] Cross-references planned (
\label{} and \ref{} commands)
Integration Process:
CODEBLOCK2
3. LaTeX-Specific Quality Control
Compilation Workflow:
CODEBLOCK3
Common Issues and Solutions:
Unicode Characters:
CODEBLOCK4
Reference Resolution:
CODEBLOCK5
Float Management:
CODEBLOCK6
4. Academic Content Integration
Section-Specific Integration Guidelines:
Abstract Updates:
- - Maintain 150-250 word limit
- Update contribution statements to reflect new content
- Ensure keywords remain accurate
Introduction Modifications:
- - Integrate new motivation naturally
- Update contribution list if needed
- Maintain logical flow from general to specific
Related Work Additions:
- - Group new citations thematically
- Compare explicitly with existing approaches
- Maintain chronological awareness
Results Section Integration:
- - Number figures/tables consecutively
- Reference all new content in text
- Maintain consistent data presentation style
Discussion/Conclusion Updates:
- - Integrate implications of new findings
- Update limitations section if applicable
- Revise future work based on new insights
5. Bibliography Management
Citation Integration Process:
- 1. Add new entries to
.bib file - Use consistent citation keys (
author2024keyword) - Verify all required fields (author, title, year, venue)
- Check for duplicate entries
- Run
bibtex to update references - Resolve any citation warnings
Citation Style Consistency:
CODEBLOCK7
6. Quality Assurance Process
Pre-Submission Checklist:
- - [ ] Document compiles without errors or warnings
- [ ] All figures appear correctly and are referenced in text
- [ ] All tables are properly formatted and referenced
- [ ] Bibliography is complete and properly formatted
- [ ] Cross-references resolve correctly
- [ ] Page layout is consistent with journal requirements
- [ ] Mathematical notation is consistent throughout
- [ ] Acronyms defined on first use
- [ ] Line spacing and margins correct for submission
Collaboration Workflow:
CODEBLOCK8
7. Error Resolution Strategies
Common LaTeX Errors:
Missing References:
CODEBLOCK9
Overfull/Underfull Boxes:
CODEBLOCK10
Float Issues:
CODEBLOCK11
Bibliography Errors:
CODEBLOCK12
8. Performance Optimization
For Large Documents (50+ pages):
- - Use
\includeonly{} to compile specific chapters - Split large documents with
\input{} or INLINECODE8 - Use
\graphicspath{} for organized figure directories - Consider
latexmk for automated compilation management
Memory Management:
CODEBLOCK13
Advanced Features
1. Diff Tracking
CRITICAL: Diff files inherit ALL citation dependencies from the source documents. You MUST run the full bibliography workflow — a single pdflatex pass will ALWAYS produce citation errors ([?] markers) in diff files. This is the most common mistake.
Full diff workflow (mandatory — no shortcuts):
CODEBLOCK14
Never do this:
CODEBLOCK15
Troubleshooting citation errors in diff files:
- -
[?] markers → you skipped bibtex. Run the full 4-step workflow above. - INLINECODE15 → copy the
.bib file to the diff directory. - INLINECODE17 → copy the
.bst file too. - Still broken → check that
\bibliography{} and \bibliographystyle{} paths are correct in the source .tex files before running latexdiff.
Post-diff cleanup: After the diff PDF is verified, remove all intermediate files. Only the final PDF should remain.
CODEBLOCK16
Rule: Always clean up after generating a diff PDF. The diff .tex file is a throwaway — it's auto-generated and can be recreated anytime from the two source versions. Never keep it around to clutter the workspace.
2. Automated Quality Checks
CODEBLOCK17
3. Collaborative Tools
CODEBLOCK18
Templates
Change Log Template
CODEBLOCK19
Integration Checklist Template
CODEBLOCK20
Best Practices
- 1. Always backup before major changes
- Document everything in change logs
- Test compilation early and often
- Use consistent naming for files and labels
- Review systematically with checklists
- Collaborate deliberately with clear ownership
- Plan integration before making changes
- Maintain quality throughout the process
Common Pitfalls
- - Skipping documentation: Change logs save time later
- Inconsistent compilation: Always run full workflow for bibliography
- Poor float placement: Plan figure integration carefully
- Missing backups: One corrupted file can lose days of work
- Rushed integration: Quality issues compound in large documents
- Ignoring warnings: Small issues become large problems
Tools and Resources
Essential Tools:
- - LaTeX distribution (TeX Live, MiKTeX)
- PDF viewer with refresh capability (SumatraPDF, Skim)
- Text editor with LaTeX support (TeXstudio, VS Code with LaTeX Workshop)
- Reference manager (Mendeley, Zotero, BibTeX)
Quality Assurance:
- -
latexdiff for visual change tracking - INLINECODE25 for syntax validation
- INLINECODE26 for word counting
- Git for version control
This skill provides the systematic approach needed to manage complex LaTeX academic papers while maintaining quality and avoiding common pitfalls that plague large document revision processes.
LaTeX修订追踪技能
概述
本技能提供了一套全面的工作流程,用于管理大型LaTeX学术论文(10页以上、多章节、复杂参考文献)的修订工作。它强调在整个修订过程中进行系统化的版本控制、细致的内容整合和质量保证。
使用时机
在以下情况下使用本技能:
- - 修订大型LaTeX学术论文或学位论文
- 将新内容(图表、数据、分析)整合到现有稿件中
- 在多位作者合作的学术文档上进行协作
- 准备经过多轮修订后提交期刊的论文
- 管理包含大量参考文献和交叉引用的复杂稿件
核心工作流程
1. 版本控制设置
文件命名规范:
manuscriptv1initial.tex
manuscriptv2reviewer_response.tex
manuscriptv3final_submission.tex
变更文档:
为每次修订创建version_changes.md:
markdown
V2到V3变更摘要
所做变更:
✅ 新增章节:
- - 第4.2节:玻璃极限分析
- 位置:热导率讨论之后
- 内容:3个段落 + 1张图
✅ 新增图表:
- - cahillplot.pdf - 可发表状态(300 DPI)
- 引用:Figure~\ref{fig:cahillplot}
- 图注:[完整图注文本]
✅ 内容修改:
- - 更新摘要(第25-35行)
- 修订结论(第6节,第2段)
- 新增12条引用文献
整合细节:
- - 放置位置:现有分析之后,讨论之前
- 行号:大约第450-480行
- 编译状态:✅ 成功 / ❌ Unicode问题
2. 内容整合策略
整合前检查清单:
- - [ ] 新内容已审核准确性和风格
- [ ] 图表已准备为发表质量(首选PDF/EPS)
- [ ] 所有引用文献已正确格式化并验证
- [ ] 数学符号与现有文档一致
- [ ] 已规划交叉引用(\label{}和\ref{}命令)
整合过程:
- 1. 备份当前工作版本
- 确定文档结构中的整合点
- 规划图表/表格的放置和编号
- 使用适当的分节插入内容
- 更新整个文档中的交叉引用
- 迭代编译并解决错误
3. LaTeX特定质量控制
编译工作流程:
bash
用于参考文献更新(完整工作流程)
pdflatex manuscript.tex
bibtex manuscript
pdflatex manuscript.tex
pdflatex manuscript.tex
用于微小更改(快速检查)
pdflatex manuscript.tex
pdflatex manuscript.tex
常见问题及解决方案:
Unicode字符:
latex
% 问题:文本中的特殊字符(κ, α, β)
% 解决方案:使用数学模式或适当的宏包
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% 在文本中:$\kappa$ 而不是 κ
% 在公式中:\begin{equation} \kappa = ... \end{equation}
引用解析:
latex
% 确保标签位于所引用内容之后
\section{结果}
\label{sec:results} % ✅ 在章节标题之后
\begin{figure}
\includegraphics{plot.pdf}
\caption{重要结果}
\label{fig:results} % ✅ 在图注之后
\end{figure}
浮动体管理:
latex
% 灵活放置
\begin{figure}[htbp]
% 强制精确位置(谨慎使用)
\usepackage{float}
\begin{figure}[H]
% 双栏格式中的宽图
\begin{figure*}[t]
4. 学术内容整合
特定章节整合指南:
摘要更新:
- - 保持150-250字限制
- 更新贡献陈述以反映新内容
- 确保关键词保持准确
引言修改:
- - 自然地融入新的动机
- 必要时更新贡献列表
- 保持从一般到具体的逻辑流程
相关工作补充:
- - 按主题对新增引用文献进行分组
- 与现有方法进行明确比较
- 保持时间顺序意识
结果部分整合:
- - 图表连续编号
- 在正文中引用所有新内容
- 保持一致的数据呈现风格
讨论/结论更新:
- - 整合新发现的含义
- 必要时更新局限性部分
- 基于新见解修订未来工作
5. 参考文献管理
引用整合过程:
- 1. 将新条目添加到.bib文件
- 使用一致的引用键(author2024keyword)
- 验证所有必填字段(作者、标题、年份、出处)
- 检查重复条目
- 运行bibtex更新参考文献
- 解决任何引用警告
引用风格一致性:
latex
% 文中引用
Recent work has shown \cite{smith2024analysis}...
Multiple studies \cite{jones2023,brown2024,wilson2024} have...
As demonstrated by Smith et al.~\cite{smith2024analysis}...
% 参考文献格式(取决于期刊风格)
% IEEE: [1] A. Smith, Title, Journal, vol. 1, pp. 1-10, 2024.
% ACM: [1] Smith, A. 2024. Title. Journal 1, 1 (2024), 1-10.
6. 质量保证流程
提交前检查清单:
- - [ ] 文档编译无错误或警告
- [ ] 所有图表正确显示并在正文中被引用
- [ ] 所有表格格式正确并被引用
- [ ] 参考文献完整且格式正确
- [ ] 交叉引用正确解析
- [ ] 页面布局符合期刊要求
- [ ] 数学符号全文一致
- [ ] 缩略语首次使用时定义
- [ ] 行距和页边距符合提交要求
协作工作流程:
- 1. 作者A进行更改 → 提交并附详细说明
- 作者B审核更改 → 提出修改建议
- 在版本日志中记录更改
- 由指定的稿件管理员进行最终整合
- 所有合著者在提交前审核最终版本
7. 错误解决策略
常见LaTeX错误:
缺失引用:
LaTeX Warning: Reference fig:unknown undefined
解决方案:检查\label{}和\ref{}拼写,编译两次
过满/不满盒子:
Overfull \hbox (15.0pt too wide)
解决方案:改写文本,添加连字符提示(\-),或使用\sloppy
浮动体问题:
Too many unprocessed floats
解决方案:添加\clearpage或调整浮动体放置选项
参考文献错误:
Citation unknown2024 undefined
解决方案:检查.bib文件,运行bibtex,重新编译
8. 性能优化
对于大型文档(50页以上):
- - 使用\includeonly{}编译特定章节
- 使用\input{}或\include{}拆分大型文档
- 使用\graphicspath{}组织图形目录
- 考虑使用latexmk进行自动编译管理
内存管理:
latex
% 对于包含大量图形的文档
\usepackage{graphicx}
\DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg}
% 对于复杂参考文献
\usepackage[backend=bibtex,style=ieee]{biblatex}
高级功能
1. 差异追踪
关键: 差异文件继承源文档的所有引用依赖。您必须运行完整的参考文献工作流程——单次pdflatex编译总是会在差异文件中产生引用错误([?]标记)。这是最常见的错误。
完整差异工作流程(强制——无捷径):
bash
步骤1:生成差异.tex文件
latexdiff manuscript
v1.tex manuscriptv2.tex > diff
v1v2.tex
步骤2:将参考文献文件复制到同一目录
差异文件需要访问相同的.bib文件和.bst样式
cp manuscript.bib . # 如果尚未存在
步骤3:完整编译(所有步骤必需)
pdflatex diff
v1v2.tex # 第一次编译——生成包含引用键的.aux文件
bibtex diff
v1v2 # 从.bib文件解析引用
pdflatex diff
v1v2.tex # 第二次编译——整合参考文献
pdflatex diff
v1v2.tex # 第三次编译——解析所有交叉引用
切勿这样做:
bash
错误——每个引用都会产生[?]
pdflatex diff
v1v2.tex