citeproc-java

A Citation Style Language (CSL) processor for Java.

  • 8000+ styles
  • CSL 1.0.1 compliant
  • Various importers
  • Remote connectors
  • Command line tool

What is citeproc-java?

citeproc-java is a Citation Style Language (CSL) processor for Java. It interprets CSL styles and generates citations and bibliographies. Some of the highlights in citeproc-java are:

Example

CSLItemData item = new CSLItemDataBuilder()
    .type(CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2016, 11, 20)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2016, 11, 20)
    .build();

String bibl = CSL.makeAdhocBibliography("ieee", item).makeString();

Output

<div class="csl-bib-body">
  <div class="csl-entry">
    <div class="csl-left-margin">[1]</div>
    <div class="csl-right-inline">M. Krämer, “citeproc-java: A Citation Style
      Language (CSL) processor for Java,” 20-Nov-2016. [Online]. Available:
      http://michel-kraemer.github.io/citeproc-java/. [Accessed: 20-Nov-2016].
    </div>
  </div>
</div>

Rendered

[1]
M. Krämer, “citeproc-java: A Citation Style Language (CSL) processor for Java,” 20-Nov-2016. [Online]. Available: http://michel-kraemer.github.io/citeproc-java/. [Accessed: 20-Nov-2016].
CSLItemData item = new CSLItemDataBuilder()
    .type(CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2016, 11, 20)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2016, 11, 20)
    .build();

String bibl = CSL.makeAdhocBibliography("acm-siggraph", item).makeString();

Output

<div class="csl-bib-body">
  <div class="csl-entry">
    <span style="font-variant:small-caps;">Krämer, M.</span> 2016.
    citeproc-java: A Citation Style Language (CSL) processor for Java.
    http://michel-kraemer.github.io/citeproc-java/.
  </div>
</div>

Rendered

Krämer, M. 2016. citeproc-java: A Citation Style Language (CSL) processor for Java. http://michel-kraemer.github.io/citeproc-java/.
CSLItemData item = new CSLItemDataBuilder()
    .type(CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2016, 11, 20)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2016, 11, 20)
    .build();

String bibl = CSL.makeAdhocBibliography("apa", item).makeString();

Output

<div class="csl-bib-body">
  <div class="csl-entry">Krämer, M. (2016, November 20). citeproc-java:
    A Citation Style Language (CSL) processor for Java. Retrieved
    November 20, 2016, from http://michel-kraemer.github.io/citeproc-java/
  </div>
</div>

Rendered

Krämer, M. (2016, November 20). citeproc-java: A Citation Style Language (CSL) processor for Java. Retrieved November 20, 2016, from http://michel-kraemer.github.io/citeproc-java/
CSLItemData item = new CSLItemDataBuilder()
    .type(CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2016, 11, 20)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2016, 11, 20)
    .build();

String bibl = CSL.makeAdhocBibliography("chicago-author-date", item).makeString();

Output

<div class="csl-bib-body">
  <div class="csl-entry">Krämer, Michel. 2016. “Citeproc-Java: A Citation
    Style Language (CSL) Processor for Java.” November 20.
    http://michel-kraemer.github.io/citeproc-java/.
  </div>
</div>

Rendered

Krämer, Michel. 2016. “Citeproc-Java: A Citation Style Language (CSL) Processor for Java.” November 20. http://michel-kraemer.github.io/citeproc-java/.
CSLItemData item = new CSLItemDataBuilder()
    .type(CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2016, 11, 20)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2016, 11, 20)
    .build();

String bibl = CSL.makeAdhocBibliography("council-of-science-editors",
    item).makeString();

Output

<div class="csl-bib-body">
  <div class="csl-entry">1. Krämer M. citeproc-java: A Citation Style Language
    (CSL) processor for Java. 2016 November 20 [cited 2016 November 20].
    Available from: http://michel-kraemer.github.io/citeproc-java/
  </div>
</div>

Rendered

1. Krämer M. citeproc-java: A Citation Style Language (CSL) processor for Java. 2016 November 20 [cited 2016 November 20]. Available from: http://michel-kraemer.github.io/citeproc-java/
CSLItemData item = new CSLItemDataBuilder()
    .type(CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2016, 11, 20)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2016, 11, 20)
    .build();

String bibl = CSL.makeAdhocBibliography("modern-language-association",
    item).makeString();

Output

<div class="csl-bib-body">
  <div class="csl-entry">Krämer, Michel. “Citeproc-Java: A Citation Style
    Language (CSL) Processor for Java.” 20 Nov. 2016. Web. 20 Nov. 2016.
  </div>
</div>

Rendered

Krämer, Michel. “Citeproc-Java: A Citation Style Language (CSL) Processor for Java.” 20 Nov. 2016. Web. 20 Nov. 2016.

More than 8000 styles

citeproc-java is based on citeproc-js and uses the Citation Style Language (CSL) citation styles.

Select from more than 8000 styles. All CSL styles are freely available and distributed under a Creative Commons Attribution-ShareAlike license.

License

citeproc-java is licensed under the Apache License, Version 2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.