Literate Type
This type provides three simple methods for calling the literate programming tool.
The ConvertMarkdownFile
and ConvertScriptFile
methods process a single Markdown document
and F# script, respectively. The ConvertDirectory
method handles an entire directory tree
(looking for *.fsx
and *.md
files).
Static members
Static member |
Description
|
Full Usage:
Literate.ConvertMarkdownFile(input, ?template, ?output, ?outputKind, ?prefix, ?fscOptions, ?lineNumbers, ?references, ?substitutions, ?generateAnchors, ?imageSaver, ?rootInputFolder, ?crefResolver, ?mdlinkResolver, ?onError, ?filesWithFrontMatter)
Parameters:
string
?template : string
?output : string
?outputKind : OutputKind
?prefix : string
?fscOptions : string
?lineNumbers : bool
?references : bool
?substitutions : (ParamKey * string) list
?generateAnchors : bool
?imageSaver : string -> string
?rootInputFolder : string
?crefResolver : string -> (string * string) option
?mdlinkResolver : string -> string option
?onError : string -> unit
?filesWithFrontMatter : FrontMatterFile array
|
Convert a markdown file into HTML or another output kind
|
Full Usage:
Literate.ConvertScriptFile(input, ?template, ?output, ?outputKind, ?prefix, ?fscOptions, ?lineNumbers, ?references, ?fsiEvaluator, ?substitutions, ?generateAnchors, ?imageSaver, ?rootInputFolder, ?crefResolver, ?mdlinkResolver, ?onError, ?filesWithFrontMatter)
Parameters:
string
?template : string
?output : string
?outputKind : OutputKind
?prefix : string
?fscOptions : string
?lineNumbers : bool
?references : bool
?fsiEvaluator : IFsiEvaluator
?substitutions : (ParamKey * string) list
?generateAnchors : bool
?imageSaver : string -> string
?rootInputFolder : string
?crefResolver : string -> (string * string) option
?mdlinkResolver : string -> string option
?onError : string -> unit
?filesWithFrontMatter : FrontMatterFile array
|
Convert a script file into HTML or another output kind
Example
|
Full Usage:
Literate.ParseAndCheckScriptFile(path, ?fscOptions, ?definedSymbols, ?references, ?fsiEvaluator, ?parseOptions, ?rootInputFolder, ?onError)
Parameters:
string
?fscOptions : string
?definedSymbols : string list
?references : bool
?fsiEvaluator : IFsiEvaluator
?parseOptions : MarkdownParseOptions
?rootInputFolder : string
?onError : string -> unit
Returns: LiterateDocument
|
Parse F# Script file to LiterateDocument
|
Full Usage:
Literate.ParseMarkdownFile(path, ?fscOptions, ?definedSymbols, ?references, ?fsiEvaluator, ?parseOptions, ?rootInputFolder, ?onError)
Parameters:
string
-
?fscOptions : string
-
?definedSymbols : string list
-
?references : bool
-
?fsiEvaluator : IFsiEvaluator
-
?parseOptions : MarkdownParseOptions
-
Defaults to MarkdownParseOptions.AllowYamlFrontMatter
?rootInputFolder : string
-
?onError : string -> unit
-
Returns: LiterateDocument
|
Parse Markdown document to LiterateDocument
|
Full Usage:
Literate.ParseMarkdownString(content, ?path, ?fscOptions, ?definedSymbols, ?references, ?fsiEvaluator, ?parseOptions, ?rootInputFolder, ?onError)
Parameters:
string
-
?path : string
-
optional file path for debugging purposes
?fscOptions : string
-
?definedSymbols : string list
-
?references : bool
-
?fsiEvaluator : IFsiEvaluator
-
?parseOptions : MarkdownParseOptions
-
Defaults to MarkdownParseOptions.AllowYamlFrontMatter
?rootInputFolder : string
-
?onError : string -> unit
-
Returns: LiterateDocument
|
Parse string as a markdown document
|
Full Usage:
Literate.ParsePynbString(content, ?path, ?definedSymbols, ?references, ?parseOptions, ?rootInputFolder, ?onError)
Parameters:
string
-
?path : string
-
optional file path for debugging purposes
?definedSymbols : string list
-
?references : bool
-
?parseOptions : MarkdownParseOptions
-
Defaults to MarkdownParseOptions.AllowYamlFrontMatter
?rootInputFolder : string
-
?onError : string -> unit
-
Returns: LiterateDocument
|
Parse pynb string as literate document
|
Full Usage:
Literate.ParseScriptString(content, ?path, ?fscOptions, ?definedSymbols, ?references, ?fsiEvaluator, ?parseOptions, ?rootInputFolder, ?onError)
Parameters:
string
?path : string
?fscOptions : string
?definedSymbols : string list
?references : bool
?fsiEvaluator : IFsiEvaluator
?parseOptions : MarkdownParseOptions
?rootInputFolder : string
?onError : string -> unit
Returns: LiterateDocument
|
Parse string as F# Script to LiterateDocument
|
Full Usage:
Literate.ToFsx(doc, ?substitutions, ?crefResolver, ?mdlinkResolver)
Parameters:
LiterateDocument
?substitutions : (ParamKey * string) list
?crefResolver : string -> (string * string) option
?mdlinkResolver : string -> string option
Returns: string
|
Formate the literate document as an .fsx script
|
Full Usage:
Literate.ToHtml(doc, ?prefix, ?lineNumbers, ?generateAnchors, ?substitutions, ?crefResolver, ?mdlinkResolver, ?tokenKindToCss)
Parameters:
LiterateDocument
?prefix : string
?lineNumbers : bool
?generateAnchors : bool
?substitutions : (ParamKey * string) list
?crefResolver : string -> (string * string) option
?mdlinkResolver : string -> string option
?tokenKindToCss : TokenKind -> string
Returns: string
|
Format the literate document as HTML without using a template
|
Full Usage:
Literate.ToLatex(doc, ?prefix, ?lineNumbers, ?generateAnchors, ?substitutions, ?crefResolver, ?mdlinkResolver)
Parameters:
LiterateDocument
?prefix : string
?lineNumbers : bool
?generateAnchors : bool
?substitutions : (ParamKey * string) list
?crefResolver : string -> (string * string) option
?mdlinkResolver : string -> string option
Returns: string
|
Format the literate document as Latex without using a template
|
Full Usage:
Literate.ToPynb(doc, ?substitutions, ?crefResolver, ?mdlinkResolver)
Parameters:
LiterateDocument
?substitutions : (ParamKey * string) list
?crefResolver : string -> (string * string) option
?mdlinkResolver : string -> string option
Returns: string
|
Formate the literate document as an iPython notebook
|
Full Usage:
Literate.WriteHtml(doc, writer, ?prefix, ?lineNumbers, ?generateAnchors, ?substitutions, ?crefResolver, ?mdlinkResolver, ?tokenKindToCss)
Parameters:
LiterateDocument
writer : TextWriter
?prefix : string
?lineNumbers : bool
?generateAnchors : bool
?substitutions : (ParamKey * string) list
?crefResolver : string -> (string * string) option
?mdlinkResolver : string -> string option
?tokenKindToCss : TokenKind -> string
|
Write the literate document as HTML without using a template
|
Full Usage:
Literate.WriteLatex(doc, writer, ?prefix, ?lineNumbers, ?generateAnchors, ?substitutions, ?crefResolver, ?mdlinkResolver)
Parameters:
LiterateDocument
writer : TextWriter
?prefix : string
?lineNumbers : bool
?generateAnchors : bool
?substitutions : (ParamKey * string) list
?crefResolver : string -> (string * string) option
?mdlinkResolver : string -> string option
|
Write the literate document as Latex without using a template
|