HaTeX-3.17.3.0: The Haskell LaTeX library.

Safe HaskellSafe
LanguageHaskell2010

Text.LaTeX.Base.Warnings

Contents

Description

This module provides functionality for check a LaTeX value for possibly undesired things (like the call to an undefined label), returning Warnings. These are called Warnings because they never terminate the program execution.

Synopsis

Warnings datatype

data Warning #

List of possible warnings.

Constructors

UnusedLabel Text

There is an unused label. Argument is its name.

UndefinedLabel Text

There is a reference to an undefined label. Arguments is the name.

NoClassSelected

No class selected with documentclass.

NoDocumentInserted

No document inserted.

CustomWarning Text

Custom warning for custom checkings. Use it as you want.

Instances

data TeXCheck #

A TeXCheck is a function that checks possible warnings from a LaTeX value. Use the Monoid instance to combine check functions.

check :: TeXCheck -> LaTeX -> [Warning] #

Apply a checking.

checkFromFunction :: (LaTeX -> [Warning]) -> TeXCheck #

Build a TeXCheck from a function.

Several checkings

checkLabels :: TeXCheck #

Checking for unused labels or references tu undefined labels.

checkClass :: TeXCheck #

Check if a document class is specified for the document (using documentclass).

checkDoc :: TeXCheck #

Check if the document environment is called in a LaTeX.

Complete checking