Modulepandoc-3.12
Text.Pandoc.Highlighting
- 1 type
- 30 values
- Packagepandoc-3.12
- Exports31
- LicenceGPL-2.0-or-later
- SourceStyles.hs
Style from the breeze-dark KDE syntax highlighting theme.
Style based on ultraviolet's espresso_libre.css (dark background).
Style based on haddock's source highlighting.
Style based on kate's default colors.
Style with no colors.
Style based on pygments's default colors.
Style based on pygments's tango colors.
Style based on the popular zenburn vim color scheme
Like formatHtmlBlock but uses only attributes valid in HTML 4
(so, no aria-hidden or aria-label attributes are used on the
line anchors).
Format tokens as an HTML pre block. Each line is wrapped in a
span element whose id is the line number (prefixed with lineIdPrefix),
beginning with an empty anchor linking to the line. If line numbering
is selected, the surrounding pre is given the class ‘numberSource’,
and the resulting html will display line numbers thanks to the included
CSS. See the documentation for formatHtmlInline for information about how
tokens are encoded.
Format tokens using HTML spans inside code tags. For example,
A KeywordTok is rendered as a span with class kw.
Short class names correspond to TokenTypes as follows:
KeywordTok = kw,
DataTypeTok = dt,
DecValTok = dv,
BaseNTok = bn,
FloatTok = fl,
CharTok = ch,
StringTok = st,
CommentTok = co,
OtherTok = ot,
AlertTok = al,
FunctionTok = fu,
RegionMarkerTok = re,
ErrorTok = er,
ConstantTok = cn,
SpecialCharTok = sc,
VerbatimStringTok = vs,
SpecialStringTok = ss,
ImportTok = im,
DocumentationTok = do,
AnnotationTok = an,
CommentVarTok = cv,
VariableTok = va,
ControlFlowTok = cf,
OperatorTok = op,
BuiltInTok = bu,
ExtensionTok = ex,
PreprocessorTok = pp,
AttributeTok = at,
InformationTok = in,
WarningTok = wa.
A NormalTok is not marked up at all.
Returns CSS for styling highlighted code according to the given style.
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.
Formats tokens as ConTeXt using custom commands inside a type{}.
A KeywordTok is rendered using \KeywordTok{..}, and so on.
Converts a Style to a set of ConTeXt command definitions, which should be placed in the document's preamble.
Format tokens as a LaTeX Highlighting environment inside a
Shaded environment. Highlighting and Shaded are
defined by the macros produced by styleToLaTeX. Highlighting
is a verbatim environment using fancyvrb; \, {, and }
have their normal meanings inside this environment, so that
formatting commands work. Shaded is either nothing
(if the style's background color is default) or a snugshade
environment from framed, providing a background color
for the whole code block, even if it spans multiple pages.
Formats tokens as LaTeX using custom commands inside
| characters. Assumes that | is defined as a short verbatim
command by the macros produced by styleToLaTeX.
A KeywordTok is rendered using \KeywordTok{..}, and so on.
Converts a Style to a set of LaTeX macro definitions, which should be placed in the document's preamble. Note: default LaTeX setup doesn't allow boldface typewriter font. To make boldface work in styles, you need to use a different typewriter font. This will work for computer modern:
\DeclareFontShape{OT1}{cmtt}{bx}{n}{<5><6><7><8><9><10><10.95><12><14.4><17.28><20.74><24.88>cmttb10}{}Or, with xelatex:
\usepackage{fontspec}
\setmainfont[SmallCapsFont={* Caps}]{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont[SmallCapsFont={Latin Modern Mono Caps}]{Latin Modern Mono Light}Format tokens as a Typst Highlighting environment inside a
Skylighting block that can be styled. Skylighting is
defined by the macros produced by styleToTypst.
Formats tokens as Typst using custom commands inside
| characters. Assumes that | is defined as a short verbatim
command by the macros produced by styleToTypst.
A KeywordTok is rendered using \KeywordTok{..}, and so on.
Converts a Style to a set of Typst macro definitions, which should be placed in the document's preamble.
A rendering style. This determines how each kind of token is to be rendered, and sets a default color and background color for normal tokens. Line numbers can have a different color and background color.
Instances10Eq, Data, Ord, Read, Show, Generic, …
Eq StyleDefined in skylighting-core-0.15 · Skylighting.TypesData StyleDefined in skylighting-core-0.15 · Skylighting.TypesOrd StyleDefined in skylighting-core-0.15 · Skylighting.TypesRead StyleDefined in skylighting-core-0.15 · Skylighting.TypesShow StyleDefined in skylighting-core-0.15 · Skylighting.TypesGeneric StyleDefined in skylighting-core-0.15 · Skylighting.TypesBinary StyleDefined in skylighting-core-0.15 · Skylighting.TypesFromJSON StyleDefined in skylighting-core-0.15 · Skylighting.TypesToJSON StyleDefined in skylighting-core-0.15 · Skylighting.Typestype Rep Style = D1 ('MetaDataDefined in skylighting-core-0.15 · Skylighting.Types"Style"
"Skylighting.Types"
"skylighting-core-0.15-BNtabBXLIz0JmmLvQbrX8O"
'False) (C1 ('MetaCons"Style"
'PrefixI 'True) ((S1 ('MetaSel ('Just"tokenStyles"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map TokenType TokenStyle)) :*: S1 ('MetaSel ('Just"defaultColor"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))) :*: (S1 ('MetaSel ('Just"backgroundColor"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: (S1 ('MetaSel ('Just"lineNumberColor"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color)) :*: S1 ('MetaSel ('Just"lineNumberBackgroundColor"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Color))))))