lambdatex-0.2.0.0: Type-Safe LaTeX EDSL

Safe HaskellNone
LanguageHaskell2010

Text.LaTeX.LambdaTeX.Selection

Contents

Synopsis

Making selections

constructSelection :: String -> Selection Source #

Construct a selection from a space-separated list of strings representing selectors

constructSelection = map constructSelector . words

constructSelector :: String -> Selector Source #

Construct a selector from a string

>>> constructSelector "all"
> All
>>> constructSelector "mySection.mySubsection"
> Match ["mySection", "mySubsection"]
>>> constructSelector "+mySection.mySubsection"
> Match ["mySection", "mySubsection"]
>>> constructSelector "-mySection.mySubsection"
> Ignore ["mySection", "mySubsection"]

Using selections

note :: Monad m => Text -> ΛTeXT m () -> ΛTeXT m () Source #

Declare a sub-part of the document with a name. This allows you to use the subset-selection feature later.