How to use the citeproc.Engine function in citeproc

To help you get started, we’ve selected a few citeproc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Zettlr / Zettlr / source / main / providers / citeproc-provider.js View on Github external
_initProcessor () {
    try {
      // Load the engine with the current application language. As this citing
      // is only for preview purposes, it should follow the language like the
      // rest of the interface.
      this._engine = new citeproc.Engine(this._sys, this._mainStyle, this._lang)
      this._status = READY
      this._loadIdHint()
    } catch (e) {
      console.error(e)
      this._status = ERROR
    }
  }
github dsifford / academic-bloggers-toolkit / src / js / utils / processor.ts View on Github external
constructor(style: string) {
        const { instance } = Processor;
        if (instance) {
            if (instance.style !== style) {
                instance.style = style;
                instance.engine = new Engine(instance.sys, instance.style);
                instance.engine.opt.development_extensions.wrap_url_and_doi = true;
            }
            return instance;
        } else {
            Processor.instance = this;
            this.style = style;
            this.engine = new Engine(this.sys, this.style);
            this.engine.opt.development_extensions.wrap_url_and_doi = true;
        }
    }
    /* eslint-enable @typescript-eslint/camelcase */
github larsgw / citation.js / src / get / modules / csl / engines.js View on Github external
const fetchEngine = function (style, lang, template, retrieveItem, retrieveLocale) {
  const engineHash = `${style}|${lang}`
  let engine

  if (engines.hasOwnProperty(engineHash)) {
    engine = engines[engineHash]
    engine.sys.retrieveItem = retrieveItem
  } else {
    engine = engines[engineHash] = new CSL.Engine({retrieveLocale, retrieveItem}, template, lang, true)
  }

  return engine
}

citeproc

The citeproc-js citation formatting module, in CommonJS format. This version is based on citeproc-js 1.4.63

CPAL-1.0 OR AGPL-1.0
Latest version published 2 years ago

Package Health Score

64 / 100
Full package analysis

Similar packages