Giter Club home page Giter Club logo

org-citeproc's Introduction

org-citeproc

org-citeproc is a standalone program that uses pandoc-citeproc to generate citations and a bibliography, given a database of bibliographic references and a CSL stylesheet. The idea is to make it possible for Emacs' Org mode exporters to use this excellent tool.

org-citeproc is a fork of John MacFarlane's citeproc program. The major changes are:

  • The input JSON format is compatible with the format used by citeproc-js
  • This version renders output directly in a target format (currently ASCII, HTML, or ODT) rather than as JSON

Usage

org-citeproc format stylefile.csl bibliofile.bib
  • The bibliography file can be in any of the formats that pandoc-citeproc supports.
  • The format can be ascii, html, or odt; also native or native-before can be useful formats for debugging purposes.
  • The program reads JSON from stdin and writes formatted data to stdout.

Input

The input is an array of JSON citation data objects. A citation data object contains one required field, citationItems, whose value is a JSON array of cites. A cite is a JSON object describing one source. Fields in a cite can include:

  • id (string)
  • prefix (string)
  • suffix (string)
  • label (string)
  • locator (string)
  • suppress-author (boolean)
  • author-in-text (boolean)

id must be included; the rest are optional.

A citation data object may also include a properties field, whose value is a JSON object containing one or more of the following fields:

  • noteIndex
  • common-prefix (non-standard)
  • common-suffix (non-standard)

The common-prefix and common-suffix fields allow support for BibLaTeX-style multi-cite citations.

See the *-to-json functions in the org-cite library for Elisp code that generates JSON in this format, given Org citation objects.

Installing org-citeproc

Change to the source directory and run:

cabal build

If you want to use org-citeproc with Org mode, copy or link the resulting org-citeproc binary from dist/build/org-citeproc/org-citeproc to $ORGROOT/bin/org-citeproc, where $ORGROOT is the root of your Org mode distribution. My wip-cite-org-citeproc branch of Org mode makes use of this binary.

Contributing

There is a list of TODO items in TODO.org. Contributions of code, bug reports, and so on are welcome!

org-citeproc's People

Contributors

wyleyr avatar jgm avatar

Stargazers

 avatar Matthew Batson avatar robert howton avatar Erik Hetzner avatar Kazuki Yoshida avatar Albert Krewinkel avatar John Peloquin avatar

Watchers

James Cloos avatar  avatar Will avatar  avatar

Forkers

kjambunathan

org-citeproc's Issues

`org-citeproc` doesn't compile against recent version etc.

If you aren't already tracking emacs-orgmode list, there is some revived interest in wip-cite work. See https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg00227.html.

  1. org-citeproc doesn't compile cleanly against recent hackage or stackge repos. To compile it, I had to use stack's resolver: lts-3.0.

  2. When exporting to OpenDocument, I noticed that intext citations are surrounded within a paragraph tag, and this produces an invalid content.xml. I have file a report against pandoc. See writeOpenDocument, the API, emits paragraph tags for a Plain block, which it shouldn't · Issue #7298 · jgm/pandoc

FYI, pandoc-citeproc is now superseded by citeproc. The citeproc executable only produces json and html output. It doesn't produce OpenDocument for example.

Installation problem: Ubuntu 16.04

Hi

I am running Ubuntu 16.04
and
cabal --version
cabal-install version 1.22.6.0
using version 1.22.5.0 of the Cabal library

cabal build in the org-citeproc source directory I obtained:
Resolving dependencies...
Configuring org-citeproc-0.1...
cabal: At least the following dependencies are missing:
json -any, pandoc-citeproc -any

so I understand that I need to install pandoc-citeproc first?

Uwe Brauer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.