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

Portability | unportable
Stability | unstable
Maintainer | Andrea Rossato <andrea.rossato@unitn.it>

Text.CSL.Proc.Collapse

Description

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

Synopsis

- collapseCitGroups :: Style -> [CitationGroup] -> [CitationGroup]
- getCollapseOptions :: Style -> [String]
- collapseNumber :: CitationGroup -> CitationGroup
- collapseYear :: Style -> String -> CitationGroup -> CitationGroup
- collapseYearSuf :: Bool -> String -> [Output] -> [Output]
- collapseYearSufRanged :: [Output] -> [Output]
- groupConsec :: [Int] -> [[Int]]

# Documentation

collapseCitGroups :: Style -> [CitationGroup] -> [CitationGroup]

Collapse citations according to the style options.

getCollapseOptions :: Style -> [String]

Get the collapse option set in the `Style` for citations.

collapseNumber :: CitationGroup -> CitationGroup

collapseYear :: Style -> String -> CitationGroup -> CitationGroup

collapseYearSuf :: Bool -> String -> [Output] -> [Output]

collapseYearSufRanged :: [Output] -> [Output]

groupConsec :: [Int] -> [[Int]]

Group consecutive integers:

     groupConsec [1,2,3,5,6,8,9] == [[1,2,3],[5,6],[8,9]]