✅ Overview

Scimax VS Code provides comprehensive BibTeX file editing support with speed commands, batch operations, and intelligent author name handling. This complements the citation management features in References and Citations.

✅ Features

  • Speed Commands - Single-key commands when cursor is at the start of an entry

  • Entry Operations - Clean, format, and transform individual entries

  • File Operations - Sort entries, apply batch transformations, validate files

  • Smart Author Parsing - Proper handling of particles (von, van der), suffixes (Jr., III), and corporate authors

  • Journal Abbreviations - Toggle journal names between full and abbreviated forms using 50,000+ abbreviation database

✅ When to Use This

This document covers editing .bib files directly. For inserting and managing citations in org/markdown/LaTeX documents, see References and Citations.

✅ Speed Commands

BibTeX speed commands are single-key shortcuts available when your cursor is at column 0 of a line starting with @ (an entry definition line like @article{).

✅ Enabling Speed Commands

Speed commands are enabled by default for BibTeX files. The context scimax.atBibtexEntryStart is automatically set when appropriate.

✅ Available Speed Commands

✅ Navigation

KeyCommandDescription
nscimax.bibtex.nextEntryJump to next entry
pscimax.bibtex.previousEntryJump to previous entry
jscimax.bibtex.jumpToEntryJump to entry by key (fuzzy)
?scimax.bibtex.helpShow speed command help

✅ Entry Formatting

KeyCommandDescription
sscimax.bibtex.sortFieldsSort fields in standard order
dscimax.bibtex.downcaseEntryLowercase entry type and field names
tscimax.bibtex.titleCaseConvert title to Title Case
Sscimax.bibtex.sentenceCaseConvert title to sentence case
cscimax.bibtex.cleanEntryClean entry (normalize, sort, trim)
Kscimax.bibtex.generateKeyGenerate citation key from pattern
bscimax.bibtex.wrapBracesWrap selection in braces (for case protection)
Bscimax.bibtex.stripBracesStrip all internal braces from entry

✅ External Resources

KeyCommandDescription
oscimax.bibtex.openPdfOpen associated PDF file
uscimax.bibtex.openUrlOpen URL field in browser
Nscimax.bibtex.openNotesOpen/create notes file for entry
gscimax.bibtex.googleScholarSearch entry on Google Scholar
xscimax.bibtex.crossrefSearch entry on CrossRef
wscimax.bibtex.webOfScienceSearch entry on Web of Science

✅ OpenAlex Integration

KeyCommandDescription
Cscimax.bibtex.showCitingWorksShow papers citing this work
Rscimax.bibtex.showRelatedWorksShow related works
rscimax.bibtex.showReferencesShow references cited by this work

✅ Clipboard Operations

KeyCommandDescription
kscimax.bibtex.copyKeyCopy citation key to clipboard
yscimax.bibtex.copyBibtexCopy full BibTeX entry
Kscimax.bibtex.killEntryDelete entire entry

✅ Using Speed Commands

  1. Open a .bib file

  2. Move cursor to column 0 of an @entry{ line

  3. Press a single key from the tables above

  4. Press ? to see available commands

Example:

@article{smith2020machine,    <-- cursor at column 0 here
  author = {John Smith},
  title = {Machine Learning},
  year = {2020}
}

✅ Entry Operations

These commands operate on the entry at the cursor position.

✅ Clean Entry

Command: scimax.bibtex.cleanEntry (speed key: c)

Cleans the current entry by:

  • Normalizing whitespace (single spaces, trimmed)

  • Lowercasing field names

  • Sorting fields in standard BibTeX order

  • Removing duplicate outer braces ({{Title}} → {Title})

  • Preserving inner braces for case protection ({DNA} stays as-is)

Before:

@Article{Smith2020,
  AUTHOR = {  John   Smith  },
  TITLE = {{A Machine Learning Approach}},
  Year = {2020},
  Journal = {Nature}
}

After:

@article{Smith2020,
  author = {John Smith},
  title = {A Machine Learning Approach},
  journal = {Nature},
  year = {2020},
}

✅ Title Case

Command: scimax.bibtex.titleCase (speed key: T)

Converts the title field to Title Case while preserving:

  • Braced content ({DNA}, {NASA})

  • Small words (a, an, the, and, but, or, for, in, of, on, to, etc.)

Example:

  • "the effects of machine learning on {DNA} analysis" → "The Effects of Machine Learning on {DNA} Analysis"

Sentence Case

Command: scimax.bibtex.sentenceCase (speed key: t)

Converts the title field to sentence case (only first word capitalized) while preserving braced content.

Example:

  • "The Effects Of Machine Learning" → "The effects of machine learning"

  • "Analysis of {DNA} Sequences" → "Analysis of {DNA} sequences"

✅ Generate Key

Command: scimax.bibtex.generateKey (speed key: K)

Generates a citation key based on a configurable pattern. The pattern is set via the scimax.bibtex.keyPattern setting.

Pattern Configuration

Setting: scimax.bibtex.keyPattern Default: {lastname}-{year}-{title}

Available placeholders:

PlaceholderDescription
{lastname}First author's last name (lowercase)
{Lastname}First author's last name (capitalized)
{year}Publication year
{title}First significant word from title
{title:N}First N significant words (hyphenated)
{journal}Journal abbreviation (initials)
{keywords}First keyword
{type}Entry type (article, book, etc.)

Pattern Examples

PatternResult
{lastname}-{year}-{title}kitchin-2015-machine
{Lastname}{year}Kitchin2015
{lastname}-{title:2}-{year}kitchin-machine-learning-2015
{lastname}-{year}-{keywords}kitchin-2015-catalysis

Author Handling

AuthorYearTitleKey (default pattern)
Smith, John2024Machine Learning for Sciencesmith-2024-machine
van der Berg2023Deep Neural Networksberg-2023-deep
{NASA}2022Space Exploration Reportnasa-2022-space

Sort Fields

Command: scimax.bibtex.sortFields (speed key: s)

Reorders fields in standard BibTeX order:

  1. author, title, journaltitle/journal, booktitle

  2. editor, edition, volume, number, issue, pages

  3. publisher, location/address, year, date, month

  4. doi, url, urldate, isbn, issn

  5. eprint, eprinttype, archiveprefix, primaryclass

  6. note, annote, abstract, keywords, file

  7. Any remaining fields

Downcase Entry

Command: scimax.bibtex.downcaseEntry (speed key: d)

Lowercases the entry type and all field names:

  • @Article → @article

  • =Author = = → =author ==

  • =JOURNAL = = → =journal ==

Wrap in Braces

Command: scimax.bibtex.wrapBraces (speed key: b, keybinding: Cmd+Shift+])

Wraps the current selection or word in curly braces for case protection.

Use this to protect:

  • Acronyms: DNA → {DNA}

  • Proper nouns: Python → {Python}

  • Chemical formulas: H2O → {H2O}

✅ Strip Braces

Command: scimax.bibtex.stripBraces (speed key: B, keybinding: Cmd+Shift+[)

Strips all internal braces from the current entry. Useful for cleaning up entries where braces have been overused.

Before:

@article{smith2024,
  author = {John Smith},
  title = {{A} {Study} of {Machine} {Learning}},
  journal = {{Nature}},
  year = {2024}
}

After:

@article{smith2024,
  author = {John Smith},
  title = {A Study of Machine Learning},
  journal = {Nature},
  year = {2024}
}

Note: This removes ALL internal braces. If you need to preserve specific braces (like {DNA}), you'll need to re-add them after running this command.

✅ File Operations

These commands operate on the entire BibTeX file.

Sort Entries

Command: scimax.bibtex.sortEntries

Sorts all entries in the file. Shows a menu to choose sort order:

OptionDescription
By KeyAlphabetically by citation key
By YearOldest to newest (secondary: key)
By AuthorAlphabetically by first author last name
(secondary: year, then key)

The command preserves any preamble content (comments, @string definitions) at the top of the file.

Apply Operation to All Entries

Command: scimax.bibtex.applyToAllEntries

Applies a transformation to every entry in the file. Shows a menu of operations:

OperationDescription
Clean EntriesNormalize whitespace, sort fields, lowercase names
Title Case TitlesConvert all titles to Title Case
Sentence Case TitlesConvert all titles to sentence case
Standardize KeysRegenerate all keys as author-year-word format
Sort FieldsReorder fields in standard BibTeX order
Downcase EntriesLowercase all entry types and field names

Standardize Keys Warning

The "Standardize Keys" option shows a confirmation dialog because it can break existing citations in your documents. It also:

  • Handles duplicate keys by adding suffixes (a, b, c, ...)

  • Reports how many duplicates were resolved

Validate File

Command: scimax.bibtex.validateFile

Validates the BibTeX file and reports:

  • Total number of entries

  • Entry types and counts

  • Syntax style (BibTeX vs BibLaTeX vs mixed)

  • Duplicate keys

  • Missing required fields

  • Syntax errors

Results are shown in an output channel with severity indicators:

  • ❌ Errors (must fix)

  • ⚠️ Warnings (should fix)

Show Statistics

Command: scimax.bibtex.showStatistics

Shows a quick overview of the BibTeX file:

  • Total entries

  • Entries by type (article, book, etc.)

  • Syntax style detection

  • Field usage statistics

✅ Author Name Handling

Scimax uses the citation-js library for proper BibTeX author name parsing, handling complex cases that simple parsers miss.

✅ Supported Formats

✅ Standard Formats

InputParsed As
Smith, JohnFamily: Smith, Given: John
John SmithFamily: Smith, Given: John
Smith, John and Doe, JaneTwo authors

✅ Particles (von, van der, de la)

InputDisplay Last NameKey Last Name
van der Berg, Hansvan der Bergberg
Hans van der Bergvan der Bergberg
de la Cruz, Mariade la Cruzcruz
Ludwig van Beethovenvan Beethovenbeethoven

✅ Suffixes (Jr., III)

InputParsed Components
Smith, Jr., JohnFamily: Smith, Given: John, Suffix: Jr.
King, III, Martin LutherFamily: King, Given: Martin Luther, Suffix: III

✅ Corporate Authors

Corporate or institutional authors should be wrapped in braces:

InputParsed As
{NASA}Literal name: NASA
{National Academy of Sciences}Literal name: National Academy of Sciences
{World Health Organization}Literal name: World Health Organization

Key Generation with Authors

When generating citation keys, the first author's last name is used:

  • Particles are stripped for the key (van der Berg → berg)

  • Corporate names are cleaned (NASA → nasa)

  • Accents are normalized (Müller → muller)

✅ Best Practices

✅ Entry Formatting

  1. Use consistent case - Run "Downcase Entries" on your file

  2. Sort fields consistently - Use "Clean Entries" or "Sort Fields"

  3. Protect case-sensitive text - Wrap in braces: {DNA}, {Python}, {NASA}

  4. Include DOIs - Enables OpenAlex integration and hover previews

✅ Key Naming

Recommended format: author-year-keyword or authoryearkeyword

Good keys:

  • smith-2024-machine or smith2024machine

  • vandenberg-2023-neural (note: particle stripped)

  • nasa-2022-report

Bad keys:

  • ref1, paper2 (not memorable)

  • ML_Paper_2024 (inconsistent format)

✅ File Organization

  • One bibliography file per project or topic

  • Use @string definitions for common journals

  • Keep entries in consistent order (by key or year)

  • Regularly validate files for errors

✅ Before Sharing

  1. Run scimax.bibtex.validateFile to check for errors

  2. Run "Clean Entries" via scimax.bibtex.applyToAllEntries

  3. Optionally sort entries by key or year

Journal Abbreviations

Scimax includes a comprehensive journal abbreviation database that allows you to toggle between full journal names and their standardized ISO 4 abbreviations.

Data Sources

The abbreviation database is sourced from the JabRef Abbreviation Repository, which aggregates abbreviations from multiple authoritative sources:

SourceDescriptionEntries
GeneralCross-discipline abbreviations~1,900
ACS (Chemistry)American Chemical Society journals~1,700
AMS (Mathematics)American Mathematical Society journals~2,500
IEEEIEEE journals and conferences~280
Entrez/PubMedMedline abbreviations (dotless format)~19,500
Life ScienceBiology and life science journals~9,700
Index MedicusNLM/Index Medicus abbreviations~3,200
MathematicsMathematics journals from MathSciNet~3,800
Geology & PhysicsGeology and physics journals~1,300
MechanicalMechanical and biomechanical engineering~4,800
AstronomyAstronomy and astrophysics journals~20
MeteorologyAtmospheric science journals~120
SociologySociology journals~100
AEA (Economics)American Economic Association journals~1,000

Total: approximately 50,000 abbreviation entries.

✅ Important: Use Version Control

Before making batch changes to your bibliography files, ensure your files are under version control (git). This allows you to:

  • Review changes with git diff

  • Undo changes with git checkout if something goes wrong

  • Track the history of modifications

Tip: Commit your .bib file before running batch abbreviation operations. If anything goes wrong, you can always revert.

✅ Toggling Journal Names

✅ Single Entry (Speed Key: A)

Command: scimax.bibtex.toggleJournalAbbreviation (speed key: A)

Toggles the journal field between full name and abbreviation:

Before:

@article{smith2024,
  author = {John Smith},
  title = {A Great Paper},
  journal = {Journal of the American Chemical Society},
  year = {2024}
}

After pressing A:

@article{smith2024,
  author = {John Smith},
  title = {A Great Paper},
  journal = {J. Am. Chem. Soc.},
  year = {2024}
}

Press A again to toggle back to the full name.

✅ All Entries

CommandDescription
scimax.bibtex.abbreviateAllJournalsAbbreviate all journals in the file
scimax.bibtex.expandAllJournalsExpand all journals to full names

These commands:

  1. Validate syntax before starting - warns if parse errors exist

  2. Process every entry in the file

  3. Validate results - checks that entry count is preserved

  4. Report how many journals were changed and not found

If validation fails, changes are not applied.

✅ Undo Behavior

All batch changes are applied as a single edit operation, so:

  • Press Ctrl+Z (Cmd+Z on Mac) once to undo all changes at once

  • You cannot undo individual journal changes within a batch operation

  • For more granular control, use the single-entry toggle (A speed key) instead

For single-entry toggles (speed key A), each toggle is a separate undo operation.

✅ Searching Abbreviations

Command: scimax.bibtex.searchJournalAbbreviations

Search the abbreviation database by full name or abbreviation:

  1. Enter search query (e.g., "chemistry", "J. Am.")

  2. Browse matching results

  3. Select an entry to copy the abbreviation to clipboard

✅ Custom Abbreviations

You can add your own journal abbreviations that override the built-in database.

✅ Adding Custom Abbreviations

Command: scimax.bibtex.addJournalAbbreviation

  1. Enter the full journal name

  2. Enter the abbreviation

  3. The mapping is saved to your VS Code user storage

Custom abbreviations take priority over the bundled database, so you can correct or override any entry.

✅ Managing Custom Abbreviations

Command: scimax.bibtex.manageJournalAbbreviations

View and remove your custom abbreviations.

✅ Updating the Database

Command: scimax.bibtex.updateJournalAbbreviations

Downloads the latest abbreviation lists from the JabRef repository:

  1. Select which sources to download (multi-select)

  2. Wait for downloads to complete

  3. Abbreviations are immediately available

Use this to get the latest additions and corrections.

✅ Statistics

Command: scimax.bibtex.journalAbbreviationStats

Shows the number of abbreviations loaded from each source.

✅ Speed Command

KeyCommandDescription
Ascimax.bibtex.toggleJournalAbbreviationToggle journal abbreviation

Command Reference

✅ Entry Commands (require cursor in entry)

CommandSpeed KeyDescription
scimax.bibtex.nextEntrynNavigate to next entry
scimax.bibtex.previousEntrypNavigate to previous entry
scimax.bibtex.jumpToEntryjJump to entry by key
scimax.bibtex.sortFieldssSort fields in entry
scimax.bibtex.downcaseEntrydLowercase entry type/fields
scimax.bibtex.titleCasetTitle case the title field
scimax.bibtex.sentenceCaseSSentence case the title field
scimax.bibtex.cleanEntrycClean and normalize entry
scimax.bibtex.generateKeyKGenerate key from pattern
scimax.bibtex.wrapBracesbWrap selection in braces
scimax.bibtex.stripBracesBStrip internal braces
scimax.bibtex.openPdfoOpen associated PDF
scimax.bibtex.openUrluOpen URL in browser
scimax.bibtex.openNotesNOpen/create notes file
scimax.bibtex.copyKeyyCopy citation key
scimax.bibtex.copyBibtexbCopy full BibTeX entry
scimax.bibtex.killEntrykDelete entry
scimax.bibtex.googleScholargSearch on Google Scholar
scimax.bibtex.crossrefxSearch on CrossRef
scimax.bibtex.webOfSciencewSearch on Web of Science
scimax.bibtex.showCitingWorksCShow citing works
scimax.bibtex.showRelatedWorksRShow related works
scimax.bibtex.showReferencesrShow references
scimax.bibtex.toggleJournalAbbreviationAToggle journal abbreviation
scimax.bibtex.help?Show speed command help

✅ File Commands (operate on entire file)

CommandDescription
scimax.bibtex.sortEntriesSort all entries (by key/year/author)
scimax.bibtex.applyToAllEntriesApply operation to all entries
scimax.bibtex.validateFileValidate file and show report
scimax.bibtex.showStatisticsShow file statistics
scimax.bibtex.abbreviateAllJournalsAbbreviate all journals in file
scimax.bibtex.expandAllJournalsExpand all journals to full names
scimax.bibtex.searchJournalAbbreviationsSearch journal abbreviation database
scimax.bibtex.updateJournalAbbreviationsUpdate abbreviations from online
scimax.bibtex.addJournalAbbreviationAdd custom journal abbreviation
scimax.bibtex.manageJournalAbbreviationsManage custom abbreviations
scimax.bibtex.journalAbbreviationStatsShow abbreviation statistics

✅ Navigation