pandoc-citeproc-0.8: Supports using pandoc with citeproc

Copyright | (c) Andrea Rossato
License | BSD-style (see LICENSE)
Maintainer | Andrea Rossato <andrea.rossato@unitn.it>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

Text.CSL.Proc

Description

This module provides functions for processing the evaluated `Output` for disambiguation and citation collapsing.

Synopsis

- data ProcOpts = ProcOpts {
  - bibOpts :: BibOpts
  - linkCitations :: Bool
  }
- data BibOpts
  - = Select [(String, String)] [(String, String)]
  - | Include [(String, String)] [(String, String)]
  - | Exclude [(String, String)] [(String, String)]
- newtype FieldVal = FieldVal {
  - unFieldVal :: (String, String)
  }
- procOpts :: ProcOpts
- processCitations :: ProcOpts -> Style -> [Reference] -> Citations -> [Formatted]
- processBibliography :: ProcOpts -> Style -> [Reference] -> [Formatted]
- citeproc :: ProcOpts -> Style -> [Reference] -> Citations -> BiblioData
- procRefs :: Style -> [Reference] -> [Reference]
- sortItems :: Show a => [(a, [Sorting])] -> [a]
- procBiblio :: BibOpts -> Style -> [Reference] -> [[Output]]
- subsequentAuthorSubstitute :: Bibliography -> [[Output]] -> [[Output]]
- filterRefs :: BibOpts -> [Reference] -> [Reference]
- procGroup :: Style -> [(Cite, Reference)] -> CitationGroup
- formatBiblioLayout :: Formatting -> Delimiter -> [Output] -> [Output]
- formatCitLayout :: Style -> CitationGroup -> Formatted
- addAffixes :: Formatting -> [Output] -> [Output]
- localModifiers :: Style -> Bool -> Cite -> Output -> Output
- contribOnly :: Style -> Output -> Output

# Documentation

data ProcOpts

Constructors

ProcOpts |
Fields bibOpts :: BibOpts linkCitations :: Bool

Instances

Eq ProcOpts |
Read ProcOpts |
Show ProcOpts |

data BibOpts

Constructors

Select [(String, String)] [(String, String)] |
Include [(String, String)] [(String, String)] |
Exclude [(String, String)] [(String, String)] |

Instances

Eq BibOpts |
Read BibOpts |
Show BibOpts |
FromJSON BibOpts |

newtype FieldVal

Constructors

FieldVal |
Fields unFieldVal :: (String, String)

Instances

Show FieldVal |
FromJSON FieldVal |

procOpts :: ProcOpts

processCitations :: ProcOpts -> Style -> [Reference] -> Citations -> [Formatted]

With a `Style`, a list of `Reference`s and the list of citation groups (the list of citations with their locator), produce the `Formatted` for each citation group.

processBibliography :: ProcOpts -> Style -> [Reference] -> [Formatted]

With a `Style` and the list of `Reference`s produce the `Formatted` for the bibliography.

citeproc :: ProcOpts -> Style -> [Reference] -> Citations -> BiblioData

With a `Style`, a list of `Reference`s and the list of `Citations`, produce the `Formatted` for each citation group and the bibliography.

procRefs :: Style -> [Reference] -> [Reference]

Given the CSL `Style` and the list of `Reference`s sort the list according to the `Style` and assign the citation number to each `Reference`.

sortItems :: Show a => [(a, [Sorting])] -> [a]

procBiblio :: BibOpts -> Style -> [Reference] -> [[Output]]

With a `Style` and a sorted list of `Reference`s produce the evaluated output for the bibliography.

subsequentAuthorSubstitute :: Bibliography -> [[Output]] -> [[Output]]

filterRefs :: BibOpts -> [Reference] -> [Reference]

procGroup :: Style -> [(Cite, Reference)] -> CitationGroup

Given the CSL `Style` and the list of `Cite`s coupled with their `Reference`s, generate a `CitationGroup`. The citations are sorted according to the `Style`.

formatBiblioLayout :: Formatting -> Delimiter -> [Output] -> [Output]

formatCitLayout :: Style -> CitationGroup -> Formatted

addAffixes :: Formatting -> [Output] -> [Output]

localModifiers :: Style -> Bool -> Cite -> Output -> Output

The `Bool` is `True` if we are formatting a textual citation (in pandoc terminology).

contribOnly :: Style -> Output -> Output