Skip to main content

Background

Zotero is a useful tool for managing citations.

zot4rst is an extension to the Python docutils package for including citations in reStructuredText documents.

zot4rst is developed under Linux, has been tested on Windows, and should run under Mac OS.

Installation

  1. Install Zotero.

  2. Download and install zotxt:

    https://bitbucket.org/egh/zotxt/downloads/zotxt.xpi

  3. Install zot4rst:

    sudo python setup.py install

Quickstart

See example/example.rst, and the generated example/example.pdf and example/example.html. Citation syntax is identical to pandoc.

zot4rst automatically maps citation keys (e.g., @DoeTitle2010) to entries in the zotero database. The key should be of the form @AuthorTitleDate. So, for the item:

John Doe, “Article,” Journal of Generic Studies, 2006.

You could use: @DoeArticle2006. This should be easy to use, but the reference needs to be unambiguous, which might be a problem if there are multiple items with the same author, title, and year. I am looking into ways to handle this better.

To include Zotero citations in a reStructuredText document, you must use the bundled zrst2* scripts, which have been modified to include support for zotero directives. These executables are installed using setup.py above. Currently, they are:

  • zrst2html

  • zrst2odt

  • zrst2pdf

  • zrst2pseudoxml

  • zrst2rst

Sphinx

To use in sphinx, simply add the zot4rst.sphinx extension to your conf.py file:

extensions = ['zot4rst.sphinx']

Pelican

To use in pelican (version 3.1 or later), add the following to your pelicanconf.py file:

PLUGINS = [‘zot4rst.pelican_plugin’,]

Details

Some details, in no particular order.

Note that zrst2rst will transform your citations into plain reStructuredText files without the Zotero extension. For example:

A citation group :xcite:`[see @item1 p. 34-35; also @item3 chap. 3]`.

will become:

A citation group (see Doe 2005, p. 34–35; also Doe and Roe 2007,
chap. 3).

and the bibliography will be fully expanded. This can be used to create RST files that will work without zot4rst.

If you use a footnote citation format, zot4rst will insert footnotes for you.

However, if you also use regular autonumbered footnotes in the same section or paragraph, the ordering will be wrong. So if you want to do this, you will need to put your citations in a footnote explicitly. For example:

Water is wet. [#]_ But there are those who dispute it. [#]_

.. [#] :xcite:`[See @item3]`.

.. [#] These people are wrong.

Metadata

Release files for zot4rst 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zot4rst 0.3.0
File Size Uploaded Provenance
zot4rst-0.3.0.tar.gz 21.1 kB Without provenance Details

Release files / zot4rst-0.3.0.tar.gz

Download URL zot4rst-0.3.0.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cbc635d438e498ff6ef22446ee009461c975e36cf7667e249427ebd2f68ff424
BLAKE2b-256 checksum
How to use checksums
16759b442c0920a0b4571393da7a17152467045618cc1db9c69a56d59f5fbe6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for zot4rst 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page