hlatex-0.3: A library to build valid LaTeX files

Safe HaskellSafe-Infered

Language.LaTeX.Builder.Color

Contents

Synopsis

The type of colors

Coloring commands

pagecolor :: Color -> ParItemSource

pagecolor sets the background colour for the current and following pages

color :: Color -> TexDeclSource

color is a declaration to switch to setting text in the given colour

textcolor :: Color -> LatexItem -> LatexItemSource

textcolor sets the text of its argument in the given colour

colorbox :: Color -> LatexItem -> LatexItemSource

colorbox sets its argument in a box with the given colour as background

fcolorbox :: Color -> Color -> LatexItem -> LatexItemSource

fcolorbox c1 c2 text is like colorbox, with a frame of c1 around a box of background colour c2. For example, fcolorbox red green Text sets Text in the current text colour on a green background with a red frame.

The two specifications must either both be defined ones, or both use the same model, which is given only once, this limitation only make sense in LaTeX parlance but is helpful here to understand why this function can fail.

preamblecolor :: Color -> PreambleItemSource

Like color but usable in the preamble.

normalcolor :: TexDeclSource

normalcolor switches to the colour that was active at the end of the preamble. Thus placing a color declaration in the preamble can change the standard colour for the whole document. This is the equivalent to normalfont for font selection.

Making colors

Predefined colors

Package name