citeproc-java

A Citation Style Language (CSL) processor for Java.

  • 6500+ 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("citeproc-java", CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2014, 2, 27)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2014, 2, 27)
    .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,” 27-Feb-2014. [Online]. Available:
      http://michel-kraemer.github.io/citeproc-java/. [Accessed: 27-Feb-2014].
    </div>
  </div>
</div>

Rendered

[1]
M. Krämer, “citeproc-java: A Citation Style Language (CSL) processor for Java,” 27-Feb-2014. [Online]. Available: http://michel-kraemer.github.io/citeproc-java/. [Accessed: 27-Feb-2014].
CSLItemData item = new CSLItemDataBuilder("citeproc-java", CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2014, 2, 27)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2014, 2, 27)
    .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> 2014.
    citeproc-java: A Citation Style Language (CSL) processor for Java.
    http://michel-kraemer.github.io/citeproc-java/.
  </div>
</div>

Rendered

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

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

Output

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

Rendered

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

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

Output

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

Rendered

Krämer, Michel. 2014. “Citeproc-Java: A Citation Style Language (CSL) Processor for Java.” February 27. http://michel-kraemer.github.io/citeproc-java/.
CSLItemData item = new CSLItemDataBuilder("citeproc-java", CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2014, 2, 27)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2014, 2, 27)
    .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. 2014 February 27 [cited 2014 February 27].
    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. 2014 February 27 [cited 2014 February 27]. Available from: http://michel-kraemer.github.io/citeproc-java/
CSLItemData item = new CSLItemDataBuilder("citeproc-java", CSLType.WEBPAGE)
    .title("citeproc-java: A Citation Style Language (CSL) processor for Java")
    .author("Michel", "Krämer")
    .issued(2014, 2, 27)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2014, 2, 27)
    .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.” 27 Feb. 2014. Web. 27 Feb. 2014.
  </div>
</div>

Rendered

Krämer, Michel. “Citeproc-Java: A Citation Style Language (CSL) Processor for Java.” 27 Feb. 2014. Web. 27 Feb. 2014.

More than 6500 styles

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

Select from more than 6500 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.