Location of BibTeX entries
BibTex files can be stored:
- In a special folder
$DATA/bib. In that case, the file can be referred to by using directly the file name (with the extension).
- Anywhere on the Internet - papercite will download any file if the
- As a custom field prefixed by
papercite_. For example, the URL
custom://datawill use the data in the
For each bibliographic entry, files can be automatically matched to retrieve e.g. the paper PDF, or the slides.
First, the key of the bibtex entry is transformed - lowercased, and the characters
/ are replaced by
-. The field determines the bibtex field that will be populated when matching. Then,
- Filesystem matching
- A file will match if it is contained in the **folder** and its name is **[key]****[suffix]**.**extension**
- WordPress media matching
- A file will match if its mime-type corresponds (or is empty) and its permalink name matches **[key]****[suffix]**
The URL of the matched file will be stored in the field
FIELD of the bibtex entry, and will be available by templates. For example, this can be inserted to display a link to a presentation:
@?ppt@ <a href="@ppt@" title='Download PPT' class='papercite_pdf'> <img src='@PAPERCITE_DATA_URL@/img/ppt.png' alt="[ppt]"/></a> @;@
Using the Media Library
It is possible to use the WordPress media library. In this case, the name of the file is controlled by the permalink. By default, the permalink is a processed version of the file name: the name is lowercased, extension is removed, etc. Due to WordPress limitations, it is necessary to attach the media file to a post before being able to edit the permalink.
The matching process is determined by the papercite option page. See the help on attached files.
Note that bibtex files are matched using the same process, with
application/x-bibtex as the mime-type and no suffix.
Using direct access to the WordPress files
The data folder where all custom files (bibtex, PDF, templates) will be denoted
$DATA in this document. This folder is either
wp-content/blogs.dir/**XXX**/files/papercite-data (in case of multiple sites hosted on WordPress).
- Within the folder
$DATA, the subfolders
bibcontains your bibtex files
tplcontains your custom templates
formatcontains your custom entry formats
- Copy your bibtex files into the
bibfolder, and your pdf files into the
/have been replaced by