| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Language.Drasil.Printers
Synopsis
- makeDocument :: PrintingInformation -> Document -> Document
- makeProject :: PrintingInformation -> Document -> Project
- genHTML :: HTMLGenOptions -> String -> Document -> HTML
- newtype HTMLGenOptions = HTMLGO {
- mathJaxSrc :: Text
- defaultHTMLGO :: HTMLGenOptions
- renderHTML :: HTMLRenderOptions -> HTML -> Doc ann
- genericCSS :: Doc ann
- data SingleLine
- oneLineCodeSymbolDoc :: HasSymbol x => x -> String
- oneLineSentenceDoc :: PrintingInformation -> Sentence -> Doc
- oneLineExprDoc :: PrintingInformation -> Expr -> Doc
- oneLineCodeExprDoc :: PrintingInformation -> CodeExpr -> Doc
- oneLineUnitDoc :: USymb -> Doc
- genTeX :: Document -> ShowTableOfContents -> PrintingInformation -> Doc
- genJupyterLessonPlan :: Document -> Doc ann
- genJupyterSRS :: Document -> Doc ann
- genMDBook :: Project -> [FileLayout]
- data PrintingInformation
- piSys :: ChunkDB -> Stage -> Notation -> PrintingInformation
- data Notation
Document
makeDocument :: PrintingInformation -> Document -> Document Source #
makeProject :: PrintingInformation -> Document -> Project Source #
HTML
Printer
genHTML :: HTMLGenOptions -> String -> Document -> HTML Source #
Generate an HTML document from a Drasil Document.
Arguments: Rendering options, CSS file name, Document to be rendered
newtype HTMLGenOptions Source #
Options for converting layout objects (LayoutObjs) into HTML AST
Constructors
| HTMLGO | |
Fields
| |
defaultHTMLGO :: HTMLGenOptions Source #
Default HTMLGenOptions using the standard MathJax CDN URL.
renderHTML :: HTMLRenderOptions -> HTML -> Doc ann #
Render HTML to a Doc
CSS
genericCSS :: Doc ann Source #
Generic CSS used for stylizing the LayoutObj language when outputted in
HTML format.
Plain
Types
Renderers
oneLineSentenceDoc :: PrintingInformation -> Sentence -> Doc Source #
Creates a OneLine Implementation-stage sentenceDoc.
oneLineExprDoc :: PrintingInformation -> Expr -> Doc Source #
Creates a OneLine Implementation-stage exprDoc.
oneLineCodeExprDoc :: PrintingInformation -> CodeExpr -> Doc Source #
TeX
genTeX :: Document -> ShowTableOfContents -> PrintingInformation -> Doc Source #
Generates a LaTeX document.
Jupyter
genJupyterLessonPlan :: Document -> Doc ann Source #
Build the general Jupyter Notebook document.
genJupyterSRS :: Document -> Doc ann Source #
Build an SRS document in JSON format.
Markdown
genMDBook :: Project -> [FileLayout] Source #
Generate a mdBook SRS
Printing Information and Options
data PrintingInformation Source #
Printing information contains a database, a stage, and a printing configuration.
piSys :: ChunkDB -> Stage -> Notation -> PrintingInformation Source #
Builds a document's printing information based on the system information.
Notation can be scientific or for engineering.
Constructors
| Scientific | |
| Engineering |