citeproc-java

A Citation Style Language (CSL) processor for Java.

  • 9000+ styles
  • CSL 1.0.1 compliant
  • Various importers
  • 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(2019, 11, 9)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2019, 11, 9)
    .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,” 09-Nov-2019. [Online]. Available:
      http://michel-kraemer.github.io/citeproc-java/. [Accessed: 09-Nov-2019].
    </div>
  </div>
</div>

Rendered

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

Rendered

Krämer, M. 2019. 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(2019, 11, 9)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2019, 11, 9)
    .build();

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

Output

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

Rendered

Krämer, M. (2019, November 9). citeproc-java: A Citation Style Language (CSL) processor for Java. Retrieved November 9, 2019, 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(2019, 11, 9)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2019, 11, 9)
    .build();

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

Output

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

Rendered

Krämer, Michel. 2019. “Citeproc-Java: A Citation Style Language (CSL) Processor for Java.” November 9. 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(2019, 11, 9)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2019, 11, 9)
    .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. 2019 November 9 [cited 2019 November 9].
    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. 2019 November 9 [cited 2019 November 9]. 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(2019, 11, 9)
    .URL("http://michel-kraemer.github.io/citeproc-java/")
    .accessed(2019, 11, 9)
    .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.” 9 Nov. 2019. Web. 9 Nov. 2019.
  </div>
</div>

Rendered

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

More than 9000 styles

citeproc-java uses the Citation Style Language (CSL) citation styles. Select from more than 9000 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.