skylighting-format-context-0.1.0.2: ConTeXt formatter for skylighting syntax highlighting library

Safe Haskell | None
Language | Haskell2010

Skylighting.Format.ConTeXt

Synopsis

- formatConTeXtInline :: FormatOptions -> [SourceLine] -> Text
- formatConTeXtBlock :: FormatOptions -> [SourceLine] -> Text
- styleToConTeXt :: Style -> Text

# Documentation

formatConTeXtInline :: FormatOptions -> [SourceLine] -> Text Source #

Formats tokens as ConTeXt using custom commands inside a `type{}`. A `KeywordTok` is rendered using `\KeywordTok{..}`, and so on.

formatConTeXtBlock :: FormatOptions -> [SourceLine] -> Text Source #

Format tokens as a ConTeXt `highlighting` typing environment. The `highlighting` environemnt is defined by the macros produced by `styleToConTeXt`; it is a `typing` environment with default escaping enabled, i.e., `/` is the escape character.

styleToConTeXt :: Style -> Text Source #

Converts a `Style` to a set of ConTeXt command definitions, which should be placed in the document's preamble.