Download the PHP package seboettg/citeproc-php without Composer

On this page you can find all versions of the php package seboettg/citeproc-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package citeproc-php

PKP welcomes citeproc-php to our GitHub organization!

The Public Knowledge Project has taken over stewardship of citeproc-php from @seboettg. Thanks for your many years of hard work, Sebastian! Follow the discussion leading to this change at https://github.com/pkp/citeproc-php/discussions/200.

citeproc-php

Latest Stable Version Total Downloads License Build Status Code Coverage Scrutinizer Code Quality Code Intelligence Status PHP PHP PHP PHP

citeproc-php is a full-featured CSL 1.0.1 processor that renders bibliographic metadata into HTML-formatted citations or bibliographies using CSL stylesheets. It supports both bibliographies and citations (except for Citation-specific Options).

Citation Style Language CSL

The Citation Style Language (CSL) is an XML-based format to describe the formatting of citations, notes and bibliographies, offering:

For additional documentation of CSL visit http://citationstyles.org.

Installing citeproc-php

The recommended way to install citeproc-php is through Composer.

Add the following lines to your composer.json file in order to add required program libraries as well as CSL styles and locales:

Next, run the Composer command to install the latest stable version of citeproc-php and its dependencies:

After installing, you need to require Composer's autoloader:

You can then later update citeproc-php using composer:

If you have trouble using composer you will find further information on https://getcomposer.org/doc/.

How to use citeproc-php

citeproc-php renders bibliographic metadata into HTML-formatted citations or bibliographies using a stylesheet that defines the citation rules.

Get the metadata of your publications

Create a project folder:

First, you need a JSON-formatted array of publication metadata. Many services support CSL exports, such as BibSonomy, Zotero, and Mendeley. If you don't use any of these services, you can use the following test data as a starting point.

Copy this into a file in your project root and name that file metadata.json.

Build a first simple script

You can also render citations instead of bibliographies:

Filter Citations

Since version 2.1, you can also apply a filter to render only specific citations.

Bibliography-specific styles using CSS

Some CSL stylesheets use bibliography-specific style options such as hanging indents or alignments. To apply these options, you can render the corresponding CSS using CiteProc. Insert these styles within the <head> tag of your HTML output page.

Now, you can watch and test the output using PHP's internal web server:

Start your Browser and open the URL http://localhost:8080.

You can find additional example scripts in the examples folder.

Advanced usage of citeproc-php

Since version 2.1, citeproc-php comes with additional features that are not part of the CSL specification.

You can enrich bibliographies and citations with additional HTML tags to inject links (i.e. to set a link to an author's CV), or to add other html markup.

Use Lambda Functions to setup citeproc-php in order to render advanced citations or bibliographies

As you can see, $titleFunction wraps the title and $authorFunction wraps the author's name in a link.

Assign these functions to its associated CSL variable (in this case title and author) as follows.

You can also use custom Lambda Functions in order to enrich citations with additional HTML markup.

If you want to restrict citeproc-php to use a custom Lambda Function either for bibliographies or citations, or you want to apply different functions for both, you can define the array as follows:

In this example, each bibliography entry receives an anchor based on its id, and the citation (in Elsevier-Vancouver style [1]) gets a URL with a fragment identifier. This way, every citation links to its corresponding entry in the bibliography. You can find further examples in the examples folder.

Good to know

Contribution

citeproc-php is an Open Source project. You can support it by reporting bugs, contributing code or contributing documentation.

Star the Repo

Developing software is a demanding task that requires a lot of time. Every open-source developer appreciates recognition for their work. If you use citeproc-php and find it helpful, consider starring the repository and sharing it on your blog.

Reporting a Bug

Use the Issue Tracker in order to report a bug.

Contribute Code

Are you a developer who wants to help develop new features or fix bugs? Fork citeproc-php, set up a workspace, and send a pull request.

Here is the recommended workflow:

Testing

You can also run test cases without IDE:

Projects using citeproc-php


All versions of citeproc-php with dependencies

PHP Build Version
Package Version
Requires citation-style-language/styles Version v0.0.*
citation-style-language/locales Version v0.0.*
seboettg/collection Version ^3.1
myclabs/php-enum Version ^1.8
ext-simplexml Version *
ext-json Version *
php Version >=7.3
ext-mbstring Version *
ext-intl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package seboettg/citeproc-php contains the following files

Loading the files please wait ...