citeproc-hs-0.2: A Citation Style Language implementation in Haskell

Portabilityunportable
Stabilityunstable
MaintainerAndrea Rossato <andrea.rossato@unitn.it>

Text.CSL.Style

Description

The Style types

Synopsis

Documentation

data Style Source

The representation of a parsed CSL style.

data FormattedOutput Source

The formatted output, produced after post-processing the evaluated citations.

data Output Source

The Output generated by the evaluation of a style. Must be further processed for disambiguation and collapsing.

Constructors

OStr String Formatting

A simple String

OName String [String] Formatting

A (family) name with the list of given names.

OYear String String Formatting

The year and a suffix if needed

OCitNum Int Formatting

The citation number

Output [Output] Formatting

Some nested Output

OContrib String [Output] [[Output]]

The citation key with the contributor(s), and everything used for disambiguation.

ODel String

A delimiter string.

data CitationGroup Source

A citation group: a list of evaluated citations, the Formatting to be applied to them, and the Delimiter between individual citations.

Constructors

CG Formatting String [Output] 

data BiblioData Source

Constructors

BD 

Instances

data CiteData Source

A record with all the data to produce the FormattedOutput of a citation: the citation key, the part of the citation that may be colliding with other citations (the list of contributors for the same year), the data to disambiguate it (all possible contributors and all possible given names), and the disambiguated citation and its year.

Constructors

CD 

formatOutput :: Output -> FormattedOutputSource

Convert evaluated Output into FormattedOutput, ready for the output filters.

mapGroupOutput :: (Output -> [a]) -> CitationGroup -> [a]Source

Map the evaluated output of a citation group.

proc :: (Typeable a, Data b) => (a -> a) -> b -> bSource

A generic processing function.

query :: (Typeable a, Data b) => (a -> [c]) -> b -> [c]Source

A generic query function.

rmGivenNames :: Output -> OutputSource

Removes all given names form a OName element with proc.

rmContribs :: Output -> OutputSource

Removes all contributors' names.

addGivenNames :: [Output] -> [Output]Source

Add, with proc, a give name to the family name. Needed for disambiguation.

addYearSuffix :: Output -> OutputSource

Add the year suffix to the year. Needed for disambiguation.