| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Language.Drasil.Document.Citation.Core
Description
Defines the chunk type to hold citations.
Synopsis
- data Citation
- type BibRef = [Citation]
- type EntryID = String
- class HasCitation c where
- getCitations :: Lens' c [Citation]
- citeID :: Lens' Citation UID
- citeKind :: Lens' Citation CitationKind
- cArticle :: People -> String -> String -> Int -> [CiteField] -> String -> Citation
- cBookA :: People -> String -> String -> Int -> [CiteField] -> String -> Citation
- cBookE :: People -> String -> String -> Int -> [CiteField] -> String -> Citation
- cBooklet :: String -> [CiteField] -> String -> Citation
- cInBookACP :: People -> String -> Int -> [Int] -> String -> Int -> [CiteField] -> String -> Citation
- cInBookECP :: People -> String -> Int -> [Int] -> String -> Int -> [CiteField] -> String -> Citation
- cInBookAC :: People -> String -> Int -> String -> Int -> [CiteField] -> String -> Citation
- cInBookEC :: People -> String -> Int -> String -> Int -> [CiteField] -> String -> Citation
- cInBookAP :: People -> String -> [Int] -> String -> Int -> [CiteField] -> String -> Citation
- cInBookEP :: People -> String -> [Int] -> String -> Int -> [CiteField] -> String -> Citation
- cInCollection :: People -> String -> String -> String -> Int -> [CiteField] -> String -> Citation
- cInProceedings :: People -> String -> String -> Int -> [CiteField] -> String -> Citation
- cManual :: String -> [CiteField] -> String -> Citation
- cMThesis :: People -> String -> String -> Int -> [CiteField] -> String -> Citation
- cMisc :: [CiteField] -> String -> Citation
- cPhDThesis :: People -> String -> String -> Int -> [CiteField] -> String -> Citation
- cProceedings :: String -> Int -> [CiteField] -> String -> Citation
- cTechReport :: People -> String -> String -> Int -> [CiteField] -> String -> Citation
- cUnpublished :: People -> String -> String -> [CiteField] -> String -> Citation
Types
All citations require a unique identifier used by the Drasil chunk.
We will re-use the UID part as an EntryID (String) used for creating reference links.
Finally we will have the reference information (CitationKind, CiteFields, and a ShortName).
Ex. A reference to a thesis paper like Koothoor's "Document driven approach to certifying scientific computing software" would include the affiliated university, publishing year, and city.
Instances
Class
class HasCitation c where Source #
Some documents, as well as some pieces of knowledge, have citations.
Accessors
citeKind :: Lens' Citation CitationKind Source #
Citation smart constructors
cArticle :: People -> String -> String -> Int -> [CiteField] -> String -> Citation Source #
Article citation requires author(s), title, journal, year. Optional fields can be: volume, number, pages, month, and note. Implicitly uses the EntryID as the chunk id.
cBookA :: People -> String -> String -> Int -> [CiteField] -> String -> Citation Source #
Book citation requires author or editor, title, publisher, year. Optional fields can be volume or number, series, address, edition, month, and note. Implicitly uses the EntryID as the chunk id.
Book citation by author.
cBookE :: People -> String -> String -> Int -> [CiteField] -> String -> Citation Source #
Book citation requires author or editor, title, publisher, year. Optional fields can be volume or number, series, address, edition, month, and note. Implicitly uses the EntryID as the chunk id.
Book citation by editor.
cBooklet :: String -> [CiteField] -> String -> Citation Source #
Booklet citation requires title. Optional fields can be author, how published, address, month, year, note. Implicitly uses the EntryID as the chunk id.
cInBookACP :: People -> String -> Int -> [Int] -> String -> Int -> [CiteField] -> String -> Citation Source #
InBook citation requires author or editor, title, chapter and/or pages, publisher, year. Optional fields can be volume or number, series, type, address, edition, month, and note. Implicitly uses the EntryID as the chunk id. This smart constructor includes both chapter and page numbers.
InBook citation by author.
cInBookECP :: People -> String -> Int -> [Int] -> String -> Int -> [CiteField] -> String -> Citation Source #
InBook citation requires author or editor, title, chapter and/or pages, publisher, year. Optional fields can be volume or number, series, type, address, edition, month, and note. Implicitly uses the EntryID as the chunk id. This smart constructor includes both chapter and page numbers.
InBook citation by editor.
cInBookAC :: People -> String -> Int -> String -> Int -> [CiteField] -> String -> Citation Source #
InBook citation excluding page numbers.
Otherwise identical to cInBookACP.
cInBookEC :: People -> String -> Int -> String -> Int -> [CiteField] -> String -> Citation Source #
InBook citation excluding page numbers.
Otherwise identical to cInBookECP.
cInBookAP :: People -> String -> [Int] -> String -> Int -> [CiteField] -> String -> Citation Source #
InBook citation excluding chapter.
Otherwise identical to cInBookACP.
cInBookEP :: People -> String -> [Int] -> String -> Int -> [CiteField] -> String -> Citation Source #
InBook citation excluding chapter.
Otherwise identical to cInBookECP.
cInCollection :: People -> String -> String -> String -> Int -> [CiteField] -> String -> Citation Source #
InCollection citation requires author, title, bookTitle, publisher, year. Optional fields can be editor, volume or number, series, type, chapter, pages, address, edition, month, and note. Implicitly uses the EntryID as the chunk id.
cInProceedings :: People -> String -> String -> Int -> [CiteField] -> String -> Citation Source #
InProceedings citation requires author, title, bookTitle, year. Optional fields can be editor, volume or number, series, pages, address, month, organization, publisher, and note. Implicitly uses the EntryID as the chunk id.
cManual :: String -> [CiteField] -> String -> Citation Source #
Manual (technical documentation) citation requires title. Optional fields can be author, organization, address, edition, month, year, and note. Implicitly uses the EntryID as the chunk id.
cMThesis :: People -> String -> String -> Int -> [CiteField] -> String -> Citation Source #
Master's Thesis citation requires author, title, school, and year. Optional fields can be type, address, month, and note. Implicitly uses the EntryID as the chunk id.
cMisc :: [CiteField] -> String -> Citation Source #
Misc citation requires nothing. Optional fields can be author, title, howpublished, month, year, and note. Implicitly uses the EntryID as the chunk id.
cPhDThesis :: People -> String -> String -> Int -> [CiteField] -> String -> Citation Source #
PhD Thesis citation requires author, title, school, and year. Optional fields can be type, address, month, and note. Implicitly uses the EntryID as the chunk id.
cProceedings :: String -> Int -> [CiteField] -> String -> Citation Source #
Proceedings citation requires title and year. Optional fields can be editor, volume or number, series, address, publisher, note, month, and organization. Implicitly uses the EntryID as the chunk id.