How to use the citeproc.Output 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 larsgw / citation.js / src / get / modules / csl / engines.js View on Github external
import CSL from 'citeproc'

import {templates} from './styles'
import {locales} from './locales'

// BEGIN add sys function
const getWrapperProxy = (original) => function (state, entry) {
  if (state.sys.wrapBibliographyEntry) {
    let [prefix, postfix] = state.sys.wrapBibliographyEntry(this.system_id)
    entry = [prefix, entry, postfix].join('')
  }
  return original(state, entry)
}

for (let format in CSL.Output.Formats) {
  let original = CSL.Output.Formats[format]['@bibliography/entry']
  CSL.Output.Formats[format]['@bibliography/entry'] = getWrapperProxy(original)
}
// END

/**
 * Object containing CSL Engines
 *
 * @access private
 * @constant
 */
const engines = {}

/**
 * Retrieve CSL parsing engine
 *
 * @access protected
github larsgw / citation.js / src / get / modules / csl / engines.js View on Github external
import CSL from 'citeproc'

import {templates} from './styles'
import {locales} from './locales'

// BEGIN add sys function
const getWrapperProxy = (original) => function (state, entry) {
  if (state.sys.wrapBibliographyEntry) {
    let [prefix, postfix] = state.sys.wrapBibliographyEntry(this.system_id)
    entry = [prefix, entry, postfix].join('')
  }
  return original(state, entry)
}

for (let format in CSL.Output.Formats) {
  let original = CSL.Output.Formats[format]['@bibliography/entry']
  CSL.Output.Formats[format]['@bibliography/entry'] = getWrapperProxy(original)
}
// END

/**
 * Object containing CSL Engines
 *
 * @access private
 * @constant
 */
const engines = {}

/**
 * Retrieve CSL parsing 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 1 year ago

Package Health Score

65 / 100
Full package analysis

Similar packages