Add entry using PDFs
JabRef can create entries from PDF files.
Adding using drag and drop
If you drop a PDF onto an entry in the main table or the entry preview in the entry editor, the PDF is simply attached to the entry. To add a new entry based on the PDF meta data, drop it between two entries in the main table or onto the empty area in the maintable (available for small libraries). The meta data of the PDF is then parsed and a new entry is added to the library. The PDF file is moved and renamed to the library as default. If you want to copy or just link it, hold the respective modifier keys. On Windows, Ctrl is for copying and Alt is for linking.
Better filenames
JabRef changes the filenames automatically. You can adapt the pattern at Preferences -> Import
Select "Choose pattern" and choose "bibtexkey - title" . This results in the setting
\bibtexkey\begin{title} - \format[RemoveBrackets]{\title}\end{title}
.
This makes the filenames start with the citation key followed by the full title. In the concrete case, \bibtexkey
only may be the better option as the described bibtey key already contains the title.
More details are given at Managing Linked Files.
Adding files currently not linked in the library
In case you have numerous PDF files and want to convert them into new entries, JabRef can search automatically for the PDF files, let you select the relevant ones, and convert them into new entries.
This feature is available through Lookup -> Search for unlinked local files.
Preparation: Adjust the JabRef key generation pattern to fit your needs
JabRef offers a BibTeX key generation and offers different patterns described at BibtexKeyPatterns.
Using the Wizard "Search for unlinked local files"
This information is partially outdated. Please help to improve it (how to edit a help page).
Create or open a library (AKA a
.bib
file).Go to Lookup -> Search for unlinked local files. (or press
SHIFT + F7
)FindUnlinkedFiles - Menu FindUnlinkedFiles - Menu The "Search for unlinked local files" dialog opens.
Choose a start directory using the "Browse" button.
Click on "Search" / "Scan directory".
In "Select files", the files not yet contained in the library are shown.
Select the entries you are interested in. Note: the button
Export selected files
allows you to export the list of the selected files (a text file containing on each line one filename with its path)Click on
Import
.The windows close and the entry table now contains the newly-imported entries.
The entry editor with the last imported entry is shown
You can now save the file and are finished.
Optional: Click on "General" to see the linked file
Optional: Click on "BibTeX source" to see the BibTeX source
Optional: You have to shrink it to see the entry in the entry table, enlarge the JabRef window and use the mouse at the upper border of the entry editor
Optional: Press Esc to show the entry preview
The imported entries may need some editing because all the information gathered from the PDF files may not be accurate (see below "PDFs for which it works").
How .gitignore affects “Find unlinked local files”
JabRef’s “Find unlinked local files” feature respects .gitignore
files. A .gitignore
file is a small text file where you list file names or patterns you don’t want to see; tools that support it (like Git and JabRef) skip those files during searches.
What JabRef does
Looks for an applicable
.gitignore
in the directory being scanned and applies its patterns.Interprets patterns relative to the directory that contains the
.gitignore
.Applies all patterns (not “first match wins”).
Also ignores the
.git
directory and common OS metadata by default, and ignores the.gitignore
file itself.
Notes about pattern behavior
Patterns are matched against the path relative to the
.gitignore
’s directory.Patterns like
ignore/*
andignore/**
work as in Git to ignore a named subdirectory and its contents.Patterns starting with
**/
(for example,**/*.png
) also match files in the top directory for convenience, so PNGs are ignored both in subdirectories and at the base level.
Examples
Ignore all PNG images everywhere:
*.png
Ignore a specific subdirectory named ignore (and everything inside, including nested folders):
ignore/*
ignore/**
Ignore PDFs in any subfolder (and also at the base directory):
**/*.pdf
Tips
Place a
.gitignore
file in the folder you start the search in (or deeper) to control what is scanned.If you use multiple
.gitignore
files in different subfolders, each one applies to the files under its directory.
This behavior mirrors Git’s expectations in practice, while making it straightforward to exclude unneeded files from the unlinked-files search.
Further information
PDFs for which it works
The importer works well if there is BibTeX on the first page of the PDF, based on the content has been written for IEEE and LNCS formatted papers. Other formats are not (yet) supported. In case a DOI is found on the first page, the DOI is used to generate the BibTeX information.
Background:
Embedding BibTeX inside PDFs is done by the LaTeX authorarchive package
Having BibTeX on the first page is done by the LaTeX CoverPage package
Embedding BibTeX data using XMP is available in JabRef
Online parsing is enabled using the online service Grobid.
Related questions on stack overflow
Last updated
Was this helpful?