drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Document

Description

Document Description Language.

Synopsis

Section Types

data SecCons Source #

Section Contents are split into subsections or contents, where contents are standard layout objects (see Contents).

Constructors

Sub Section 
Con Contents 

data Partition Source #

Constructors

Sections 
Part 
Chapter 

data Section Source #

Sections have a title (Sentence), a list of contents (SecCons) and a shortname (Reference).

Constructors

Section 

Fields

Instances

Instances details
HasRefAddress Section Source #

Finds the reference address of a Section.

Instance details

Defined in Language.Drasil.Document

Referable Section Source #

Finds the reference information of a Section.

Instance details

Defined in Language.Drasil.Document

HasShortName Section Source #

Finds the short name of a Section.

Instance details

Defined in Language.Drasil.Document

HasUID Section Source #

Finds the UID of a Section.

Instance details

Defined in Language.Drasil.Document

Methods

uid :: Lens' Section UID Source #

Eq Section Source #

Sections are equal if UIDs are equal.

Instance details

Defined in Language.Drasil.Document

Methods

(==) :: Section -> Section -> Bool #

(/=) :: Section -> Section -> Bool #

data Document Source #

A Document has a Title (Sentence), Author(s) (Sentence), and Sections which hold the contents of the document.

data ShowTableOfContents Source #

Determines whether or not the table of contents appears on the generated artifacts.

Constructors

ToC 
NoToC 

checkToC :: Document -> Document Source #

Manually removes the first section of a document (table of contents section). temp fix for Notebook (see if we need this in notebook later)

Content Constructors

llcc :: Reference -> RawContent -> LabelledContent Source #

Smart constructor for labelled content chunks.

ulcc :: RawContent -> UnlabelledContent Source #

Smart constructor for unlabelled content chunks (no Reference).

mkParagraph :: Sentence -> Contents Source #

Smart constructor that wraps UnlabelledContent into Contents.

mkFig :: Reference -> RawContent -> Contents Source #

Smart constructor that wraps LabelledContent into Contents.

mkRawLC :: RawContent -> Reference -> LabelledContent Source #

Smart constructor similar to llcc, but takes in RawContent first.

Section Constructors

section :: Sentence -> [Contents] -> [Section] -> Reference -> Section Source #

Smart constructor for creating Sections with a title (Sentence), introductory contents (ie. paragraphs, tables, etc.), a list of subsections, and a shortname (Reference).

extractSection :: Document -> [Section] Source #

Smart constructor for retrieving the contents (Sections) from a Document.

getSec :: Section -> [Section] Source #

Smart constructor for retrieving the subsections (Sections) within a Section.

getSecCons :: SecCons -> [Section] Source #

Helper to retrieve subsections (Sections) from section contents (SecCons).

fig :: Lbl -> Filepath -> RawContent Source #

Figure smart constructor with a Lbl and a Filepath. Assumes 100% of page width as max width.

figWithWidth :: Lbl -> Filepath -> MaxWidthPercent -> RawContent Source #

Figure smart constructor that allows for customized max widths.

Reference Constructors

makeTabRef :: String -> Reference Source #

Create a reference for a table. Takes in the name of a table (which will also be used for its shortname).

makeFigRef :: String -> Reference Source #

Create a reference for a figure. Takes in the name of a figure (which will also be used for its shortname).

makeSecRef :: String -> Sentence -> Reference Source #

Create a reference for a section. Takes in the name of a section and a shortname for the section.

makeEqnRef :: String -> Reference Source #

Create a reference for a equation. Takes in the name of the equation (which will also be used for its shortname).

makeURI :: String -> String -> ShortName -> Reference Source #

Create a reference for a URI. Takes in a UID (as a String), a reference address, and a shortname.

makeTabRef' :: UID -> Reference Source #

Variants of makeTabRef that takes a UID instead of a String.

makeFigRef' :: UID -> Reference Source #

Variants of makeFigRef that takes a UID instead of a String.

makeSecRef' :: UID -> Sentence -> Reference Source #

Variants of makeSecRef that takes a UID instead of a String.

makeEqnRef' :: UID -> Reference Source #

Variants of makeEqnRef that takes a UID instead of a String.

makeURI' :: UID -> String -> ShortName -> Reference Source #

Variants of makeURI that takes a UID instead of a String.