Usage Guide
This guide provides step-by-step instructions for common BibLib workflows.
Creating a Literature Note
This is the primary way to add a new reference manually.
- Open the Command Palette: Press
Ctrl/Cmd + P
. - Run the Command: Type "BibLib" and select "BibLib: Create Literature Note".
- The Bibliography Modal Appears:
- (Optional) Auto-fill:
- Identifier Lookup: Enter a DOI, ISBN, PubMed ID, arXiv ID, or URL into the "Auto-lookup" field and click Lookup. BibLib will attempt to fetch metadata and fill the form.
- Paste BibTeX: Paste a full BibTeX entry into the text area under "Auto-fill from BibTeX" and click Parse BibTeX.
- Select Type: Choose the correct reference type (e.g., Journal Article, Book, Web Page) from the "Type" dropdown. This influences which fields are most relevant.
- Fill Core Fields: Enter the
Title
,Year
,Container title
(Journal/Book name), etc. - Add Contributors:
- Click the "Role" dropdown (defaults to 'author') to select the type (author, editor, translator, etc.).
- Enter the
Given Name
andFamily Name
. For institutions or single-field names, use theFamily Name
field and leaveGiven Name
blank (or use theliteral
field if adding via code/import). - Click "Add contributor" to add more authors, editors, etc.
- Click "Remove" next to a contributor to delete them.
- Add Additional Fields:
- If you need fields not shown by default (e.g.,
language
,archive
,call-number
, or custom fields), click "Add field". - Select the field
Type
(Standard, Number, Date). - Choose the
Field name
from the dropdown (includes standard CSL fields) or type a custom name. A warning appears for non-standard CSL names. - Enter the
Value
.
- If you need fields not shown by default (e.g.,
- Add Attachments (Optional):
- Under the "Attachments" section:
- Click "Add Attachment" to add one or more files
- Choose from the dropdown:
Import file
: Select a file from your computer (PDF, EPUB, or any other file type). BibLib will copy it into your vault.Link to existing file
: Select a file already inside your Obsidian vault.
- You can add multiple attachments of different types to a single note
- Each attachment will be displayed in a list below with a remove button if needed
- All attachments will be available in templates as
{{attachments}}
- Under the "Attachments" section:
- Link Related Notes (Optional):
- Click "Add Related Note".
- Search for and select existing notes in your vault that relate to this reference.
- Selected notes will be listed; click "Remove" to unselect. These links can be used in templates (e.g.,
{{links}}
).
- Review Citekey: Check the auto-generated
Citekey
at the bottom. You can edit it manually or click the Regenerate icon (🔄) to update it based on current form data (requires Title and Author).
- (Optional) Auto-fill:
- Create the Note: Click the "Create Note" button.
BibLib will create a new .md
file (e.g., @Smith2023.md
) in the location specified in your settings, populate its YAML frontmatter with the CSL-JSON data, add content based on your header/body templates, and potentially open the note if configured.
Using Metadata Lookup
Quickly populate the "Create Literature Note" modal:
- Open the modal (BibLib: Create Literature Note).
- In the "Auto-fill" section at the top:
- By Identifier: Paste a DOI (e.g.,
10.1038/nrn3241
), ISBN, arXiv ID (arXiv:1910.13461
), or a URL into the "Auto-lookup by identifier" field. Click Lookup. - By BibTeX: Copy a complete BibTeX entry (e.g., from Google Scholar or a reference manager) and paste it into the larger text area. Click Parse BibTeX.
- By Identifier: Paste a DOI (e.g.,
- BibLib will fetch/parse the data and fill the relevant fields in the modal below (Title, Authors, Year, Type, etc.).
- Review the populated fields, make any necessary corrections or additions (like adding an attachment).
- Check the generated
Citekey
. - Click "Create Note".
Creating a Book Chapter Note
To add a chapter that belongs to a book already present as a literature note:
- Ensure the Book Note Exists: You must first have a literature note for the parent book (Type:
book
orcollection
). - Open the Command Palette: Press
Ctrl/Cmd + P
. - Run the Command: Select "BibLib: Create book chapter entry".
- Alternatively: If you have the book's note open and active, run "BibLib: Create chapter from current book". This pre-selects the book.
- The Chapter Modal Appears:
- Select Book: Use the "Book" dropdown to choose the parent book note from your vault. The book's path will be displayed below. If you used the "Create chapter from current book" command, this will be pre-filled.
- Fill Chapter Details: Enter the specific
Chapter title
,Short title
(optional), andPages
for the chapter. - Chapter Citekey: A default citekey (e.g.,
BookCitekey.ch1
) might be suggested. Adjust as needed. - Chapter Contributors: Add the chapter's authors using the "Add contributor" button. The book's editors or authors will be automatically included with the correct CSL roles (
editor
,container-author
) in the final note's frontmatter – you usually don't need to re-add them here unless they are also chapter authors. - Other Fields: Fill in chapter-specific DOI, abstract, or override the publication year/month/day if it differs from the book. Fields like Publisher will typically be inherited from the selected book.
- Attachment/Related Notes: Add attachments or link related notes specific to this chapter.
- Create the Chapter Note: Click "Create Chapter Note".
BibLib creates a new note (Type: chapter
) with the chapter's details and links it conceptually to the parent book via fields like container-title
and potentially container-author
in the frontmatter.
Using Multiple Attachments
BibLib supports adding multiple attachments to a single literature note. Here's how to use this feature:
- When creating a literature note, in the "Attachments" section:
- Use the dropdown to select either "Import file" or "Link to existing file"
- Click "Add Attachment" to add the selected attachment type
- Repeat to add multiple attachments of different types
-
Each attachment appears in a list with a "Remove" button if needed
-
In your templates, you can access multiple attachments using these variables:
{{attachments}}
: Array of formatted attachment links with file type indicators (e.g.,[[path/to/file.pdf|PDF]]
){{pdflink}}
: Array of raw attachment paths{{quoted_attachments}}
: Array of formatted attachments with quotes around them-
For backward compatibility,
{{attachment}}
and{{raw_pdflink}}
provide access to the first attachment -
To use multiple attachments in templates: ``` {{#attachments}}
-
{{.}} {{/attachments}} ```
-
During bulk import, attachments are also managed as a list, and multiple attachments can be imported or linked per reference.
Using the Zotero Connector (Desktop)
Import references directly from your browser:
- Setup:
- Go to BibLib Settings (
Settings
->Community Plugins
->BibLib
). - Under "Zotero Connector", ensure "Enable Zotero Connector" is toggled ON. Note the
Connector port
(default 23119). - Crucially: Close the Zotero Desktop application. BibLib needs to use the same port Zotero normally uses to listen for the connector. They cannot run simultaneously for this feature.
- Go to BibLib Settings (
- Importing:
- Browse the web. When you find a journal article, book page, etc., that you want to save, click the Zotero Connector icon in your browser's toolbar (it might look like a 'Z' or a document).
- The Zotero Connector will send the citation data (and attempt to find/send a PDF if available) to the BibLib server running inside Obsidian.
- Obsidian should come to the foreground, and the Bibliography Modal will automatically open, pre-filled with the data received from the connector. The "Auto-fill" section will be collapsed with a notice.
- If a PDF was successfully downloaded, the "Attachment" section will show it as an "Import file" ready to be saved to your vault.
- Review and Save:
- Check the pre-filled information. Make any necessary adjustments.
- Verify the
Citekey
. - Click "Create Note".
The literature note is created, and the PDF (if any) is imported into your attachment folder.
To Stop: Either disable the toggle in settings or run the command "BibLib: Toggle Zotero Connector server". Remember to re-open Zotero Desktop if you need it.
Bulk Importing References
Import multiple references from a BibTeX (.bib
) or CSL-JSON (.json
) file:
- Prepare Import File:
- Export references from your reference manager (Zotero, Mendeley, etc.) into either BibTeX (
.bib
) or CSL-JSON (.json
) format. - For Zotero with Attachments: When exporting from Zotero as BibTeX, make sure to check the "Export Files" option. This creates the
.bib
file and afiles
subfolder containing the PDFs. Crucially, move both the.bib
file AND the entirefiles
folder into your Obsidian vault before starting the import. BibLib needs them co-located to find the attachments referenced in the BibTeX.
- Export references from your reference manager (Zotero, Mendeley, etc.) into either BibTeX (
- Run the Command: Open the Command Palette (
Ctrl/Cmd + P
) and select "BibLib: Bulk import references". - Configure Import:
- Choose File: Click "Choose File" and select the
.bib
or.json
file from within your vault. The selected filename will appear. - Attachment handling:
Ignore attachments
: BibLib won't look for or import any files referenced in the import data.Import attachments to vault
: BibLib will try to find files referenced in thefile
field of the import data. For BibTeX/Zotero exports, it looks for the standardfiles/ID/filename.pdf
structure relative to the.bib
file's location. It will copy found attachments into your configured BibLib attachment folder.
- Include annotations: If checked, content from the BibTeX
annote
field will be added to the body of the created literature notes (useful for Zotero notes). - Citekey preference:
Use imported citekeys
: Uses the keys present in the.bib
or.json
file as theid
and filename base.Generate new citekeys
: Ignores imported keys and generates new ones based on your BibLib citekey settings.
- Conflict resolution:
Skip existing notes
: If a note with the same target citekey already exists, the imported entry is skipped.Overwrite existing notes
: If a note with the same target citekey exists, its content will be replaced with the data from the imported entry. Use with caution!
- Choose File: Click "Choose File" and select the
- Start Import: Click "Start Import". A confirmation prompt will appear.
- Confirm: Click "OK" to proceed.
BibLib will process the file, creating literature notes based on your settings. Progress notices will appear. A final notice summarizes the number of notes created, skipped, and any errors encountered.
Linking to References
Once literature notes exist, link to them like any other note:
- Standard Wikilink: Type
[[
and start typing the citekey (including any prefix like@
). Select the note from the suggestions. Example:[[@Smith2023]]
. - Pandoc Citation Syntax: For academic writing intended for processing with Pandoc, use the standard Pandoc citation syntax:
[@Smith2023]
. This won't create an Obsidian link but will be correctly interpreted by Pandoc when using thebibliography.json
or.bib
file generated by BibLib. You can combine this with wikilinks if desired:See [[@Smith2023|[@Smith2023]]] for details.
Generating Bibliography Files
Create compiled bibliography files for use with external tools or for backup:
- Open the Command Palette:
Ctrl/Cmd + P
. - Run Commands:
BibLib: Build bibliography
: This command scans all literature notes and generates/updates:bibliography.json
: A CSL-JSON file containing the metadata for all notes. Path configured in settings. Essential for Pandoc.citekeylist.md
: A simple Markdown list of all@citekey
s. Path configured in settings.
BibLib: Export bibliography as BibTeX
: This command generates/updates:bibliography.bib
: A BibTeX file containing data for all notes. Path configured in settings.
Run these commands periodically or before writing/exporting documents that need a bibliography.
Editing References
Modify bibliographic data directly in the note's frontmatter:
- Open the literature note (
.md
file). - Switch to Source Mode.
-
Edit the values within the YAML block (
--- ... ---
). For example, change theyear
, add aURL
, or correct an author's name in theauthor
array.yaml author: - family: Smith given: Alice # Corrected spelling - family: Jones given: Bob year: 2024 # Updated year URL: https://new-link.example.com # Added URL
-
Switch back to Reading or Live Preview mode.
Remember
Obsidian's Properties view might show warnings for nested CSL fields. Rely on Source Mode for accurate editing of complex fields like author
or issued
.