✅ Overview
Scimax VS Code provides comprehensive bibliography and citation management inspired by Emacs org-ref. This system allows you to:
Manage BibTeX bibliography files
Insert and format citations in multiple styles
Follow citation links to PDFs, URLs, and notes
Search and browse your reference library
Export citations to various formats
Integrate with CrossRef and OpenAlex for metadata
The reference system seamlessly integrates with org-mode documents while also supporting Markdown and LaTeX formats.
✅ Setting Up Bibliography Files
Configuration
Configure your default bibliography files in VS Code settings (Preferences: Open Settings (UI) → search for "scimax ref"):
| Setting | Description |
|---|---|
| scimax.ref.bibliographyFiles | Array of .bib file paths (global) |
| scimax.ref.pdfDirectory | Directory containing PDF files |
| scimax.ref.notesDirectory | Directory for reference notes (.org files) |
| scimax.ref.defaultCiteStyle | Default citation style (cite, citet, citep) |
| scimax.ref.autoDownloadPdf | Auto-download PDFs from DOI (experimental) |
These files are used when you do not specify document-local bibliography files.
✅ Example Configuration
{
"scimax.ref.bibliographyFiles": [
"~/Documents/references.bib",
"~/research/bibliography.bib"
],
"scimax.ref.pdfDirectory": "~/Documents/papers/",
"scimax.ref.notesDirectory": "~/Documents/notes/",
"scimax.ref.defaultCiteStyle": "cite"
}
✅ Document-Local Bibliography Files
You can specify bibliography files per document using:
✅ Bibliography Links
bibliography:~/Documents/refs.bib
bibliography:./local-refs.bib,~/global-refs.bib
Multiple files are comma-separated. Paths can be:
Absolute: /path/to/file.bib
Home-relative: ~/Documents/refs.bib
Document-relative: ./refs.bib or ../shared/refs.bib
✅ Bibliography Keywords
Alternative org-mode syntax:
#+BIBLIOGRAPHY: ~/Documents/references.bib
✅ Workspace Bibliography Files
The extension automatically discovers all .bib files in your workspace and makes them available for citation completion.
✅ Creating a Bibliography File
Create a new .bib file manually or use the command:
[[cmd:scimax.ref.openBibliography]] - Opens bibliography file or creates new one
Basic BibTeX entry structure:
@article{smith2024machine,
author = {Smith, John and Doe, Jane},
title = {Machine Learning for Scientific Computing},
journal = {Journal of Computational Science},
year = {2024},
volume = {15},
number = {3},
pages = {123--145},
doi = {10.1000/jcs.2024.0001}
}
✅ Citation Link Types
Scimax VS Code supports multiple citation styles for different contexts:
✅ Citation Styles
| Style | Syntax | Rendered As (typical) | Use Case |
|---|---|---|---|
| cite | (key) | [1] or (Smith, 2024) | Basic citation |
| citet | key | Smith (2024) | Textual citation |
| citep | (key) | (Smith, 2024) | Parenthetical citation |
| citeauthor | Smith | Author name only | |
| citeyear | (key) | 2024 | Year only |
✅ Multiple Citations
Cite multiple sources by separating keys with commas or semicolons:
(kitchin-2015-examp-effec, kitchin-2025-beyon-fourt) # Version 2
cite:&kitchin-2015-examp-effec;&kitchin-2025-beyon-fourt # Version 3
Citation Formats by File Type
Citations adapt to your document format:
Org-Mode Format
in scimax the preferred org-mode citation syntax is org-ref v3L
cite:&kitchin-2015-examp-effec citet:&kitchin-2015-examp-effec;&kitchin-2025-beyon-fourt citep:&kitchin-2015-examp-effec;&kitchin-2025-beyon-fourt
Markdown/Pandoc Format
The insert citation command generates Pandoc-style citations in Markdown files:
[@kitchin-2015-examp-effec]
[@kitchin-2015-examp-effec, p. 42]
[see @kitchin-2015-examp-effec; also @kitchin-2025-beyon-fourt]
LaTeX Format
For LaTeX documents, citations use standard LaTeX commands:
\cite{kitchin-2015-examp-effec}
\citet{kitchin-2025-beyon-fourt}
\citep{kitchin-2015-examp-effec,kitchin-2025-beyon-fourt}
Org-Mode 9.5+ Citation Syntax
Modern org-mode citation syntax is also supported:
[cite:@kitchin-2015-examp-effec]
[cite/t:@kitchin-2025-beyon-fourt]
[cite/p:@kitchin-2015-examp-effec;@kitchin-2025-beyon-fourt]
✅ Inserting Citations
✅ Insert Citation Command
| Key | Command |
|---|---|
| C-c ] | Insert citation (scimax.ref.insertCitation) |
✅ Interactive Citation Insertion
Press C-c ] or run command [[cmd:scimax.ref.insertCitation]]
Search and select a reference (searches key, author, title, year)
Choose citation style (cite, citet, citep, citeauthor, citeyear)
Citation is inserted at cursor
✅ Citation Completion
Auto-completion triggers after typing:
cite: (org-mode)
@ (Markdown/Pandoc)
\cite{ (LaTeX)
Completion shows:
Citation key
Author and year
Full formatted citation on hover
✅ Quick Citation Commands
| Command | Description | |
|---|---|---|
| scimax.ref.insertCitation | C-c - ] | Insert/append citation |
| scimax.ref.insertRef | C-u C-c ] | Insert cross-reference (ref:, eqref:) |
| scimax.ref.insertBibliography | Insert bibliography link |
✅ Insert from Zotero
Scimax can insert citations directly from your Zotero library using the Better BibTeX plugin. This provides seamless integration between your Zotero reference manager and org-mode documents.
✅ Requirements
To use Zotero integration, you need:
Zotero desktop application - Must be running when inserting citations
Better BibTeX plugin - Install from https://retorque.rezotero-better-bibtex
Better BibTeX provides the local API that Scimax uses to communicate with Zotero.
✅ Usage
| Keybinding | Command | Description |
|---|---|---|
| C-c z | scimax.zotero.insertCitation | Insert citation from Zotero |
✅ Workflow
Press
C-c zin an org, markdown, or LaTeX fileZotero's native citation picker opens (you may need to switch to the Zotero window)
Search and select one or more references
Click "OK" or press Enter to confirm your selection
The citation is inserted at the cursor position
The BibTeX entry is automatically added to your bibliography file
✅ Bibliography File Handling
When inserting from Zotero, the extension intelligently manages your bibliography file:
| Scenario | Behavior |
|---|---|
Document has bibliography: link | Uses that file |
No link, but references.bib exists in dir | Asks if you want to use it |
No link, no references.bib | Creates references.bib and adds bibliography link |
The extension automatically:
Avoids adding duplicate entries (checks by citation key)
Preserves the original BibTeX formatting from Zotero/Better BibTeX
Adds a
bibliography:link at the end of the document if needed
✅ Example
Before (no bibliography):
,* My Research Paper
Some text discussing machine learning.
After pressing C-c z and selecting a reference:
,* My Research Paper
Some text discussing machine learning cite:&smith2024machine.
bibliography:./references.bib
✅ Troubleshooting
| Problem | Solution |
|---|---|
| "Zotero is not running" | Start Zotero desktop application |
| Picker doesn't appear | Switch to Zotero window; it may be behind VS Code |
| "Failed to fetch BibTeX" | Ensure Better BibTeX is installed and enabled |
| Wrong citation format | Check scimax.ref.citationSyntax setting (v2 vs v3) |
| VS Code loses focus after insert | This is an OS limitation; manually switch back to VS Code |
✅ Following Citation Links
✅ Citation Link Actions
Click on a citation or press C-c C-o on a citation to open an action menu:
✅ For Known Citations
| Action | Description |
|---|---|
| Open BibTeX Entry | Jump to entry in .bib file |
| Open DOI | Open DOI URL in browser |
| Open URL | Open entry's URL field in browser |
| Open PDF | Open PDF file if available |
| Open/Create Notes | Open reference notes file |
| Citing Works (OpenAlex) | Show papers that cite this work |
| Related Works (OpenAlex) | Show related papers |
| View in OpenAlex | Open in OpenAlex web interface |
| Copy Citation Key | Copy key to clipboard |
| Copy BibTeX | Copy full BibTeX entry to clipboard |
✅ For Unknown Citations
If citation key is not found in bibliography:
| Action | Description |
|---|---|
| Search Google Scholar | Search for the key on Google Scholar |
| Search CrossRef | Search CrossRef database |
| Add from DOI | Fetch BibTeX from DOI |
| Copy Key | Copy citation key to clipboard |
I am not totally sure these make sense to have and I may remove them later.
✅ Citation Hover Information
Hover over a citation to see:
Full title and authors
Publication venue and year
Abstract (if available)
DOI and URL links
Citation count (via OpenAlex)
Open Access status
Quick action links
✅ Opening PDFs
The system looks for PDF files in scimax.ref.pdfDirectory using these patterns:
key.pdf (exact key match)
AuthorYear.pdf (first author and year)
DOI.pdf (DOI with slashes replaced by underscores)
If no local PDF is found but the entry has a DOI:
Prompts to open DOI in browser
OpenAlex integration may provide Open Access PDF link
Reference Notes
Each reference can have an associated notes file:
#+TITLE: Notes on Machine Learning for Scientific Computing
#+AUTHOR: Smith and Doe
#+DATE: 2024
#+CITE_KEY: smith2024machine
,* Summary
,* Key Points
-
,* Quotes
#+BEGIN_QUOTE
#+END_QUOTE
,* Notes
,* References
Notes are stored in scimax.ref.notesDirectory as key.org files and created automatically with a template when first opened.
Citation Manipulation
When cursor is on a citation with multiple keys:
Transpose Citations
| Key | Command | Action |
|---|---|---|
| S- | scimax.ref.transposeCitationLeft | Swap with previous key |
| S- | scimax.ref.transposeCitationRight | Swap with next key |
Example:
cite:jones2023,smith2024,doe2022
^cursor here
Press S-<right>:
cite:jones2023,doe2022,smith2024
^cursor follows
Sort Citations
| Key | Command | Action |
|---|---|---|
| S- | scimax.ref.sortCitations | Sort by year (oldest first) |
| S- | scimax.ref.sortCitationsByYear | Sort by year (newest first) |
| scimax.ref.sortCitationsAlphabetically | Sort alphabetically by key |
Citations are sorted by extracting year from:
Bibliography entry year field
Year pattern in citation key (e.g., smith-2024-machine)
Delete Citation Key
| Command | Action |
|---|---|
| scimax.ref.deleteCitation | Delete current key or entire citation |
If multiple keys: Removes current key only
If single key: Deletes entire citation
Bibliography Display
References Tree View
The References view shows your bibliography organized by entry type:
REFERENCES ├─ article (45) │ ├─ smith2024machine: Smith (2024) │ ├─ jones2023deep: Jones (2023) │ └─ ... ├─ book (12) │ ├─ doe2022python: Doe (2022) │ └─ ... └─ inproceedings (23) └─ ...
Click an entry to open the action menu.
Search References
| Command | Description |
|---|---|
| scimax.ref.searchReferences | Search bibliography by author/title/year |
Searches across:
Citation keys
Author names
Titles
Years
Journals
Keywords
Results are ranked by relevance (key matches first, then author, then title).
Find Citations
| Command | Description |
|---|---|
| scimax.ref.findCitations | Find all citations of a reference |
Searches workspace for citations of a selected key in all org, markdown, and LaTeX files. Results shown in peek view for quick navigation.
Fetching References from DOI
Add Reference from DOI
| Command | Description |
|---|---|
| scimax.ref.fetchFromDOI | Fetch BibTeX entry from DOI via CrossRef |
Usage
Run scimax.ref.fetchFromDOI
Enter DOI (accepts 10.xxxxxx or https:doi.org10.xxx/xxx)
Preview the fetched entry
Choose action:
DOI Resolution
The system fetches metadata from CrossRef API and converts it to BibTeX format. If the key already exists, you can:
Replace the existing entry
Generate a new unique key
Cancel
Search CrossRef by Query
| Command | Description |
|---|---|
| scimax.ref.searchCrossRef | Search CrossRef and add entry by query |
When you don't have a DOI, you can search CrossRef directly by title, author, or keywords:
Run
scimax.ref.searchCrossRefEnter search query (or select text first to pre-fill)
Browse results showing title, authors, year, publisher, and DOI
Select an entry to add
Confirm to add to bibliography
This is useful when:
You have a paper title but not its DOI
You want to find papers by a specific author
You remember keywords but not the exact citation
If you have text selected when running the command, it will be used as the initial search query.
OpenAlex Integration
OpenAlex provides enhanced metadata for academic works:
Show Citing Works
| Command | Description |
|---|---|
| scimax.ref.showCitingWorks | Show papers citing this work |
Displays papers that cite the selected reference with:
Title, authors, year
Citation count
Open Access status and PDF link
Publication venue
Search OpenAlex
| Command | Description |
|---|---|
| scimax.ref.searchOpenAlex | Search OpenAlex database |
Search the global OpenAlex database for works by title, author, or keywords. Results include:
Citation counts
Open Access status
Topic classification
Abstracts
DOI Hover Information
Hover over DOI links (doi:10.xxx, https:/doi.org10.xxx) to see:
Title, authors, publication info
Citation count (via OpenAlex)
Open Access status and PDF link
Abstract
Quick actions: Add to bibliography, open DOI, view citing works
Cross-References
Beyond citations, Scimax supports cross-references to figures, tables, equations, and sections.
Reference Link Types
| Type | Example | References |
|---|---|---|
| ref | ref:fig-results | Figures, tables, sections |
| eqref | eqref:eq-1 | Equations (with parentheses) |
| pageref | pageref:intro | Page number reference |
| nameref | nameref:methods | Name/title of section |
| autoref | autoref:tbl-1 | Auto-formatted (Figure 1, Table 2, etc.) |
Insert Cross-Reference
| Key | Command |
|---|---|
| C-S-] | Insert ref (scimax.ref.insertRef) |
Run scimax.ref.insertRef
Select label from workspace
Choose reference type (ref, eqref, pageref, etc.)
Reference inserted at cursor
Label Definitions
Define labels for cross-referencing. The ref: link type searches for these label definitions:
| Definition Type | Syntax | Example |
|---|---|---|
| #+NAME: | #+NAME: label | Tables, figures, blocks |
| #+LABEL: | #+LABEL: label | Figures, tables |
| label: | label:label | Inline labels |
| \label{} | \label{label} | LaTeX labels |
| :CUSTOMID: | :CUSTOM_ID: label | Heading IDs |
Org-Mode Labels
,#+NAME: fig-results
,#+CAPTION: Experimental results
[[file:./images/results.png]]
,#+NAME: tbl-data
,#+CAPTION: Data summary
| Column 1 | Column 2 |
|----------+----------|
| Data | Values |
label:eq-main \[ E = mc^2 \]
,* Methods
:PROPERTIES:
:CUSTOM_ID: methods
:END:
References:
See ref:fig-results for the results.
See ref:tbl-data for the data summary.
As shown in eqref:eq-main, energy equals...
The ref:methods section describes our approach.
LaTeX Labels
\begin{equation}
\label{eq:main}
E = mc^2
\end{equation}
See equation \eqref{eq:main} for details.
Reference Hover
Hover over cross-references to see:
Label type (figure, table, equation, heading)
Caption or heading text
Surrounding context
Link to jump to definition
Export of Citations
HTML Export
HTML export uses citation-js for full CSL-based citation formatting. Citations are processed according to standard citation styles like APA, MLA, Chicago, etc.
Citation Link Types
| Org Citation | Rendered Output |
|---|---|
cite:smith2024 | (Smith, 2024) |
citep:smith2024 | (Smith, 2024) |
citet:smith2024 | Smith (2024) |
citeauthor:smith2024 | Smith |
citeyear:smith2024 | 2024 |
Specifying Citation Style
Use #+CSL_STYLE: to set the citation format:
#+CSL_STYLE: apa
Available styles: apa (default), mla, chicago, harvard, ieee, vancouver
Bibliography Generation
The HTML export automatically generates a formatted bibliography section at the end of the document. Ensure your document includes a bibliography reference:
#+BIBLIOGRAPHY: references.bib
See Export System: HTML Citation Export for complete documentation.
LaTeX Export
Citations convert to LaTeX commands:
| Org Citation | LaTeX Output |
|---|---|
| (key) | \cite{key} |
| key | \citet{key} |
| (key) | \citep{key} |
| \citeauthor{key} | |
| (key) | \citeyear{key} |
Bibliography links export to \bibliography{file} commands.
Markdown Export
Citations export to Pandoc citation syntax:
| Org Citation | Pandoc Markdown Output |
|---|---|
| (key) | [@key] |
| key | @key |
| (key) | [@key] |
Extract Bibliography for Document
| Command | Description |
|---|---|
| scimax.ref.extractBibliography | Extract cited references to new .bib file |
Useful for creating document-specific bibliography files:
Scans current document for all citations
Looks up entries in your bibliography
Saves to new .bib file or copies to clipboard
Generates a portable .bib file containing only the references cited in your document.
Managing Your Bibliography
Opening Bibliography Files
| Command | Description |
|---|---|
| scimax.ref.openBibliography | Open configured bibliography file |
If multiple files configured, shows a picker.
Copy BibTeX Entry
| Command | Description |
|---|---|
| scimax.ref.copyBibTeX | Copy BibTeX entry for selected reference |
Select a reference and copy its BibTeX source to clipboard.
Refresh Bibliography
| Command | Description |
|---|---|
| scimax.ref.refresh | Reload all bibliography files |
Reloads all configured and workspace .bib files. Useful after external changes.
Bibliography File Diagnostics
The extension validates bibliography links in org files:
Highlights missing bibliography files
Shows error diagnostics for invalid paths
Suggests creating missing files
Code Lenses in .bib Files
When viewing a .bib file, code lenses appear for each entry:
Find citations - Search workspace for citations of this key
Copy key - Copy citation key to clipboard
Command Reference
Citation Commands
| Command | Default Key | Description |
|---|---|---|
| scimax.ref.insertCitation | C-c ] | Insert/append citation |
| scimax.zotero.insertCitation | C-c z | Insert citation from Zotero |
| scimax.ref.insertRef | C-S-] | Insert cross-reference |
| scimax.ref.insertBibliography | Insert bibliography link | |
| scimax.ref.transposeCitationLeft | S- | Swap citation left |
| scimax.ref.transposeCitationRight | S- | Swap citation right |
| scimax.ref.sortCitations | S- | Sort by year ascending |
| scimax.ref.sortCitationsByYear | S- | Sort by year descending |
| scimax.ref.sortCitationsAlphabetically | Sort alphabetically | |
| scimax.ref.deleteCitation | Delete citation key |
Bibliography Commands
| Command | Description |
|---|---|
| scimax.ref.openBibliography | Open bibliography file |
| scimax.ref.searchReferences | Search bibliography |
| scimax.ref.findCitations | Find citations of reference |
| scimax.ref.copyBibTeX | Copy BibTeX entry |
| scimax.ref.refresh | Reload bibliography files |
| scimax.ref.extractBibliography | Extract cited references |
DOI and External Commands
| Command | Description |
|---|---|
| scimax.ref.fetchFromDOI | Add reference from DOI |
| scimax.ref.searchCrossRef | Search CrossRef and add entry |
| scimax.ref.showCitingWorks | Show citing works (OpenAlex) |
| scimax.ref.showRelatedWorks | Show related works (OpenAlex) |
| scimax.ref.searchOpenAlex | Search OpenAlex database |
Best Practices
Organizing Your Bibliography
Use Consistent Citation Keys
Good key format: author-year-keyword
Examples:
smith-2024-machine-learning
jones-2023-deep-neural
doe-2022-python-scientific
Benefits:
Easy to remember and type
Sorting by name is meaningful
Year visible in key
Keyword aids recall
Maintain Multiple .bib Files
Organize by topic or project:
~/Documents/
├── machine-learning.bib # ML papers
├── statistics.bib # Statistics references
└── projects/
└── thesis/
└── thesis-refs.bib # Thesis-specific
Configure global files + use document-local links for project-specific references.
Store PDFs Systematically
Use consistent naming in PDF directory:
smith-2024-machine-learning.pdf
Match citation keys when possible
Or use FirstAuthorYear.pdf format
Citation Workflow
Literature Review Workflow
Search OpenAlex: scimax.ref.searchOpenAlex
Find relevant paper
Add to bibliography via DOI
Check citing works: scimax.ref.showCitingWorks
Explore related works: scimax.ref.showRelatedWorks
Create notes file for each key reference
Download PDFs to configured directory
Writing Workflow
Write draft with placeholder citations
Insert citations: C-c ]
Search references interactively
Hover citations to verify
Before final export: scimax.ref.extractBibliography
Creates portable .bib file with your document
Managing Notes
Create comprehensive notes for key papers:
,#+TITLE: Notes on Smith (2024) - Machine Learning
,#+CITE_KEY: smith2024machine
,* Summary
Three-sentence summary of the paper
,* Key Points
- Main contribution 1
- Main contribution 2
- Methodology highlights
,* Quotes
,#+BEGIN_QUOTE
"Important quote from the paper" (p. 42)
,#+END_QUOTE
,* Personal Notes
Connections to my research...
,* Follow-up References
- cite:jones2023deep - Related deep learning work
- cite:nguyen2024neural - Extends their methodology
Link notes from your main document:
Recent work on machine learning cite:smith2024machine (see also [[file:~/notes/smith2024machine.org][my notes]])
Export Considerations
For LaTeX/PDF Export
Ensure bibliography link includes all cited .bib files:
bibliography:~/Documents/refs.bib,./local-refs.bib
Use standard citation styles LaTeX understands (cite, citet, citep).
For HTML Export
Citations export as links. For proper bibliography rendering:
Ensure #+BIBLIOGRAPHY: keyword is present
Or include bibliography: link
HTML export generates bibliography section automatically
For Standalone Documents
Before sharing:
Run scimax.ref.extractBibliography
Save extracted .bib alongside document
Update bibliography link to local file:
BibTeX Entry Quality
Ensure complete entries for best results:
@article{key,
author = {Required},
title = {Required},
journal = {Recommended for articles},
year = {Required},
volume = {Recommended},
number = {Recommended},
pages = {Recommended},
doi = {Highly recommended - enables OpenAlex integration},
url = {Useful if no DOI},
abstract = {Helpful for hover info},
keywords = {Aids search}
}
Troubleshooting
Citation Not Found
If citation shows "not found in bibliography":
Check spelling of citation key
Verify .bib file is configured or linked in document
Run `scimax.ref.refresh' to reload bibliography
Check .bib file for entry with that exact key
PDF Not Found
If "PDF not found" when trying to open:
Check `scimax.ref.pdfDirectory' is set correctly
Verify PDF filename matches key or Author_Year.pdf pattern
Check file exists with `ls' or file explorer
Try opening from DOI if available
DOI Fetch Fails
If fetching from DOI fails:
Verify DOI is correct (should start with 10.)
Check internet connection
Try searching on https://crossref.org directly
Some DOIs may not be in CrossRef database
Try OpenAlex search as alternative
Bibliography Link Not Recognized
If bibliography link isn't recognized:
Check path is correct (try absolute path first)
Ensure .bib extension is included
Verify file exists at that location
Check for typos in filename
Use ~ for home directory, not $HOME
Export Issues
If citations don't export correctly:
Check export format supports citations
Verify bibliography link is present in document
Ensure citation keys are in bibliography
For LaTeX: check LaTeX citation package is available
For Pandoc: use Pandoc-compatible citation syntax
Quick Reference Card
Essential Keybindings
| Key | Action |
|---|---|
| C-c ] | Insert citation |
| C-c z | Insert citation from Zotero |
| C-S-] | Insert cross-reference |
| C-c C-o | Open link/citation at point |
| S- | Transpose citation left |
| S- | Transpose citation right |
| S- | Sort citations (oldest first) |
| S- | Sort citations (newest first) |
Citation Syntax Quick Reference
| Format | Org-Mode | Markdown | LaTeX |
|---|---|---|---|
| Basic | (key) | [@key] | \cite{key} |
| Textual | key | @key | \citet{key} |
| Parenthetical | (key) | [@key] | \citep{key} |
| Author only | N/A | \citeauthor{key} | |
| Year only | (key) | N/A | \citeyear{key} |
| Multiple | (k1, k2, k3) | [@k1; @k2] | \cite{k1,k2,k3} |
Common Workflows
Add New Reference
scimax.ref.fetchFromDOI or scimax.ref.searchOpenAlex
Review metadata
Add to bibliography
Insert Citation
C-c ]
Search for reference
Select citation style
Citation inserted
Prepare for Export
scimax.ref.extractBibliography
Save to document directory
Update bibliography link
Export document