Unique BibTeX
English | 中文
A VSCode extension for detecting duplicate and similar entries in BibTeX files.
Features
- Real-time Detection: Automatically detects exact duplicate entries (based on title)
- Similarity Detection: Manually triggered, detects similar entries (default threshold 90%)
Installation
Search for "Unique BibTeX" in VSCode Extensions Marketplace, or install from VSIX file.
Usage
- Open a
.bib file, the extension activates automatically
- Duplicate entries are highlighted with warnings in the editor
- Open Command Palette (
Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows/Linux) and type Unique BibTeX: Check Similar Entries to run similarity detection
Screenshots
When duplicates are found, warnings appear on the duplicate entry with a reference to the first occurrence:
Configuration
| Setting |
Default |
Description |
uniqueBib.similarityThreshold |
0.9 |
Similarity threshold for detecting similar entries (0.5-1.0) |
Example in settings.json:
{
"uniqueBib.similarityThreshold": 0.85
}
Development
Install Dependencies
npm install
Compile
npm run compile
Debug
- Open the project in VSCode
- Press
F5 to start debugging
- Test with a
.bib file in the Extension Development Host window
Watch Mode
npm run watch
Project Structure
src/
├── extension.ts # Extension entry point
├── bibParser.ts # BibTeX parser
└── similarity.ts # Similarity calculation
License
MIT
| |