citation-management
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCitation Management
引用管理
Manage the full lifecycle of citations in a LaTeX paper.
管理LaTeX论文中引用的完整生命周期。
Input
输入
- — Action:
$0,harvest,validate,addformat - — Path to
$1or.texfile.bib
- — 操作:
$0(获取)、harvest(验证)、validate(添加)、add(格式化)format - — .tex或.bib文件的路径
$1
Scripts
脚本
Validate citations (check all cite keys resolve)
验证引用(检查所有引用键是否可解析)
bash
python ~/.claude/skills/citation-management/scripts/validate_citations.py \
--tex paper/main.tex --bib paper/references.bib --check-figures --figures-dir paper/figures/Reports: missing citations, unused bib entries, duplicate keys, duplicate sections, duplicate labels, undefined references, missing figures.
bash
python ~/.claude/skills/citation-management/scripts/validate_citations.py \
--tex paper/main.tex --bib paper/references.bib --check-figures --figures-dir paper/figures/报告内容:缺失的引用、未使用的bib条目、重复键、重复章节、重复标签、未定义的引用、缺失的图片。
Generate BibTeX from paper database
从论文数据库生成BibTeX
bash
python ~/.claude/skills/deep-research/scripts/bibtex_manager.py \
--jsonl paper_db.jsonl --output references.bibbash
python ~/.claude/skills/deep-research/scripts/bibtex_manager.py \
--jsonl paper_db.jsonl --output references.bibSearch for a specific paper to add
搜索特定论文以添加引用
bash
python ~/.claude/skills/deep-research/scripts/search_semantic_scholar.py \
--query "attention is all you need" --max-results 5 \
--api-key "$(grep S2_API_Key /Users/lingzhi/Code/keys.md 2>/dev/null | cut -d: -f2 | tr -d ' ')"bash
python ~/.claude/skills/deep-research/scripts/search_semantic_scholar.py \
--query "attention is all you need" --max-results 5 \
--api-key "$(grep S2_API_Key /Users/lingzhi/Code/keys.md 2>/dev/null | cut -d: -f2 | tr -d ' ')"Harvest missing citations automatically
自动获取缺失的引用
bash
python ~/.claude/skills/citation-management/scripts/harvest_citations.py \
--tex paper/main.tex --bib paper/references.bib --output candidates.bib --max-rounds 10Scans .tex for uncited claims, searches Semantic Scholar, outputs candidate BibTeX entries.
Key flags: (preview only), ,
--dry-run--verbose--api-keybash
python ~/.claude/skills/citation-management/scripts/harvest_citations.py \
--tex paper/main.tex --bib paper/references.bib --output candidates.bib --max-rounds 10扫描.tex文件查找未引用的论点,在Semantic Scholar中进行搜索,输出候选BibTeX条目。
关键参数:(仅预览)、(详细模式)、(API密钥)
--dry-run--verbose--api-keyAuto-fix missing citation placeholders
自动修复缺失的引用占位符
bash
python ~/.claude/skills/citation-management/scripts/validate_citations.py \
--tex paper/main.tex --bib paper/references.bib --fixGenerates with placeholder entries for all missing citation keys.
references_fixed.bibbash
python ~/.claude/skills/citation-management/scripts/validate_citations.py \
--tex paper/main.tex --bib paper/references.bib --fix生成文件,为所有缺失的引用键添加占位条目。
references_fixed.bibAction: harvest
— Iterative Citation Harvesting
harvest操作:harvest
— 迭代式引用获取
harvestBased on AI-Scientist's 20-round citation harvesting loop. For each round:
- Read the current draft
.tex - Identify the most important missing citation
- Search Semantic Scholar via script
- Select the most relevant paper from results
- Extract BibTeX and generate a clean key ()
lastNameYearWord - Append to (skip if key exists)
.bib - Insert at the appropriate location
\cite{key} - Stop when no more gaps or 20 rounds reached
Key rules:
- DO NOT add a citation that already exists
- Only add citations found via API — never fabricate
- Cite broadly — not just popular papers
- Do not copy verbatim from prior literature
基于AI-Scientist的20轮引用获取循环。每一轮包括:
- 读取当前的.tex草稿
- 识别最重要的缺失引用
- 通过脚本搜索Semantic Scholar
- 从结果中选择最相关的论文
- 提取BibTeX并生成清晰的引用键(格式:)
lastNameYearWord - 添加到.bib文件(若键已存在则跳过)
- 在合适位置插入
\cite{key} - 当无更多缺失或达到20轮时停止
核心规则:
- 请勿添加已存在的引用
- 仅添加通过API找到的引用——切勿编造
- 广泛引用——不要只引用热门论文
- 不要直接复制现有文献的内容
Action: validate
— Pre-Compilation Check
validate操作:validate
— 编译前检查
validateRun to catch all issues before compilation. Fix any reported problems.
validate_citations.py运行以在编译前捕获所有问题。修复所有报告的问题。
validate_citations.pyAction: add
— Add Specific Paper
add操作:add
— 添加特定论文
addSearch Semantic Scholar for the paper, extract BibTeX, clean the key, append to .
.bibBibTeX key format: (e.g., )
firstAuthorLastNameYearFirstContentWordvaswani2017attention在Semantic Scholar中搜索该论文,提取BibTeX,整理引用键,添加到.bib文件。
BibTeX引用键格式:(例如:)
firstAuthorLastNameYearFirstContentWordvaswani2017attentionAction: format
— Standardize .bib
format操作:format
— 标准化.bib文件
format- Sort entries alphabetically by key
- Ensure consistent indentation (2 spaces)
- Remove empty fields
- Protect proper nouns with in titles
{Braces} - Ensure required fields per entry type
- 按引用键字母顺序排序条目
- 确保一致的缩进(2个空格)
- 移除空字段
- 在标题中用保护专有名词
{Braces} - 确保每个条目类型包含必填字段
Related Skills
相关技能
- Upstream: literature-search, deep-research
- Downstream: paper-compilation, latex-formatting
- See also: related-work-writing
- 上游:文献搜索、深度研究
- 下游:论文编译、LaTeX格式调整
- 另见:相关工作撰写