Text.CSL.Input.Bibtex

pandoc-citeproc-0.10.5.1: Supports using pandoc with citeproc

Copyright | (c) John MacFarlane
License | BSD-style (see LICENSE)
Maintainer | John MacFarlane <fiddlosopher@gmail.com>
Stability | unstable-- Portability : unportable
Safe Haskell | None
Language | Haskell2010

Text.CSL.Input.Bibtex

Description

Synopsis

- readBibtex :: Bool -> Bool -> FilePath -> IO [Reference]
- readBibtexString :: Bool -> Bool -> String -> IO [Reference]
- readBibtexString' :: Bool -> Bool -> Lang -> Locale -> String -> [Reference]
- data Lang = Lang String String
- langToLocale :: Lang -> String
- getLangFromEnv :: IO Lang

# Documentation

readBibtex :: Bool -> Bool -> FilePath -> IO [Reference] #

Parse a BibTeX or BibLaTeX file into a list of `Reference`s. If the first parameter is true, the file will be treated as BibTeX; otherwse as BibLaTeX. If the second parameter is true, an "untitlecase" transformation will be performed.

readBibtexString :: Bool -> Bool -> String -> IO [Reference] #

Like `readBibtex` but operates on a String rather than a file.

readBibtexString' :: Bool -> Bool -> Lang -> Locale -> String -> [Reference] #

Pure version of readBibtexString (does not try to get the language from the environment).

data Lang #

A representation of a language and localization.

Constructors

Lang String String |

langToLocale :: Lang -> String #

Prints a `Lang` in BCP 47 format.

getLangFromEnv :: IO Lang #

Get `Lang` from the environment variable LANG, defaulting to en-US.